FS#1474 - uisimulator segfaults on winnt 4.0

Attached to Project: Rockbox
Opened by Anonymous Submitter - Thursday, 26 June 2003, 21:04 GMT
Last edited by Daniel Stenberg (bagder) - Friday, 05 December 2003, 09:30 GMT
Task Type Bugs
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Hi there!

the uisimulator doesn`t seem to work on winnt4.0!

regardless, on which win32 platform I compile it (with
cygwin/mingw environment), it simply doesn`t run on
NT4.0, but segfaults at an very early stage.
it runs fine on win98/2000/XP (even the .exe I compiled
on NT4.0!)

Had somebody success compiling the simulator on linux
with win32 as target platform? If so, does THAT
uisw32.exe probably run on NT4.0 ? If you don`t have
NT available for testing, send the uisw32.exe to - I can test that. (and possibly can
compare the differences)

here is some further info I already sent to the list - but
nobody had a solution so far - so I post this as a bug

>it bangs before main!
>I have no clue about debugging, but i was digging the
>net and found some infos - so i set another breakpoint
>at mainCRTStartup, as this was suggested somewhere.

>this is what I get:
>Administrator@IS030-VM3 ~/build
>$ gdb uisw32.exe
>GNU gdb 2003-01-28-cvs (cygwin-special)
>Copyright 2003 Free Software Foundation, Inc.
>GDB is free software, covered by the GNU General
>Public License, and you are
>welcome to change it and/or distribute copies of it
>under certain conditions.
>Type "show copying" to see the conditions.
>There is absolutely no warranty for GDB. Type "show
>warranty" for details.
>This GDB was configured as "i686-pc-cygwin"...
>(gdb) break mainCRTStartup
>Breakpoint 1 at 0x401006
>(gdb) break main
>Breakpoint 2 at 0x419ffa: file ../../firmware/drivers/lcd-
>recorder.c, line 848.
>(gdb) run
>Starting program: /home/rockbox/build/uisw32.exe
>Breakpoint 1, 0x00401006 in mainCRTStartup ()
>(gdb) cont
>Program received signal SIGSEGV, Segmentation fault.
>0x00000024 in ?? ()
>(gdb) bt
>#0 0x00000024 in ?? ()
>Cannot access memory at address 0x17100fe
>So it seems to crash somewhere between
>mainCRTStartup()? (eeerrrr - what is
>that?) and main(). What is executed before main() ?
>Whatelse can I do ? I`m happily if I can learn
>something about debugging....

This task depends upon

Closed by  Daniel Stenberg (bagder)
Friday, 05 December 2003, 09:30 GMT
Reason for closing:  Fixed
Comment by Anonymous Submitter - Thursday, 03 July 2003, 00:42 GMT

Hello !
after a lot of debugging work, i managed to fix bug #761446 -
segfaults on winnt 4.0
i never thought that i could find this myself - but finally did
it :)

in uisw32.c, please change:

wc.lpfnWndProc = (WNDPROC)GUIWndProc;
wc.lpfnWndProc = GUIWndProc;



so - i would call uisimulator "win32 compatible" now.