Dodgy mission screen choices crash 1.77

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

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2407
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Dodgy mission screen choices crash 1.77

Post by Wildeblood »

Dodgy mission screen choices crash 1.77, crash trunk from a fortnight ago, so I downloaded the latest nightly build and got this:-

Code: Select all

> dumpObject(eval("worldScripts[\"AI Trading History\"].$configOptions = worldScripts[\"AI Trading History\"].$configOptions2"))
{
    "1_NOTHING": "No change",
    "2_OFF": "OFF: no recommendations or automatic trading       ",
    "3_ADVICE": "ADVICE: buy and sell recommendations only            ",
    "4_SLOW": "SLOW: automatic trading of cargo one unit at a time",
    "5_FAST": "FAST: fully automatic trading of cargo                       ",
    "20": "Reserve no space for extra cargo pods.",
    "21": "Reserve space for 1 extra cargo pod.",
    "22": "Reserve space for 2 extra cargo pods.",
    "25": "Reserve space for 5 extra cargo pods."
}

Connection closed with no message.
Opened connection with Oolite version 1.77.1
Exception: Error: Native exception: NSIntNumber(instance) does not recognize caseInsensitiveCompare:
    Active script: AI Trading History 2.4
    trading_history.js, line 84:
    	function (choice)
Exception: Error: Native exception: NSIntNumber(instance) does not recognize caseInsensitiveCompare:
    Active script: AI Trading History 2.4
    trading_history.js, line 84:
    	function (choice)
Connection closed:"Oolite is terminating."
I think it's pretty obvious what I did wrong, using a number as a choices key. But the fact it caused a "Native exception", whatever that is, prompts this report.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Dodgy mission screen choices crash 1.77

Post by cim »

This should no longer cause a crash in r5638. You should be able to use a numeric key, though - you can if you use choicesKey instead - so there may be more later.
Post Reply