Coder Social home page Coder Social logo

Segmentation fault upon launch about pokegb HOT 6 CLOSED

binji avatar binji commented on June 8, 2024 1
Segmentation fault upon launch

from pokegb.

Comments (6)

binji avatar binji commented on June 8, 2024 1

@yaakov-h yeah, that's the same issue as #1. Seems like the simplest workaround is to create an empty 32768 byte file called rom.sav, but it'd be nice to fix.

from pokegb.

jmcph4 avatar jmcph4 commented on June 8, 2024 1

Did you put the pokemon rom in a file called rom.gb in the same directory? Without that it won't work.

That would help! Solved this issue for me, so I'm willing to mark as closed.

from pokegb.

yaakov-h avatar yaakov-h commented on June 8, 2024

I got the same thing after compiling on macOS:

yaakov@Ilum pokegb % clang++ pokegb.cc -I/opt/homebrew/include -lsdl2 -L/opt/homebrew/lib -o pokegb 
pokegb.cc:20:72: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
                     using z=                                          uint8_t;                                          using Z=
                                                                       ^
pokegb.cc:21:17: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
                uint16_t;using I=                                 int;z o,m,u,x,c,n,                                 *r0,*r1,i[512],v
                ^
pokegb.cc:21:67: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
                uint16_t;using I=                                 int;z o,m,u,x,c,n,                                 *r0,*r1,i[512],v
                                                                  ^
pokegb.cc:31:45: warning: non-void function does not return a value in all control paths [-Wreturn-type]
    12 ...14:a&=16383;if(w)r4[a]=x;K r4[a];}}z        r(Z a=H){K me(a,0,0);}void w(z x,Z a=H){me        (a,x,1);}void f(z M,I Z,I N,I H,I C){F=(F&
                                            ^
4 warnings generated.
yaakov@Ilum pokegb % ./pokegb 
zsh: segmentation fault  ./pokegb

I would assume that it is the same segmentation fault, though I have no way to tell.

from pokegb.

binji avatar binji commented on June 8, 2024

Did you put the pokemon rom in a file called rom.gb in the same directory? Without that it won't work.

from pokegb.

LF-Lin avatar LF-Lin commented on June 8, 2024

Maybe you can try this:
Google Pokemon blue version rom, and download a file with .gb, then rename it to rom.gb

from pokegb.

yaakov-h avatar yaakov-h commented on June 8, 2024

ah, I had the filename wrong.

After fixing that it now segfaults about 15 seconds in, right after the Jigglypuff headbutts Gengar and the screen fades to white.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   pokegb                        	0x0000000102a019f0 me(unsigned short, unsigned char, int) + 240
1   pokegb                        	0x0000000102a02788 main + 2888
2   pokegb                        	0x0000000102a02788 main + 2888
3   libdyld.dylib                 	0x000000019ff2d450 start + 4

from pokegb.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.