Duke4.net Forums: Minor bug in OSX version of EDuke32 (with fix) - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Minor bug in OSX version of EDuke32 (with fix)  "Application closes without any error message when no valid GRP found"

User is offline   DarkMagus 

#1

Hi,

I had to deal with a minor bug in the OSX version of EDuke32 (svn revision 6437).
When no valid GRP are found, the application (when ran from the GUI) closes immediately without any error message (while other versions simply display the setup screen with an empty game list).

Using gdb, I tracked down the issue to line 530 of the file startosx.game.mm :
    int row = [gamelistsrc findIndexForGrpname:[NSString stringWithUTF8String:settings.grp->filename]];


When no valid GRP files are found, settings.grp is NULL, and this line causes a segfault.

Fixing the code this way solves the issue :
    int row = -1;
    if (settings.grp != NULL) row = [gamelistsrc findIndexForGrpname:[NSString stringWithUTF8String:settings.grp->filename]];


- David

This post has been edited by DarkMagus: 30 August 2017 - 11:44 PM

2

User is online   Hendricks266 

  • Weaponized Autism

  #2

Thanks for the report. I came across this as well when trying to fix our support for Retina displays, and since that consisted of mostly banging my head against the wall, I never committed it. The best fix here is to skip the entire block that highlights the row value in question.
0

User is online   Hendricks266 

  • Weaponized Autism

  #3

Fixed in r6448.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options