Skip to content

Segfault in Pong example #19

@darnuria

Description

@darnuria

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

  • thread Changes for mutability safety and rustyness #2: tid = 0x3823, 0x00007fca6888ccac libsfml-graphics.so.2sf::RenderTarget::clear(sf::Color const&) + 12, stop reason = invalid address frame #0: 0x00007fca6888ccac libsfml-graphics.so.2sf::RenderTarget::clear(sf::Color const&) + 12
    libsfml-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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions