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

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

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 

  • 2

#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 offline   Hendricks266 

  • EDuke32 Senior Developer
  • 6,061

  #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 offline   Hendricks266 

  • EDuke32 Senior Developer
  • 6,061

  #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 are property of their respective owners. Instead of reading this text, you could be playing Ion Maiden! ;) © 2018 Voidpoint, LLC

Enter your sign in name and password


Sign in options