-
Notifications
You must be signed in to change notification settings - Fork 90
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 in Pong example #19
Comments
Hi, I see in the first comment that your version of sfml is the 2.0, have you try with the 2.1? According to this issue : #10 and this issue rust-lang/rust#11198, it seems that there is a problem with the byte code created by llvm with some kind of struct using the ffi. Maybe the problem is the same on your platform, the error was at the same place for these person (call to the function render_window::clear()). I test rsfml + rust on Mac os x and Fedora 20 and i have no problem. Maybe you can try this test : https://gist.github.com/krzat/8175981. |
Sorry, I was a little bit busy this week, I'am going to test with SFML2.1 and CSFML2.1. ;) Ok. No problem with version 2.1. Could you update the readme for other user? =) |
So SFML work for you with the version 2.1? We can close this issue? The readme is up to date. |
Yep it's perfect. It work on ubuntu 12.04.03 with SFML2.1 and CSFML2.1 installed by hand. |
Okay cool ! I've made a branch with a different API to handle the ressources(remove the borrow pointers to the resources and us Rc), if you use the binding and have an opinion about this, be free to tell me ! |
Hello!
When i execute pong in ./bin after compiling it i get a segfault. :x
Ubuntu-12.04.03
Rust version 0.9
SFML :2.0
Csfml: 2.0
Installed with instruction found in .travis.yml
Gdb stuff :
(gdb) run
Starting program: /home/darnuria/libs/rust-sfml/bin/pong
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7fbe700 (LWP 12696)]
[New Thread 0x7fffee37b700 (LWP 12697)]
[New Thread 0x7fffee27a700 (LWP 12698)]
[New Thread 0x7fffee179700 (LWP 12699)]
[New Thread 0x7fffee078700 (LWP 12700)]
[New Thread 0x7fffedf77700 (LWP 12701)]
[New Thread 0x7fffede76700 (LWP 12702)]
[New Thread 0x7fffedd75700 (LWP 12703)]
24
[New Thread 0x7fffcfbc9700 (LWP 12704)]
[Thread 0x7fffcfbc9700 (LWP 12704) exited]
[New Thread 0x7fffcfbc9700 (LWP 12705)]
[New Thread 0x7fffcf3c8700 (LWP 12706)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fbe700 (LWP 12696)]
0x00007ffff3f60cac in sf::RenderTarget::clear(sf::Color const&) () from /usr/local/lib/libsfml-graphics.so.2
(gdb) s
Single stepping until exit from function _ZN2sf12RenderTarget5clearERKNS_5ColorE,
which has no line number information.
[Thread 0x7fffcfbc9700 (LWP 12705) exited]
[Thread 0x7fffcf3c8700 (LWP 12706) exited]
[Thread 0x7fffedd75700 (LWP 12703) exited]
[Thread 0x7fffede76700 (LWP 12702) exited]
[Thread 0x7fffedf77700 (LWP 12701) exited]
[Thread 0x7fffee078700 (LWP 12700) exited]
[Thread 0x7fffee179700 (LWP 12699) exited]
[Thread 0x7fffee27a700 (LWP 12698) exited]
[Thread 0x7fffee37b700 (LWP 12697) exited]
[Thread 0x7ffff7fbe700 (LWP 12696) exited]
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
More human readeable llvb-3.3 stuff :
darnuria@firestone:master$ lldb-3.3 ./pong
Current executable set to './pong' (x86_64).
(lldb) run
Process 14367 launched: './pong' (x86_64)
24
Process 14367 stopped
sf::RenderTarget::clear(sf::Color const&) + 12, stop reason = invalid address frame #0: 0x00007fca6888ccac libsfml-graphics.so.2
sf::RenderTarget::clear(sf::Color const&) + 12libsfml-graphics.so.2`sf::RenderTarget::clear(sf::Color const&) + 12:
-> 0x7fca6888ccac: callq *24(%rax)
0x7fca6888ccaf: testb %al, %al
0x7fca6888ccb1: jne 0x7fca6888ccb8 ; sf::RenderTarget::clear(sf::Color const&) + 24
0x7fca6888ccb3: popq %rbx
(lldb)
The text was updated successfully, but these errors were encountered: