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:

i found that sometimes when you are moving some buttons it does a duplicate script on that line and it get long , so i re- open de .csd file and go straight to the script and erase the duplicate script and start editing again with no problems, keep checking the scroll bar as soon i see its getting shorter i go and erase duplicates, that does it for me.

This is related to another issue. In fact, I have been working on it for the past few days also. It seems to be happen when you use the GUI editor, and try inserting some images. I’ve pushed through a fix for this just now. Let me know if it helps.

yes, when i add images its when it happened to me, question, when you do this bug fixes, i have to go and download the latest version of cabbage?, its there where the fix is?, thanx.

The latest versions are built daily. You can grab the installers from here. Just click on the latest run, wait for it to finish building, and then select the artefacts published link. That will bring up a drop link, click on that and grab the installers :+1:

Some times there are several build on the go at the same time. You can usually see from the commit tag what was the latest change to be pushed.