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

Can't run example 01 #35

Open
dcharles525 opened this issue Jun 5, 2020 · 4 comments
Open

Can't run example 01 #35

dcharles525 opened this issue Jun 5, 2020 · 4 comments

Comments

@dcharles525
Copy link

dcharles525 commented Jun 5, 2020

Not sure why but I can't get it to run any of the examples, however I can start gngeo with no game loaded.

Edit: I should also mention I am running Ubuntu 18.04

/examples/01-helloworld$  make gngeo
/usr/bin/ngdevkit-gngeo -b glsl --shaderpath="/mnt/6caf58d5-d873-41ac-930d-63ff042b1cad/Code/examples/shaders" --shader="qcrt-flat.glslp" --scale 3 --no-resize -i rom puzzledp
Option rompath
c=98
flags blitter set on cmd line
c=83
flags shaderpath set on cmd line
c=272
flags shader set on cmd line
c=282
flags scale set on cmd line
c=4369
flags resize set on cmd line
c=105
flags rompath set on cmd line
Using GL: 3.2.0 NVIDIA 440.59
Loading GLSL preset /mnt/6caf58d5-d873-41ac-930d-63ff042b1cad/Code/examples/shaders/qcrt-flat.glslp
Initializing a 3-passes shader pipeline
Linked shader program: shaders/qcrt-sharpen-ghost-intensity.glsl
Linked shader program: shaders/qcrt-aperture_grille-s_intensity.glsl
Linked shader program: shaders/qcrt-scanlines.glsl
Pass 0 output texture size: 304 x 224
Pass 1 output texture size: 896 x 224
Pass 2 output texture size: 896 x 672
CURSOR=1
CURSOR=0
Get mapid A
Get mapid B
Get mapid C
Get mapid D
Get mapid START
Get mapid COIN
Get mapid UP
Get mapid DOWN
Get mapid LEFT
Get mapid RIGHT
Get mapid MENU
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=126265 
STBILOAD 0x5607613c7cb0 304 224 4 1216
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=33898 
STBILOAD 0x5607611a7870 605 14 4 2420
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=33898 
STBILOAD 0x5607613a8f60 605 14 4 2420
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=33898 
STBILOAD 0x5607613b13c0 605 14 4 2420
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=33898 
STBILOAD 0x5607613b9820 605 14 4 2420
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=33898 
STBILOAD 0x56076140a4c0 605 14 4 2420
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=33898 
STBILOAD 0x560761412920 605 14 4 2420
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=69626 
STBILOAD 0x56076142bd90 1243 14 4 4972
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=69626 
STBILOAD 0x56076143cd80 1243 14 4 4972
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=69626 
STBILOAD 0x56076144dd70 1243 14 4 4972
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=69626 
STBILOAD 0x56076145ed60 1243 14 4 4972
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=69626 
STBILOAD 0x56076146fd50 1243 14 4 4972
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=69626 
STBILOAD 0x560761480d40 1243 14 4 4972
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=2540 
STBILOAD 0x5607611afcd0 32 32 4 128
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=2455 
STBILOAD 0x5607611b0ce0 32 32 4 128
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=2861 
STBILOAD 0x5607613c1c80 32 32 4 128
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=2826 
STBILOAD 0x5607613c2c90 32 32 4 128
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=12237 
STBILOAD 0x5607611a08d0 75 67 4 300
DATAFILE = /usr/share/ngdevkit-gngeo/gngeo_data.zip
Readed=1263 
STBILOAD 0x56076141ad80 75 90 4 300
AA Blitter glsl effect none
CURSOR=0
CURSOR=0
BBB Blitter glsl effect none
Loading rom/puzzledp.zip
Allocating 0x00100000 byte for Region 8
Allocating 0x00020000 byte for Region 1
Allocating 0x00200000 byte for Region 9
Allocating 0x00020000 byte for Region 6
Allocating 0x00001000 byte for Region 11
Allocating 0x00080000 byte for Region 3
Allocating 0x00000000 byte for Region 4
BIOS SIZE 00000000 00000000 00000000
Trying to load file 202-p1.bin        in region 8
Catch a sigsegv
Load file 202-p1.bin        in region 8: OK 
Trying to load file 202-s1.bin        in region 6
Load file 202-s1.bin        in region 6: OK 
Trying to load file 202-m1.bin        in region 1
Load file 202-m1.bin        in region 1: OK 
Trying to load file 202-v1.bin        in region 3
../Makefile.common:101: recipe for target 'gngeo' failed
make: *** [gngeo] Error 255
@dciabrin
Copy link
Owner

