• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code Incomplete error stack trace after packaging

COWCAT

Member
When I compile a game which reports a fatal error, I get the lines numbers which make it easy to debug. For example :

___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object controller_:
ini_write_real argument 3 incorrect type (string) expecting a Number (YYGR)
at gml_Script_saveslotwritereal (line 17) - ini_write_real("save", thename, theval);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_saveslotwritereal (line 17)
called from - gml_Script_savegamefile (line 207) - saveslotwritereal(thefile, "VAR_PC01_STORY110_EXPLANATION", global.VAR_PC01_STORY110_EXPLANATION);
called from - gml_Script_PC_init (line 23) - savegamefile(1);
called from - gml_Script_PC02_ (line 12) - PC_init();
called from - gml_Script_roomcreatestart (line 35) - case "PC02" : PC02_(); break;
called from - gml_Script_roomcreate (line 16) - roomcreatestart();
called from - gml_Room_PCroom2_Create (line 1) - roomcreate();


But when the same code is packaged (as .zip or an install file on Windows), the stacktrace is reduced to this :

___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object controller_:
ini_write_real argument 3 incorrect type (string) expecting a Number (YYGR)
at gml_Script_saveslotwritereal
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_saveslotwritereal (line -1)
gml_Script_savegamefile
gml_Script_PC_init
gml_Script_PC02_
gml_Script_roomcreatestart
gml_Script_roomcreate
gml_Room_PCroom2_Create



I use the VM compiler. I believe this is the normal behavior and it's done for performance and/or obfuscating - but is there any way to change this for testing phase?
I *think* I remember seeing something about this a long time ago in the manual but maybe I just dreamt it?

I'm going to start sending builds to testers and it'll be quite annoying if I can't see enough detail to fix the bugs.

Any idea?
 
Last edited:

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Compiling with YYC will display line numbers in stack traces. On VM, these only show up if a .yydebug file is available (goes into temp directory), but you would need some external tool to generate one to avoid shipping your entire source code to players
 

COWCAT

Member
Oh, YYC has the full stacktrace?... I didn't expect it! On the contrary, I thought this would be obfuscated.

I guess that's one more reason to use it then. Too bad it's much slower to compile, but at least I've got an alternative now.

Thanks!

EDIT : Just tested, indeed it works. Just YYC doesn't indicate the "real" line number from the code, it seems offset a bit. But better than nothing, thanks!
 
Last edited:

COWCAT

Member
Hmm it seemed to be more than 1 for me, I think it was 3 lines behind in my example. (should be line 20 but it indicates line 17)
Oh well, I'll check again when the fix will be in stable.
 
Top