Rockbox

Tasklist

FS#11524 - Simulator crashes on startup

Attached to Project: Rockbox
Opened by Michael Chicoine (mc2739) - Saturday, 07 August 2010, 23:29 GMT
Last edited by Jonathan Gordon (jdgordon) - Monday, 16 August 2010, 12:53 GMT
Task Type Bugs
Category Simulator
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The simulator will crash on start when it loads a theme which contains an SBS that has a comment line prior to the %Vi line and additional viewport definitions after the %Vi line. The same theme loaded after the simulator has successfully started does not cause a crash and operates properly.

This failure started with r27665. A simulator built with r27664 does not crash.

Tested on e200 v1/v2 linux/win32 simulators. The linux version spits out a bunch of "SDL_WaitEvent() error" messages and then gets a Segmentation fault. The windows version just shuts down the window. If run with --debugwps, in each case the "Loading '/.rockbox/wps/foo.sbs'" message is displayed before the crash. The similar messages for
the WPS and FMS are not displayed.

This simple SBS will cause the crash:

#
%Vi(-,0,0,176,194,-)
%V(0,194,-,-,-)
TEST

Substituting the %V with %Vd/%Vl as below will also cause the same crash:

#
%Vi(-,0,0,176,194,-)
%Vd(a)
%Vl(a,0,194,-,-,-)
TEST

Removing the comment line in each case will allow the simulator to start properly.
This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Monday, 16 August 2010, 12:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  r27829
Comment by Michael Chicoine (mc2739) - Monday, 09 August 2010, 03:07 GMT
Here is the test theme I used.
   test.zip (0.9 KiB)
Comment by Michael Chicoine (mc2739) - Monday, 09 August 2010, 12:26 GMT
Running the test.sbs file attached above through checkwps with -vvv option causes a seg fault. This failure also corresponds to the changes made in r27665. Checkwps built from r27664 does not fail.

./checkwps.sansae200 -vvv test.sbs
Checking test.sbs...
WPS parsed OK

[ Viewport
[ Logical line on line 1
Segmentation fault

Removing the comment on line one and running checkwps again causes it to seg fault on the next comment line. If all comments are removed, checkwps runs properly.
Comment by Fred Bauer (freddyb) - Tuesday, 10 August 2010, 18:50 GMT
I'm not sure if this is right but it seems to fix the problem. I just added a check for NULL input in find_viewport().

Loading...