Crash depending on preceding user actions
-
I hope you didn't give up on catching array handling mistakes that happen between the keyboard and the screen ;-) by adding some additional code checks and error messages.
But actually I am not even sure if its an array problem, because removing any "meaningless" line of code could make this work and the crash will not happen anymore.So, I drop this as much simplified, as I was able to, so it still provokes the crash and the additional information, what to do to make it happen.
Reproduction info:
- Do not do any user action in FUZE beside: starting FUZE, running the code with "+" or "F5". (I have the "coding editor" as the default loading feature)
- if retyping does not work, download the test program with this ID: 5TK73V5WN8
Observations:
- adding or removing lines may cause the program not to crash anymore
- adding more or less print() loops, causes the program to crash earlier or later
- if you go to the media library section in FUZE before running the program and load any image, or probably sound as well and show it on screen and run the code afterwards, it does not crash anymore
- adding or removing comments has no effect on crashing or not
- modifying the looping-number may cause the program not to crash anymore
- copying the push function code right into the loop, caused the crash not to happen anymore
This is the isolated code, from my original program. Its not making sense in the case of a program, its intention is just to reproduce a crash.
array d[26]=[] int count loop clear(denim) ink(grey) frames = 20 for j = 0 to 26 loop d[j]=push(d[j]), "_") if len(d[j]) > frames then d[j] = [] endif for i = 0 to 15 loop print("123456789011234567890112345678901123456789011234567890112345678901\n") repeat repeat ink(yellow) printAt(1,1,"Docked: ", docked()) printAt(1,2,"Loop count: ", count) textSize(20) printAt(1,4,"First run after starting FUZE crashs, in undocked state at >500") count += 1 update() repeat // Add element to the end of the array function push(a, element) a[len(a)] = element return a
-
Thanks @spikey I will take a look. I can also try it on the new patch