expandDescription crash

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

expandDescription crash

Post by Svengali »

:-) So I won't let you wait.

The Hyperradio uses expandDescription() to get the next songname. Normally it gets the next songname, but if there is no entry named hyperradio_songlist in descriptions.plist (maybe renamed or deleted) or the user has changed the key-name instead of the songnames it will return 'hyperradio_songlist'(the name of the key) instead of the name of the soundfile. So a script can handle this on it's own.

But if there is a key named hyperradio_songlist and the array is empty, Oolite will say 'Nice day - I'll spend some time whereever, but not on your computer.' :-)

Maybe Win/Linux related, but no fun at all.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Confirmed. expandDescription does not seem to handle the case of a nil string returned at all. Besides hyperradio, crash also happens if you make thargoid_curses an empty array and fly to witchspace. At the first thargoid curse attempt, it will crash.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Fixed for 1.72 and 1.71.2. For whom it may interest, it was apparently a division by zero error, with zero being the size of the array that expandDescription was trying to expand.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

This is indeed fixed in 1.71.2. Just in time!
Post Reply