dciabrin commented Jun 5, 2020

I wonder if the GLSL backend could be the cause of the crash here.
Can you try to run the example with the soft blitter instead and see if the crash goes away?

/usr/bin/ngdevkit-gngeo -b soft --scale 3 --no-resize -i rom puzzledp

Also, in any case, could you give me a stack trace of where the crash is happening, with:

gdb --args /usr/bin/ngdevkit-gngeo -b glsl --shaderpath="/mnt/6caf58d5-d873-41ac-930d-63ff042b1cad/Code/examples/shaders" --shader="qcrt-flat.glslp" --scale 3 --no-resize -i rom puzzledp
run
bt

@dcharles525
Copy link
Author

@dciabrin The first command worked! Thank you!

Here is the stack trace:

#0  0x00007ffff65070c9 in ?? () from /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0
#1  0x000055555560eaae in ?? ()
#2  0x000055555559fbb8 in ?? ()
#3  0x00007ffff7099d7c in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#4  0x00007ffff710f0f9 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#5  0x00007ffff62ad6db in start_thread (arg=0x7fffeb6af700) at pthread_create.c:463
#6  0x00007ffff6acd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

@dciabrin
Copy link
Owner

dciabrin commented Jun 5, 2020

@dciabrin The first command worked! Thank you!

Good to know.

Here is the stack trace:

Ok that definitely looks like the the way gngeo uses threads doesn't play nicely with the nvidia GL driver. It's going to be painful for me to replicate as I don't have an nvidia card around. But just to confirm the theory, can you give me a stack trace of all the threads running at the time:

 gdb --args /usr/bin/ngdevkit-gngeo -b glsl --shaderpath="/mnt/6caf58d5-d873-41ac-930d-63ff042b1cad/Code/examples/shaders" --shader="qcrt-flat.glslp" --scale 3 --no-resize -i rom puzzledp
run
thread apply all bt

I suspect that the thread that created the GL context is not the one which performs the rendering, or something along those lines.

@dcharles525
Copy link
Author

No worries if it can't be fixed, assuming I can use the other command it should work just fine for me exploring the Neo Geo. :)

This is the output I got:

Thread 2 (Thread 0x7fffeb6af700 (LWP 31434)):
#0  0x00007ffff65070c9 in ?? () from /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0
#1  0x000055555560eaae in ?? ()
#2  0x000055555559fbb8 in ?? ()
#3  0x00007ffff7099d7c in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#4  0x00007ffff710f0f9 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#5  0x00007ffff62ad6db in start_thread (arg=0x7fffeb6af700) at pthread_create.c:463
#6  0x00007ffff6acd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7ffff7fb87c0 (LWP 31430)):
#0  0x00007ffff6a2b489 in __GI__IO_fread (buf=0x7fffffffd6a9, size=1, count=1, fp=0x555556199690)
    at iofread.c:37
#1  0x0000555555597331 in ?? ()
#2  0x00005555555a4b9c in ?? ()
#3  0x00005555555ab0b0 in ?? ()
#4  0x00005555555ab6db in ?? ()
#5  0x00005555555af5b5 in ?? ()
#6  0x00005555555797ea in main ()

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

2 participants