Script Editor Crash with Easy to use example ged

Non-platform specific questions.

Script Editor Crash with Easy to use example ged

Postby yttermayn » Sat Mar 05, 2011 5:06 pm

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.
Attachments
fails.ged
(1.63 KiB) Downloaded 93 times
yttermayn
 
Posts: 48
Joined: Sun Nov 25, 2007 4:10 pm
Score: 2 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby akr » Sat Mar 05, 2011 5:11 pm

Pls add your data directory. Otherwise will not load. Thx.
Co-Developer of GE engine

If u are interrested in new features of apple or android ge engines check the engine support website game-editor.net regulary.
akr
 
Posts: 453
Joined: Thu Feb 25, 2010 7:56 pm
Location: Germany, Ulm
Score: 40 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby Kodo » Sat Mar 05, 2011 5:23 pm

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 :)
Inogames: http://www.inogames.com iOS gaming
Firetop Adventure (app store): http://itunes.apple.com/us/app/firetop- ... ?mt=8&ls=1
User avatar
Kodo
 
Posts: 449
Joined: Thu Oct 20, 2005 8:20 pm
Location: UK
Score: 23 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby yttermayn » Sat Mar 05, 2011 6:53 pm

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.
yttermayn
 
Posts: 48
Joined: Sun Nov 25, 2007 4:10 pm
Score: 2 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby schnellboot » Sat Mar 05, 2011 7:27 pm

akr was right there is a font file missing
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby Kodo » Sat Mar 05, 2011 10:04 pm

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
*/
Inogames: http://www.inogames.com iOS gaming
Firetop Adventure (app store): http://itunes.apple.com/us/app/firetop- ... ?mt=8&ls=1
User avatar
Kodo
 
Posts: 449
Joined: Thu Oct 20, 2005 8:20 pm
Location: UK
Score: 23 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby yttermayn » Sat Mar 05, 2011 11:06 pm

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.
Attachments
fails.ged
(1.63 KiB) Downloaded 84 times
yttermayn
 
Posts: 48
Joined: Sun Nov 25, 2007 4:10 pm
Score: 2 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby schnellboot » Sun Mar 06, 2011 12:35 am

nope
even if it's standard font you have to put it there
check your data folder ..
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby yttermayn » Sun Mar 06, 2011 3:20 am

Ok, sorry folks. I understand now. Here you go.
Attachments
fail.zip
(194.64 KiB) Downloaded 90 times
yttermayn
 
Posts: 48
Joined: Sun Nov 25, 2007 4:10 pm
Score: 2 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby skydereign » Sun Mar 06, 2011 10:51 am

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.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

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

Postby yttermayn » Sun Mar 06, 2011 4:41 pm

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.
Attachments
fail.zip
(194.61 KiB) Downloaded 76 times
yttermayn
 
Posts: 48
Joined: Sun Nov 25, 2007 4:10 pm
Score: 2 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby lcl » Sun Mar 06, 2011 10:40 pm

You should just divide your comments to many lines.
That long lines are hard to read.. :wink:
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby Waluigiftw » Mon Mar 07, 2011 7:30 pm

I just love to sit around and crash GE with that :mrgreen:
User avatar
Waluigiftw
 
Posts: 61
Joined: Mon Sep 06, 2010 2:49 pm
Location: Fox lake
Score: 3 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby AnarchCassius » Mon Mar 07, 2011 10:49 pm

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.
AnarchCassius
 
Posts: 55
Joined: Sat Jan 29, 2011 1:33 am
Score: 6 Give a positive score

Re: Script Editor Crash with Easy to use example ged

Postby yttermayn » Tue Mar 08, 2011 2:14 pm

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.
yttermayn
 
Posts: 48
Joined: Sun Nov 25, 2007 4:10 pm
Score: 2 Give a positive score

Next

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest