![]() |
|
Mouse problems in Allegro 4.9.8 |
kenmasters1976
Member #8,794
July 2007
|
I'm writing some simple programs to learn the new API and I have this problem: al_get_mouse_state() keeps crashing on my machine. I've been trying to spot the problem and compared the code practically line to line with the one in ex_mouse_focus.c and found that the only difference was the creation of one more ALLEGRO_DISPLAY. If I create two ALLEGRO_DISPLAYs, the program no longer crashes on al_get_mouse_state(). If I create only one ALLEGRO_DISPLAY and use al_get_mouse_state(), the program crashes. Anyone else has this problem? or is there something wrong with my Allegro 4.9.8 setup?. Thanks.
|
Evert
Member #794
November 2000
![]() |
What platform are you using? |
kenmasters1976
Member #8,794
July 2007
|
I'm using MinGW on Windows XP. I reduced the program down to this:
This code crashes, but if I uncomment the lines for display2, the program runs fine.
|
Trent Gamblin
Member #261
April 2000
![]() |
The program doesn't crash here for me (MinGW/Vista). Could you provide a backtrace or any other useful info you can get?
|
kenmasters1976
Member #8,794
July 2007
|
Sorry, I'll find out how to do a backtrace and post back. I've tried compiling the program with the complete binary package in allegro5.org installed and it keeps crashing, so I think it might be a problem with my drivers or something. [EDIT:] I don't know how to do a proper bakctrace. I've tried some simple instructions I found, but this is all I get: Quote:
GNU gdb 6.8 Program received signal SIGSEGV, Segmentation fault. On the other hand, the program doesn't crash if compiled with the 4.9.7 binary package. [EDIT 2:] I built the debug lib on my machine 'cause it doesn't come with the binary package. Here's what I get now: Quote:
GNU gdb 6.8 Program received signal SIGSEGV, Segmentation fault. And this is the content of the allegro.log file: Quote:
ALLEGRO_SYSTEM_INTERFACE created. I understand that the fault may be on my side, so I'm posting this just in case it's useful for the Allegro 5 devs.
|
Don Freeman
Member #5,110
October 2004
![]() |
I am having the same issues with it (the mouse state) too using Visual Studio 2008 Pro on Vista. My other post is here. I have not tried to create another display to see if that helps, but I guess it can't hurt. The funny thing is, is that it doesn't crash every time...seems to be random. I can only guess something screwy in the mouse code.:-/ I'll try and take a look in the source to see if I can figure out what the hell is going on.:'(
Edit2: -- |
Milan Mimica
Member #3,877
September 2003
![]() |
I've fixed this in SVN after 4.9.8 come out.
-- |
Don Freeman
Member #5,110
October 2004
![]() |
Sorry, didn't notice that. It works perfectly now.:D -- |
|