Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault on Raspberry Pi #39

Open
htruong opened this issue Jan 7, 2018 · 1 comment
Open

Segfault on Raspberry Pi #39

htruong opened this issue Jan 7, 2018 · 1 comment

Comments

@htruong
Copy link

htruong commented Jan 7, 2018

I'm trying to compile your branch on Raspberry Pi Zero.

SDL2 2.0.7 (latest) was compiled per instructions here:

https://solarianprogrammer.com/2015/01/22/raspberry-pi-raspbian-getting-started-sdl-2/

The SDL2 example runs fine on OpenGL ES.

BasiliskII was compiled with

./configure --enable-sdl-audio --enable-sdl-framework --enable-sdl-video --disable-vosf --without-mon --without-esd --without-gtk --disable-nls

I transferred a working Mac image to the Pi.

$ ./BasiliskII 
Basilisk II V1.0 by Christian Bauer et al.                                                                                                                                                   
Reading ROM file...                                                                                                                                                                          
WARNING: Cannot open /dev/cdrom (No such file or directory)                                                                                                                                  
Using SDL/alsa audio output                                                                                                                                                                  
Using SDL_Renderer driver: opengles2                                                                                                                                                         
VOSF acceleration is not profitable on this platform, disabling it                                                                                                                           
Segmentation fault

There was a mouse cursor on the left of the screen, seems like SDL2 initialized fine.

$ gdb --args ./BasiliskII 
GNU gdb (Raspbian 7.12-6) 7.12.0.20161007-git
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./BasiliskII...done.
(gdb) run
Starting program: /home/pi/development/macemu/BasiliskII/src/Unix/BasiliskII 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Basilisk II V1.0 by Christian Bauer et al.
[New Thread 0xb6b01450 (LWP 652)]
[New Thread 0xb61ff450 (LWP 653)]
[New Thread 0xb59ff450 (LWP 654)]
[New Thread 0xb51ff450 (LWP 655)]
[New Thread 0xb48f5450 (LWP 656)]
Reading ROM file...
WARNING: Cannot open /dev/cdrom (No such file or directory)
[New Thread 0xafdff450 (LWP 657)]
Using SDL/alsa audio output
Using SDL_Renderer driver: opengles2

Thread 1 "BasiliskII" received signal SIGSEGV, Segmentation fault.
video_vosf_profitable (duration_p=0x0, n_page_faults_p=0x0)
    at ./../CrossPlatform/video_vosf.h:251
251                                     addr[0] = 0; // Trigger Screen_fault_handler()

(gdb) print addr
$1 = (uint8 *) 0xaf00a000 ""

I wonder if you have any idea what it was? I was able to compile and run it on my laptop, BTW.

@htruong
Copy link
Author

htruong commented Jan 7, 2018

I see, somehow the configure script doesn't honor --disable-vosf or --enable-vosf=false.

Changed the config.h to comment out ENABLE_VOSF solves the problem... I wonder why the configure script does that though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant