VOGONS


zaurus

Topic actions

First post, by eswan

User metadata
Rank Newbie
Rank
Newbie

With a zaurus C750 (arm 400mhz, 64M ram) running Cacko rom 1.22b and zgcc 2.02.
needed -
cdrom.h
#include <fstream>
#include <sstream>

and cdrom_image.cpp change
#include <limits>
to
#include <limits.h>

and commented out the 'if not defined(WIN32)' protect in cdrom_image.cpp (maybe just need to change to 'if !defined(WIN32) ?)

and a 32M swap

It compiles, but dies when run. gdb is giving-
(gdb) run
Starting program: /usr/local/bin/dosbox
Display size = 480x640

Program received signal SIGSEGV, Segmentation fault.
Config::~Config (this=0xbffff874, __in_chrg=2) at setup.cpp:241
241 delete (*cnt);
(gdb) bt
#0 Config::~Config (this=0xbffff874, __in_chrg=2) at setup.cpp:241
#1 0x401141b8 in QPEApplication::applyStyle () from /home/QtPalmtop/lib/libqpe.so.1
#2 0x401125ec in QPEApplication::QPEApplication () from /home/QtPalmtop/lib/libqpe.so.1
#3 0x020f497c in main (argc=1, argv=0xbffffb64) at SDL_Qtopia_main.cc:21
#4 0x406e8070 in __libc_start_main () from /lib/libc.so.6

Any thoughts?

Reply 1 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

hmm a bit odd that crashing

config:~config is only called when you exit dosbox (or an error occured that makes dosbox exit)

zgcc on which gcc is that based ?

Water flows down the stream
How to ask questions the smart way!

Reply 3 of 11, by eswan

User metadata
Rank Newbie
Rank
Newbie

It's gcc 2.95.2 and dosbox-0.62
The line 'if not defined(WIN32)' changed to 'if !defined(WIN32)' works in cdrom_image.cpp. I'm wondering if the fstream include I added is futzing things up. Without it the compile complains about std::ifstream in cdrom.h. Get 'cdrom.h:194: `::string' undeclared (first use here)' without sstream. Looks like the include files are a little lacking in the zgcc package, c++ limits missing.

The '480x640' I think is typical for landscape mode vs. portait mode. A bit confusing, but I believe 640x480 is what it calls portrait. Trying to launch dosbox in portrait mode I get 'QLinuxFbScreen::connect() disp spec Transformed:Rot270:Vga:0 != server disp spec Transformed:Rot0:Vga:0'

Reply 4 of 11, by prompt

User metadata
Rank Newbie
Rank
Newbie

I actually wrote that part of the code, you are telling about and it is only used when you mount a cue/bin image, so I don't think that here is the problem. The limits header is only used when the sdl_sound library is installed, so if it still compiles if you comment it out, there is no problem. Adding fstream to cdrom.h shouldn't make any problems, I just thought that it is already contained in iostream and therefore left it out.

Reply 5 of 11, by chyang

User metadata
Rank Newbie
Rank
Newbie

I have found the root cause of this problem.The class name Config is conflcted with Qtopia related internal class definition.
It is the class Config that made the problem, I just changed the class name to Config_, which ease the program and will make it run. But I still have some other problems.

Reply 7 of 11, by chyang

User metadata
Rank Newbie
Rank
Newbie

Here is the symptom:
# gdb ./dosbox
GNU gdb 5.2
Copyright 2002 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 "armv4l-unknown-linux-gnu"...
(gdb) r
Starting program: /hdd2/tmp/dosbox-0.61/src/dosbox
Display size = 480x640

Program received signal SIG32, Real-time event 32.
0x406a12e0 in sigsuspend () from /lib/libc.so.6
(gdb) bt
#0 0x406a12e0 in sigsuspend () from /lib/libc.so.6
#1 0x406a12d0 in sigsuspend () from /lib/libc.so.6
#2 0x400b1208 in __pthread_create_2_1 (thread=0x348eb3c, attr=0xbffff4b4,
start_routine=0x400ac478 <RunThread>, arg=0x348d3e8) at restart.h:36
#3 0x400ac4f8 in SDL_SYS_CreateThread (thread=0x348eb38, args=0x348d3e8)
at SDL_systhread.c:99
#4 0x400ac3a8 in SDL_CreateThread (fn=0x400ad4b0 <RunTimer>, data=0x348ee58)
at SDL_thread.c:257
#5 0x400ad550 in SDL_SYS_TimerInit () at SDL_systimer.c:282
#6 0x400acda8 in SDL_TimerInit () at SDL_timer.c:90
#7 0x4007f6b4 in SDL_InitSubSystem (flags=817) at SDL.c:109
#8 0x4007f768 in SDL_Init (flags=817) at SDL.c:166
#9 0x02058278 in SDL_main (argc=1, argv=0xbffffc94) at sdlmain.cpp:919
#10 0x0207ad74 in main (argc=1, argv=0xbffffc94)
at qtopia/SDL_qtopia_main.cc:46
#11 0x4068f070 in __libc_start_main () from /lib/libc.so.6

the other thread:
0x40733634 in poll () from /lib/libc.so.6
(gdb) bt
#0 0x40733634 in poll () from /lib/libc.so.6
#1 0x400af1b8 in __pthread_manager (arg=0xfffffffc) at manager.c:148
#2 0x4073af6c in clone () from /lib/libc.so.6
#3 0xbffff4b4 in ?? ()
#4 0xbffff56c in ?? ()

Another Thread:

#0 0x407352bc in select () from /lib/libc.so.6
#1 0x400ad48c in SDL_Delay (ms=4294966782) at SDL_systimer.c:201
#2 0x400ad4fc in RunTimer (unused=0xfffffdfe) at SDL_systimer.c:273
#3 0x400ac2e4 in SDL_RunThread (data=0x348d3e8) at SDL_thread.c:218
#4 0x400ac488 in RunThread (data=0xfffffdfe) at SDL_systhread.c:82
#5 0x400af430 in pthread_start_thread (arg=0xfffffdfe) at manager.c:274
#6 0x4073af6c in clone () from /lib/libc.so.6

After continued:

1st thread:
Program received signal SIGINT, Interrupt.
0x40713294 in wait4 () from /lib/libc.so.6
(gdb) bt
#0 0x40713294 in wait4 () from /lib/libc.so.6
#1 0x40713258 in waitpid () from /lib/libc.so.6
#2 0x406b70e0 in system () from /lib/libc.so.6
#3 0x400b403c in system (line=0x400bce78 "/home/QtPalmtop/bin/chkhinge")
at wrapsyscall.c:159
#4 0x400a4010 in QT_SetVideoMode (_this=0x348cc70, current=0x348dd00,
width=640, height=400, bpp=16, flags=268435456) at SDL_sysvideo.cc:509
#5 0x4009e274 in SDL_SetVideoMode (width=640, height=400, bpp=16,
flags=268435456) at SDL_video.c:661
#6 0x020571a0 in GUI_StartUp (sec=0x348ee58) at sdlmain.cpp:609
#7 0x0206d70c in Config_::Init (this=0xbffffaf4) at ../../include/setup.h:133
#8 0x02058c30 in SDL_main (argc=1, argv=0xbffffc94) at sdlmain.cpp:972
#9 0x0207ad74 in main (argc=1, argv=0xbffffc94)
at qtopia/SDL_qtopia_main.cc:46
#10 0x4068f070 in __libc_start_main () from /lib/libc.so.6

2nd thread:
Program exited normally.

3rd thread:
(gdb) bt
#0 0x406a12e0 in sigsuspend () from /lib/libc.so.6
#1 0x406a12d0 in sigsuspend () from /lib/libc.so.6
#2 0x400b15cc in pthread_onexit_process (retcode=0, arg=0x8) at restart.h:36
#3 0x400b19a4 in __pthread_kill_other_threads_np () at pthread.c:883
#4 0x40713650 in execve () from /lib/libc.so.6
#5 0x406b70c0 in system () from /lib/libc.so.6
#6 0x400b403c in system (line=0x400bce78 "/home/QtPalmtop/bin/chkhinge")
at wrapsyscall.c:159
#7 0x400a4010 in QT_SetVideoMode (_this=0x348cc70, current=0x348dd00,
width=640, height=400, bpp=16, flags=268435456) at SDL_sysvideo.cc:509
#8 0x4009e274 in SDL_SetVideoMode (width=640, height=400, bpp=16,
flags=268435456) at SDL_video.c:661
#9 0x020571a0 in GUI_StartUp (sec=0x348ee58) at sdlmain.cpp:609
#10 0x0206d70c in Config_::Init (this=0xbffffaf4) at ../../include/setup.h:133
#11 0x02058c30 in SDL_main (argc=1, argv=0xbffffc94) at sdlmain.cpp:972
#12 0x0207ad74 in main (argc=1, argv=0xbffffc94)
at qtopia/SDL_qtopia_main.cc:46
#13 0x4068f070 in __libc_start_main () from /lib/libc.so.6

Don't why the system() call cannot return. 🙁 It seems the problem is SDL related.

Reply 8 of 11, by chyang

User metadata
Rank Newbie
Rank
Newbie

I have solved the problem, it was caused by the compilation problem, the SDL library used the system unsupported recursive mutex. I add one compile option and solved the problem.

But new problems appear:
After dosbox appear,the screen will blink all the time. Shows the Z:>, then the cursor is moving fast, it looks like it is scroll the screen due to the keyboard input, but in fact, I inputted nothing and nothing can stop it from doing so. 🙁
Any idea? Thanks

Reply 9 of 11, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

hmm that is a familiar bug.
Somebody on IRC had this as well.
We were never able to solve it.

(from memory)
Keys got read allright. Moved to the keyboard buffer. But int 16 got the wrong data and continiously reported a key ready.

Water flows down the stream
How to ask questions the smart way!