[GMS1.4] Error messages change after compiling

Discussion in 'Legacy GameMaker Community Tech Support' started by Jarrodnb, Jul 14, 2019 at 2:41 AM.

  1. Jarrodnb

    Jarrodnb Member

    Joined:
    Sep 9, 2016
    Posts:
    5
    I've noticed that the error messages received though the GMS Runner & the error messages received after compiling the game are different.

    The compiled version error messages don't show the line of code which caused the crash which is making it nearly impossible to debug. I've attached a picture as an example.

    ErrorDifference.jpg

    Notice how the crash through the runner says "Line 13" & the crash from the same error after compiling just says "Line -1"?

    My game is in a closed beta on steam, so every error message I get sent doesn't display the line number which is making it a nightmare to debug.

    Is there any fix for this?
     
  2. Lonewolff

    Lonewolff Member

    Joined:
    Jan 8, 2018
    Posts:
    1,088
    Those variable names you are using would make anyone's life a nightmare to debug.
     
  3. Jarrodnb

    Jarrodnb Member

    Joined:
    Sep 9, 2016
    Posts:
    5
    I just made them up on the spot to make example crashes to get the error messages.
     
  4. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,272
    Create hfdsj in the Create Event of the objTitleStuff so that it exists before you try and access it in the Keypress Event (or whatever the real variable is called).

    You can't check if a variable == true if it doesn't exist yet.
     
  5. Jarrodnb

    Jarrodnb Member

    Joined:
    Sep 9, 2016
    Posts:
    5
    That's not the problem.
    The screenshot is just an example I made to demonstrate that error lines aren't showing correctly once the game has been compiled.
     
  6. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,272
    Nobody is going to steal your variable names lol.

    If the error message you posted is the same other than the variable names, it shouldn't be too hard to look through the Keypress Event and cross check it with variables name that don't exist and/or have not been initialised before trying to access them.

    You could try using the command line parameters to see if the debug report shows anything that might help, not sure if it will but it may help.

    https://www.yoyogames.com/blog/37/command-line-parameters-for-gamemaker-studio
     
  7. Jarrodnb

    Jarrodnb Member

    Joined:
    Sep 9, 2016
    Posts:
    5
    You're completely misunderstanding the point of the post.

    It doesn't matter what the error message is.

    No matter what the error is, once the game is compiled, it just shows the line as -1.

    It happens with every single kind of error message. All error messages can't find the offending line that caused the crash, it just shows up as -1.
     
  8. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,272
    Did it used to report line numbers in compiled versions and has suddenly stopped?

    The message does tell you the event the error is happening in though, unless you have completely changed every detail about the error message?

    Try using the command line parameters and put debug messages in the offending event and see if the generated debug report can point you towards where the error is occurring within that event based off the recorded messages.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice