SFML community forums

Help => Window => Topic started by: Anonymouseable on August 11, 2013, 09:12:34 pm

Title: [FIXED] Segfault in sf::Window::pollEvent
Post by: Anonymouseable on August 11, 2013, 09:12:34 pm
Hi,
SFML seems to be having some trouble asking Mac OS for joystick information... I'll just leave you with this stacktrace (the window and event objects are should be valid).
Code: [Select]
#0  0x00007fff8fc90250 in objc_msgSend ()
#1  0x00000001000fce18 in typeinfo for sf::GlResource ()
#2  0x00007fff8f2a4602 in __CFRunLoopModeIsEmpty ()
#3  0x00007fff8f2c8037 in CFRunLoopRunSpecific ()
#4  0x00000001000dd934 in sf::priv::HIDJoystickManager::update (this=0x1000fdeb0) at /Users/linus/Programming/SFML/src/SFML/Window/OSX/HIDJoystickManager.cpp:127
#5  0x00000001000dd8e9 in sf::priv::HIDJoystickManager::getJoystickCount (this=0x1000fdeb0) at /Users/linus/Programming/SFML/src/SFML/Window/OSX/HIDJoystickManager.cpp:58
#6  0x00000001000ddc9e in sf::priv::JoystickImpl::isConnected (index=0) at /Users/linus/Programming/SFML/src/SFML/Window/OSX/JoystickImpl.cpp:87
#7  0x00000001000d046a in sf::priv::JoystickManager::update (this=0x1000fcf48) at /Users/linus/Programming/SFML/src/SFML/Window/JoystickManager.cpp:80
#8  0x00000001000d60c5 in sf::priv::WindowImpl::processJoystickEvents (this=0x1013104d0) at /Users/linus/Programming/SFML/src/SFML/Window/WindowImpl.cpp:148
#9  0x00000001000d5f9e in sf::priv::WindowImpl::popEvent (this=0x1013104d0, event=@0x7fff5fbff988, block=false) at /Users/linus/Programming/SFML/src/SFML/Window/WindowImpl.cpp:105
#10 0x00000001000d537c in sf::Window::pollEvent (this=0x7fff5fbffa90, event=@0x7fff5fbff988) at /Users/linus/Programming/SFML/src/SFML/Window/Window.cpp:186
#11 0x0000000100003f3b in Sim::run (this=0x7fff5fbffa30) at /Users/linus/programming/swarmers-v3/Sim.cpp:65
#12 0x0000000100002ec9 in main () at /Users/linus/programming/swarmers-v3/main.cpp:7

Thanks in advance to anyone who can help me!
I'm also taking a look at the problem but am not expecting to find out much (I'm not in the slightest experienced with Objective-C and the Mac OS APIs).

Notes:
Title: Re: [OSX] Segfault in sf::Window::pollEvent
Post by: Anonymouseable on August 12, 2013, 01:43:30 pm
UPDATE: Turns out I was corrupting my window... My bad.

[on a side note, GO VALGRIND]