Results 1 to 7 of 7
  1.    #1  
    Hello,

    I'm trying to get dosbox running on webOS. I downloaded the cross-compiler toolchain from webos-internals, took the Makefile of scummvm as a template for the dosbox Makefile (see attachment). It compiled without any errors but when started on the Pre it said SDL has no CDROM support. dosbox doesn't seem to have a switch for that so I removed CDROM from the SDL initialization code in dosbox and tried again. Next error was that SDL could not open a surface with 640x400. That was because dosbox uses a scaler per default which scales the 320x200 up to double-size. I disabled it in the config and then it started (Dosbox logo shortly displayed on the pre) but then it crashed with this error message:

    terminate called after throwing an instance of 'char*'
    Segmentation fault

    Anyone knows what this means are at least from where it is comming? This message is not in the dosbox source code.
    Attached Files Attached Files
  2. #2  
    "terminate called after throwing an instance of .." is an uncaught C++ exception. DOSBox is written in C not C++, but it's apparently making use of some external function that has a C++ implementation. I'd suggest renaming the main() function in DOSBox to cmain(), then creating a separate main_stub.cpp that has:
    #include <iostream>
    extern "C" { int cmain(int argc, char** argv); }
    int main(int argc, char** argv) {
    try { cmain(argc, argc) }
    catch(char* msg) { std::cout << msg << std::endl; return 11; }
    }.

    you would compile main_stub.cpp with g++, but it would link successfully against the C code in DOSBox compiled with gcc. You'll be able to view the exception then, which would probably help you a lot if the message is something like "SDL: unable to ..."

    Another good troubleshooting measure it to enable coredumps (`ulimit -c unlimited` in linux). Then you'll be able to examine the stack and see which function threw the exception.
    Last edited by synackfin; 01/07/2010 at 09:41 PM. Reason: minor edit
  3. #3  
    Okay, I'm not the original poster, but I did the same thing, got the same error, and tried what you recommended. Here's the GDB backtrace, unfortunately I don't understand the cause based on this.

    Also, dosbox appears to be c++ based on the files named *.cpp and using the g++ compiler to build, but maybe I'm missing something?

    root@castle:/var/home/root# gdb dosbox --core core
    GNU gdb 6.8
    Copyright (C) 2008 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "arm-none-linux-gnueabi"...
    Reading symbols from /usr/lib/libgoodabort.so...done.
    Loaded symbols for /usr/lib/libgoodabort.so
    Reading symbols from /usr/lib/libSDL-1.2.so.0...done.
    Loaded symbols for /usr/lib/libSDL-1.2.so.0
    Reading symbols from /lib/libpthread.so.0...done.
    Loaded symbols for /lib/libpthread.so.0
    Reading symbols from /usr/lib/libstdc++.so.6...done.
    Loaded symbols for /usr/lib/libstdc++.so.6
    Reading symbols from /lib/libm.so.6...done.
    Loaded symbols for /lib/libm.so.6
    Reading symbols from /lib/libgcc_s.so.1...done.
    Loaded symbols for /lib/libgcc_s.so.1
    Reading symbols from /lib/libc.so.6...done.
    Loaded symbols for /lib/libc.so.6
    Reading symbols from /lib/libdl.so.2...done.
    Loaded symbols for /lib/libdl.so.2
    Reading symbols from /usr/lib/libnapp.so...done.
    Loaded symbols for /usr/lib/libnapp.so
    Reading symbols from /usr/lib/libPiranha.so...done.
    Loaded symbols for /usr/lib/libPiranha.so
    Reading symbols from /usr/lib/libpalmvibe.so...done.
    Loaded symbols for /usr/lib/libpalmvibe.so
    Reading symbols from /lib/ld-linux.so.3...done.
    Loaded symbols for /lib/ld-linux.so.3
    Reading symbols from /usr/lib/libLunaSysMgrIpc.so...done.
    Loaded symbols for /usr/lib/libLunaSysMgrIpc.so
    Reading symbols from /usr/lib/liblunaservice.so...done.
    Loaded symbols for /usr/lib/liblunaservice.so
    Reading symbols from /usr/lib/libfreetype.so.6...done.
    Loaded symbols for /usr/lib/libfreetype.so.6
    Reading symbols from /usr/lib/libgthread-2.0.so.0...done.
    Loaded symbols for /usr/lib/libgthread-2.0.so.0
    Reading symbols from /lib/librt.so.1...done.
    Loaded symbols for /lib/librt.so.1
    Reading symbols from /usr/lib/libglib-2.0.so.0...done.
    Loaded symbols for /usr/lib/libglib-2.0.so.0
    Reading symbols from /usr/lib/libmjson.so...done.
    Loaded symbols for /usr/lib/libmjson.so
    Reading symbols from /usr/lib/libcjson.so...done.
    Loaded symbols for /usr/lib/libcjson.so
    Reading symbols from /usr/lib/libdbus-1.so.3...done.
    Loaded symbols for /usr/lib/libdbus-1.so.3
    Reading symbols from /usr/lib/libgdbus.so.0...done.
    Loaded symbols for /usr/lib/libgdbus.so.0
    Reading symbols from /usr/lib/libasound.so.2...done.
    Loaded symbols for /usr/lib/libasound.so.2
    Reading symbols from /usr/lib/alsa-lib/libasound_module_pcm_pulse.so...done.
    Loaded symbols for /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
    Reading symbols from /usr/lib/libpulse.so.0...done.
    Loaded symbols for /usr/lib/libpulse.so.0
    Core was generated by `./dosbox'.
    Program terminated with signal 11, Segmentation fault.
    [New process 26465]
    [New process 26470]
    [New process 26469]
    [New process 26468]
    [New process 26466]
    #0 0x3557b480 in abort () from /usr/lib/libgoodabort.so
    (gdb) backtrace
    #0 0x3557b480 in abort () from /usr/lib/libgoodabort.so
    #1 0x35700844 in __gnu_cxx::__verbose_terminate_handler ()
    from /usr/lib/libstdc++.so.6
    #2 0x00258688 in ticksScheduled ()
    Backtrace stopped: frame did not save the PC
  4. #4  
    By the way, I noticed that libSDL is written in C++: LibSDL Research - WebOS Internals

    If you notice, the files are ".cc" instead of ".c" - that indicates C++ code. So, most likely, a C++ exception is being thrown from within libSDL
  5. #5  
    hey there!

    anyone made any progress on a palm pre port of dosbox?
  6. #6  
    Has anyone figured this out. I saw a nokia running Day of the Tentacle and I've never been more jealous in my life.
  7. #7  
    For Adventures like DOTT you better use ScummVM than Dosbox... there is a scummvm port for the pre but it wasnt updated in a long time and has some problems with 1.4.5 i think

Posting Permissions