Cabbage Logo
Back to Cabbage Site

Defining long variable names crashing Cabbage

When you define a variable longer than 23 characters it will crash Cabbage.

This problem started from version 2.5.23.

If you load a file with a long variable name you crash Cabbage when scrolling through it and you will be unable to edit the file as I found out the hard way. The only way to recover is using an external editor.

The program itself is not affected though and will run just fine

Happy hunting. :grin:

I guess it’s a parser issue again. I don’t think it will take me as soon to hunt this one down as it did the comment issue! :laughing:

Had a feeling this would not be a quick one. :grin:

Anyway, it’s easy to avoid once you know it. Just have to restrain myself using those long descriptive variable names. :joy:

I’ve changed this to 32, if you need longer let me know. There is a slight cost to this as the parser is constantly checking text to see if it should highlight things.

Hi Rory,

the largest variable name I defined was 24 characters long, hence the crash I experienced.

I think the most important thing is that Cabbages doesn’t crash when the character limit is (accidentally) reached.

Agreed.

[edit] fixed

Rory,

note that Cabbage still crashes when exceeding the limit of 31 characters.

Seems to be fine for me here? Are you sure you are using the latest beta package?

Yes, 24.5 but also tried with the latest 24.6 and same thing here.

I’m on Windows 10 64-bit.

Would you expect to see a crash based on what I’m doing that gif, or have you concocted another more sinister way of doing it :smirk:

Rory,
haha, sinister, yes of course.

I think this bug is still going to give you some headaches. :joy:
I still can remember me debugging a parser that refused to understand reasonable language. :anguished:

In testing a bug of this type I usually take the way of the least resistance: put my finger on a key and let the repeat magic happen. You should try it. Really mind bending. :grin:

However, paradoxically, if I type in what you typed nothing happens, Cabbage stays happy until…
I backspace back to the beginning -> boom. :joy:

I’m sure you can come up with a number of combinations that work and don’t work.
Is it important? For the moment I don’t think so unless you have a key stuck on your keyboard. :wink:

But it still is a bug.

I just can’t recreate this. Are you on Windows or MacOS?

Windows 10 64-bit

I can look if this works in Linux or macOS if you want. Just need some time for this.

I just tried on MacOS and didn’t hit any issues. I will try on Windows and see if I can recreate the issue there.

Seems to be solved in latest v2.5.30. :+1: