Bug #987
closedjlCommandProxy doPost() should check inputs for null values
0%
Description
Currently, if you pass a null as the "parameters" arg for doPost(), the app
crashes.
Updated by Matthew Brooke about 24 years ago
still having probs - which I think are attributable to this bug. To see what
happens, run jalama data package wizard and hit the cancel button - dumps core
(on windowsXP)
The reason I think it's the null thing is this: previously, when finish pressed,
the same thing would happen, so I changed the doPost() call to pass a dummy
string parameter instead of passing null, and it then worked OK.
NOTE - this checking for null should happen in both directions - i.e. data
posted from the xul to the xpcom, and also data coming back from Jalama java
classes to xpcom (ie the return values). Some Command objects may return null
instead of a Map
Updated by Matthew Brooke about 24 years ago
OK - here's the scoop...
The problem is not with passing null values into jlCommandProxy.doPost() -
The core dump occurs only when passing null values back to the XPCOM stuff
FROM JALAMA - for example when a Command object returns null instead of a Map.
Therefore, we should check for and handle this occurrence gracefully, since it
should be valid and possible, when writing a Command object, to have it return
null.
(for example - look at lines 58 to 64 of finalize_Command.java - when returning
null, get a core dump, but when returning a dummy Map, works OK)
This crash could be happening either within jlCommandProxy or jlJVMRegistry -
don't know which.
Updated by John Harris almost 22 years ago
No more crashes when a null paramater string is passed to the jalama app.
Updated by John Harris almost 20 years ago
We are no longer using webclient so this bug is no longer relevant.