Page 1 of 2

Script Editor Crash with Easy to use example ged

PostPosted: Sat Mar 05, 2011 5:06 pm
by yttermayn
Long lines in the script editor window crash GE. I sometimes have long code lines with long comments and a crash without save sucks hard.

See the example attached to witness the crash.

Re: Script Editor Crash with Easy to use example ged

PostPosted: Sat Mar 05, 2011 5:11 pm
by akr
Pls add your data directory. Otherwise will not load. Thx.

Re: Script Editor Crash with Easy to use example ged

PostPosted: Sat Mar 05, 2011 5:23 pm
by Kodo
While you are right, long lines should not crash the script editor/GE you can make it easier on yourself by using several lines where need. As an example, one action or piece of code can be spilt on two or more lines without causing errors. Doing this will mean that you will be able to see the whole 'line' at once, making it easier to edit.

Code: Select all
ChangeTransparency("Event Actor", 0.300000);
works just fine, so does...

Code: Select all
ChangeTransparency("Event Actor",
0.300000);
Spliting lines of code like this can make it so much easier to edit :)

Re: Script Editor Crash with Easy to use example ged

PostPosted: Sat Mar 05, 2011 6:53 pm
by yttermayn
akr: There is no data, you shouldn't need it.

kodo: Thanks, though it's usually my comments that get long. Still applies though, probably. Will try it. Would still like to see the bug fixed.

Re: Script Editor Crash with Easy to use example ged

PostPosted: Sat Mar 05, 2011 7:27 pm
by schnellboot
akr was right there is a font file missing

Re: Script Editor Crash with Easy to use example ged

PostPosted: Sat Mar 05, 2011 10:04 pm
by Kodo
With comments, just be sure to put // at the start if each line, or use /* and */ to mark the start and end of a block of comment text...

A block of comment lines can also be done like this...
Code: Select all
/*
Comment 1
Comment 2
*/

Re: Script Editor Crash with Easy to use example ged

PostPosted: Sat Mar 05, 2011 11:06 pm
by yttermayn
I see now. I just picked a random font that was already on my PC, must have been a non-standard one. Changed it to arial.ttf. Hopefully that does it. There is no data directory. Kept it simple on purpose.

Re: Script Editor Crash with Easy to use example ged

PostPosted: Sun Mar 06, 2011 12:35 am
by schnellboot
nope
even if it's standard font you have to put it there
check your data folder ..

Re: Script Editor Crash with Easy to use example ged

PostPosted: Sun Mar 06, 2011 3:20 am
by yttermayn
Ok, sorry folks. I understand now. Here you go.

Re: Script Editor Crash with Easy to use example ged

PostPosted: Sun Mar 06, 2011 10:51 am
by skydereign
Just curious, what code is in that draw actor event? It crashes for me as soon as I try to edit the event. I have though experienced the problem you are talking about, but this is the first time I've seen it instantly crash every time I try to edit it.

Re: Script Editor Crash with Not so Easy to use example ged

PostPosted: Sun Mar 06, 2011 4:41 pm
by yttermayn
Here, I guess the line length causes a crash at different places for different systems. I cut off about a dozen characters from the comments. Just open up the draw actor script and add characters to the end and it should crash fairly quickly.

Oh, and in case it is still crashing for you before you get to see it, this is the code:
Code: Select all
//add more characters to line 6 in the comments
if(doonce == 1 && no_of_fails < 20)
{
strcpy(text, "FAIL");
CreateActor("world", "icon", "(none)", "(none)", 20 + rand(20) , 20 + rand(20), false); // blah blah blah blah now keep adding characters to the end of this line until it crashes into oblivion come on now
no_of_fails += 1;
doonce = 0;
}

The create actor line is actually one long one, the reply dialog box wrapped it above.

Re: Script Editor Crash with Easy to use example ged

PostPosted: Sun Mar 06, 2011 10:40 pm
by lcl
You should just divide your comments to many lines.
That long lines are hard to read.. :wink:

Re: Script Editor Crash with Easy to use example ged

PostPosted: Mon Mar 07, 2011 7:30 pm
by Waluigiftw
I just love to sit around and crash GE with that :mrgreen:

Re: Script Editor Crash with Easy to use example ged

PostPosted: Mon Mar 07, 2011 10:49 pm
by AnarchCassius
I'm rather reminded of a bad joke. Man goes to the doctor, says "It hurts when I raise my arm like this.". Doctor looks at him and replies "Well don't raise your arm like that."

Just because there are ways to avoid this error doesn't mean it's not a legitimate bug to be addressed and that is the vibe I get from most of the comments. I get crashes when just trying to copy/paste normal lines sometimes and for other reasons I can't begin to understand. The syntax and debugging is great but I once finished dealing with all errors only to have it crash when trying to add the working code. Making the text editor more stable would definitely increase user interest. The program is good but a few random crashes may cause some new users to feel it's not reliable enough to bother with. Even though in action the code seems quite stable the editor is still important.

Re: Script Editor Crash with Easy to use example ged

PostPosted: Tue Mar 08, 2011 2:14 pm
by yttermayn
AnarchCassius : Thank you, +1! That was exactly my point. I've used GE for years, through many versions, and that bug has always been present. I don't often trigger it which makes it easy to ignore, but sometimes when I'm in a groove and typing furiously, I don't think to stop and hit enter - no other word processor/dialog box I know of forces the user to manually carriage return. I just happened to submit the bug this time.
The other bug that is irritating is the copy/paste bug which seems to crop up when you use the mouse to move the text cursor around, particularly to the end of a line.