You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used to work with SDL-1.3.0-4786, but the cartesian directions for haptic
effects don't work there. (the direction datatype was an Uint16, somebody
discovered that already and changed it to Sint - Thx for that!!!)
But now the problem: I discovered it first in Version SDL-1.3.0-5179 but it
still exists in SDL-1.3.0-5358 (and i need to use the current version now to
get the cartesian directions working).
On Windows everything works fine. But on Linux my program behaves very weird
and then it crashes. I'm quite sure that the problem lies within SDL.
The weird behaviour: my joysticks usually have several axes and hats, but now I
only see ONE axis, no hats and the buttons don't work either. So probably it
does not have to do with SDL_haptic, because the input does not work either.
After only a few movements or button-presses the program crashes. I attached
the Java Error log-File.
I tried, but I don't really know much about SDL except about joystick input and
haptic, so I could not find the problem. Hopefully somebody can fix the
problem...
All the best,
elboato
On 2009-12-14 23:54:43 +0000, Sam Lantinga wrote:
Is there any chance I can log in to remote debug this? It sounds like SDL isn't picking up your joystick properly. Please send me private e-mail at slouken@libsdl.org if this is possible.
Thanks!
On 2009-12-15 03:52:54 +0000, wrote:
Or did I maybe just make a mistake when I was updating to the newer Version?
I ran 'make uninstall' to uninstall the old version and installed the new one with 'configure', 'make', and 'make install'....
On 2009-12-15 12:19:16 +0000, Edgar Simo wrote:
Could you recompile SDL with debug symbols and try to generate a new "Java Error Log File" please?
On 2009-12-16 03:16:04 +0000, wrote:
(In reply to comment # 3)
Could you recompile SDL with debug symbols and try to generate a new "Java
Error Log File" please?
How exactly should I do that?
In the makefile generated from configure there's a line 'CFLAGS = -g -O2' and '$(CFLAGS)' is there in every line that compiles one file...
Thx in advance!
elboato
On 2009-12-16 11:31:55 +0000, Edgar Simo wrote:
Mmm, I thought SDL had a --enable-debug or the likes in the configure script. Anyhow, you'll need to get rid of the -O2 flag and only keep the -g. I've been seeing this quite a lot lately, however using -O2 makes a backtrace not nearly as informative as it should be. Your Java Error Log File seems to have a backtrace in it, it would be extremely interesting to get the file and line numbers of where the crash actually happens as it would help me a lot in figuring it out. Try removing the -O2 stuff (not entirely sure what the proper way is) and it should enable line numbers. However looking at the backtrace a bit more I see it doesn't mention haptic at all, however that doesn't mean it might be an issue.
On 2009-12-16 11:33:35 +0000, Edgar Simo wrote:
Oh, forgot to mention, try running the haptic tests (test/testhaptic). It would be interested to know it's output and whether or not it rumbles as appropriate.
On 2009-12-16 13:00:32 +0000, wrote:
(In reply to comment # 6)
Oh, forgot to mention, try running the haptic tests (test/testhaptic). It would
be interested to know it's output and whether or not it rumbles as appropriate.
As i supposed: Rumble works fine with testhaptic, as it does with my java program.
On 2009-12-16 13:39:48 +0000, wrote:
(In reply to comment # 5)
Mmm, I thought SDL had a --enable-debug or the likes in the configure script.
Anyhow, you'll need to get rid of the -O2 flag and only keep the -g. I've been
seeing this quite a lot lately, however using -O2 makes a backtrace not nearly
as informative as it should be. Your Java Error Log File seems to have a
backtrace in it, it would be extremely interesting to get the file and line
numbers of where the crash actually happens as it would help me a lot in
figuring it out. Try removing the -O2 stuff (not entirely sure what the proper
way is) and it should enable line numbers. However looking at the backtrace a
bit more I see it doesn't mention haptic at all, however that doesn't mean it
might be an issue.
So the problem definitely has got nothing to do with haptics. Both gamepads should have 4 axes and 1 hat.
And I think my Java program only crashes
A) when I use the hat of the gamepad, or
B) sometimes immediately after starting (before i get the chance press anything).
Here's another output: (parameter 1)
Buttons seem to work, that 1 axis works also. And as soon as i use the POV: segmentation fault.
Program received signal SIGSEGV, Segmentation fault.
HandleHat (joystick=0x8064898) at src/joystick/linux/SDL_sysjoystick.c:946
946 if (value != the_hat->axis[axis]) {
Current language: auto
The current source language is "auto; currently c".
(gdb) bt full
0 HandleHat (joystick=0x8064898) at src/joystick/linux/SDL_sysjoystick.c:946
at src/joystick/linux/SDL_sysjoystick.c:1120
events = {{time = {tv_sec = 1261001758, tv_usec = 482099}, type = 3,
code = 1, value = 136}, {time = {tv_sec = 1261001758,
tv_usec = 482107}, type = 3, code = 17, value = -1}, {time = {
tv_sec = 1261001758, tv_usec = 482116}, type = 0, code = 0,
value = 0}, {time = {tv_sec = 134613016, tv_usec = -1073746088},
type = 28505, code = 95, value = 134539320}, {time = {
tv_sec = 55582, tv_usec = -1073746116}, type = 61240,
code = 49151, value = 134529032}, {time = {tv_sec = 16166900,
tv_usec = 1561470}, type = 52565, code = 124, value = 2735383}, {
time = {tv_sec = 8846804, tv_usec = 0}, type = 49140, code = 390,
value = 8839616}, {time = {tv_sec = 134539320, tv_usec = 0},
type = 61244, code = 49151, value = -1073746120}, {time = {
tv_sec = 21, tv_usec = 0}, type = 53541, code = 37,
value = 134539408}, {time = {tv_sec = 8, tv_usec = 0},
type = 27494, code = 95, value = 16}, {time = {tv_sec = 0,
tv_usec = 2429856}, type = 8180, code = 110, value = 134537800},
{time = {tv_sec = -1073745004, tv_usec = -1073746056}, type = 30918,
code = 95, value = 0}, {time = {tv_sec = 0,
tv_usec = -1073746040}, type = 8180, code = 110,
value = 7217140}, {time = {tv_sec = 134537800,
tv_usec = -1073746024}, type = 31065, code = 95,
value = 134537800}, {time = {tv_sec = 1, tv_usec = 0},
type = 1447, code = 94, value = 7217140}, {time = {
tv_sec = 134537800, tv_usec = -1073745992}, type = 65441,
code = 92, value = 134537800}, {time = {tv_sec = 134543532,
tv_usec = 134543556}, type = 49140, code = 134,
value = 134537800}, {time = {tv_sec = -1073745004,
tv_usec = -1073745960}, type = 36085, code = 132,
value = 134537800}, {time = {tv_sec = 0, tv_usec = 0},
type = 22861, code = 29, value = 8830964}, {time = {
tv_sec = 134537800, tv_usec = -1073745776}, type = 49550,
code = 132, value = 6}, {time = {tv_sec = -1073745904,
tv_usec = 0}, type = 0, code = 0, value = 8878340}, {time = {
tv_sec = -1073745700, tv_usec = -1073745864}, type = 55112,
code = 37, value = 134539208}, {time = {tv_sec = 1557014,
tv_usec = -1073745832}, type = 61456, code = 49151, value = 0}, {
time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0, value = 0}, {
time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0, value = 0}, {
time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0, value = 0}, {
time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0, value = 0}, {
time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0, value = 0}, {
time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0, value = 0}, {
time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0, value = 0}, {
time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0,
value = -1073745556}, {time = {tv_sec = 8830964,
tv_usec = -1073745480}, type = 49140, code = 134, value = 0}}
i = 1
len = <value optimized out>
code = <value optimized out>
2 SDL_SYS_JoystickUpdate (joystick=0x8064898)
at src/joystick/linux/SDL_sysjoystick.c:1163
i = <value optimized out>
3 0x00841e40 in SDL_JoystickUpdate () at src/joystick/SDL_joystick.c:568
No locals.
4 0x007f5d17 in SDL_PumpEvents () at src/events/SDL_events.c:374
_this = <value optimized out>
5 0x007f60ea in SDL_WaitEventTimeout (event=0xbffff394, timeout=0)
at src/events/SDL_events.c:403
expiration = 0
6 0x007f61b5 in SDL_PollEvent (event=0xbffff394)
at src/events/SDL_events.c:385
No locals.
7 0x08048ea8 in WatchJoystick (joystick=0x8064898) at ./testjoystick_new.c:50
screen = 0x8060be8
i = 0
done = 0
y = 134629576
draw = 0
axis_area = {{{x = 0, y = 0, w = 0, h = 0}, {x = 0, y = 0, w = 0,
h = 0}}, {{x = 0, y = 0, w = 0, h = 0}, {x = 0, y = 0, w = 0,
h = 0}}, {{x = 0, y = 0, w = 0, h = 0}, {x = 0, y = 0, w = 0,
h = 0}}, {{x = 0, y = 0, w = 0, h = 0}, {x = 0, y = 0, w = 0,
h = 0}}, {{x = 0, y = 0, w = 0, h = 0}, {x = 0, y = 0, w = 0,
h = 0}}, {{x = 0, y = 0, w = 0, h = 0}, {x = 0, y = 0, w = 0,
h = 0}}}
name = 0x8779e0 "Logitech WingMan RumblePad"
event = {type = 1 '\001', window = {type = 1 '\001', windowID = 1,
event = 3 '\003', data1 = 0, data2 = 0}, key = {type = 1 '\001',
windowID = 1, which = 3 '\003', state = 8 '\b', keysym = {
scancode = SDL_SCANCODE_UNKNOWN, sym = 0, mod = 0,
unicode = 134537800}}, edit = {type = 1 '\001',
text = "\000\000\000\001\000\000\000\003\b\006\b", '\000' <repeats 12 times>, "H\342\004\b\364\037n\000H", start = -1073745672, length = 8830964},
text = {type = 1 '\001', windowID = 1, which = 3 '\003',
text = "\b\006\b", '\000' <repeats 12 times>, "H\342\004\b\364\037n\000H\342\004\b\370\360\377\277", <incomplete sequence \364>}, motion = {
type = 1 '\001', windowID = 1, which = 3 '\003', state = 8 '\b',
x = 0, y = 0, z = 0, pressure = 134537800, pressure_max = 7217140,
pressure_min = 134537800, rotation = -1073745672, tilt = 8830964,
cursor = 134625472, xrel = -1073745460, yrel = -1073745752},
button = {type = 1 '\001', windowID = 1, which = 3 '\003',
button = 8 '\b', state = 6 '\006', x = 0, y = 0}, wheel = {
type = 1 '\001', windowID = 1, which = 3 '\003', x = 0, y = 0},
jaxis = {type = 1 '\001', which = 0 '\000', axis = 0 '\000',
value = 1}, jball = {type = 1 '\001', which = 0 '\000',
ball = 0 '\000', xrel = 1, yrel = 134612995}, jhat = {
type = 1 '\001', which = 0 '\000', hat = 0 '\000',
value = 0 '\000'}, jbutton = {type = 1 '\001', which = 0 '\000',
button = 0 '\000', state = 0 '\000'}, quit = {type = 1 '\001'},
user = {type = 1 '\001', windowID = 1, code = 134612995,
data1 = 0x0, data2 = 0x0}, syswm = {type = 1 '\001', msg = 0x1},
proximity = {type = 1 '\001', windowID = 1, which = 3 '\003',
cursor = 0, x = 0, y = 0}, active = {type = 1 '\001',
gain = 0 '\000', state = 0 '\000'}, resize = {type = 1 '\001',
w = 1, h = 134612995}}
x = -1073744984
8 0x080493af in main (argc=2, argv=0xbffff4d4) at ./testjoystick_new.c:187
name = 0x8779e0 "Logitech WingMan RumblePad"
i = 2
joystick = 0x8064898
On 2009-12-16 14:31:45 +0000, wrote:
(In reply to comment # 10)
Could you get the backtraces on these segmentation faults please?
[Thread debugging using libthread_db enabled]
Oh I'm not sure if the program actually already crashed when i ran bt full
So here's another one:
el@el-laptop:/SDL/SDL-1.3.0-5358/test$ sudo g++ sdl-config --cflags --libs -I/usr/local/lib/ -g -o ./testjoystick ./testjoystick.c
el@el-laptop:/SDL/SDL-1.3.0-5358/test$ gdb ./testjoystick
GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /home/el/SDL/SDL-1.3.0-5358/test/testjoystick...done.
Breakpoint 1 at 0x80491e4: file ./testjoystick.c, line 157.
(gdb) r 1
Starting program: /home/el/SDL/SDL-1.3.0-5358/test/testjoystick 1
[Thread debugging using libthread_db enabled]
Breakpoint 1, main (argc=2, argv=0xbffff4d4) at ./testjoystick.c:157
157 if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) {
Current language: auto
The current source language is "auto; currently c++".
(gdb) continue
Continuing.
There are 2 joysticks attached
Joystick 0: Logitech Logitech RumblePad 2 USB
axes: 1
balls: 0
hats: 0
buttons: 12
Joystick 1: Logitech WingMan RumblePad
axes: 1
balls: 0
hats: 0
buttons: 9
Watching joystick 1: (Logitech WingMan RumblePad)
Joystick has 1 axes, 0 hats, 0 balls, and 9 buttons
Program received signal SIGSEGV, Segmentation fault.
HandleHat (joystick=0x8064898) at src/joystick/linux/SDL_sysjoystick.c:946
946 if (value != the_hat->axis[axis]) {
Current language: auto
The current source language is "auto; currently c".
(gdb) bt full
0 HandleHat (joystick=0x8064898) at src/joystick/linux/SDL_sysjoystick.c:946
1 EV_HandleEvents (joystick=0x8064898) at src/joystick/linux/SDL_sysjoystick.c:1120
events = {{time = {tv_sec = 1261002483, tv_usec = 577216}, type = 3, code = 0, value = 0}, {time = {
tv_sec = 1261002483, tv_usec = 577225}, type = 3, code = 17, value = 1}, {time = {tv_sec = 1261002483,
tv_usec = 577233}, type = 0, code = 0, value = 0}, {time = {tv_sec = 134611608, tv_usec = -1073746088},
type = 3929, code = 21, value = 134539320}, {time = {tv_sec = 48724, tv_usec = -1073746116}, type = 61240,
code = 49151, value = 5799191}, {time = {tv_sec = 134539320, tv_usec = 14439294}, type = 3413, code = 121,
value = 134612736}, {time = {tv_sec = 8601044, tv_usec = 0}, type = 65524, code = 386, value = 7}, {time = {
tv_sec = 134539320, tv_usec = 0}, type = 61244, code = 49151, value = -1073746120}, {time = {tv_sec = 1,
tv_usec = 0}, type = 49445, code = 183, value = 134539408}, {time = {tv_sec = 8, tv_usec = 0}, type = 2918,
code = 21, value = 16}, {time = {tv_sec = -1073745916, tv_usec = 15307680}, type = 49140, code = 35,
value = 134537800}, {time = {tv_sec = -1073745004, tv_usec = -1073746056}, type = 6342, code = 21, value = 0}, {
time = {tv_sec = 0, tv_usec = 1}, type = 49140, code = 35, value = 2342900}, {time = {tv_sec = 134537800,
tv_usec = -1073746024}, type = 6489, code = 21, value = 134537800}, {time = {tv_sec = 1, tv_usec = 0},
type = 42407, code = 19, value = 2342900}, {time = {tv_sec = 134537800, tv_usec = -1073745992}, type = 40865,
code = 18, value = 134537800}, {time = {tv_sec = 134543532, tv_usec = 134543556}, type = 65524, code = 130,
value = 134537800}, {time = {tv_sec = -1073745004, tv_usec = -1073745960}, type = 52469, code = 128,
value = 134537800}, {time = {tv_sec = 0, tv_usec = 0}, type = 55629, code = 225, value = 8585204}, {time = {
tv_sec = 134537800, tv_usec = -1073745776}, type = 398, code = 129, value = 6}, {time = {
tv_sec = -1073745904, tv_usec = 0}, type = 0, code = 0, value = 8632580}, {time = {tv_sec = -1073745700,
tv_usec = -1073745864}, type = 51016, code = 183, value = 134539208}, {time = {tv_sec = 14434838,
tv_usec = -1073745832}, type = 61456, code = 49151, value = 0}, {time = {tv_sec = 0, tv_usec = 0}, type = 0,
code = 0, value = 0}, {time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0, value = 0}, {time = {tv_sec = 0,
tv_usec = 0}, type = 0, code = 0, value = 0}, {time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0,
value = 0}, {time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0, value = 0}, {time = {tv_sec = 0,
tv_usec = 0}, type = 0, code = 0, value = 0}, {time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0,
value = 0}, {time = {tv_sec = 0, tv_usec = 0}, type = 0, code = 0, value = -1073745556}, {time = {
tv_sec = 8585204, tv_usec = -1073745480}, type = 65524, code = 130, value = 0}}
i = 1
len = <value optimized out>
code = <value optimized out>
2 SDL_SYS_JoystickUpdate (joystick=0x8064898) at src/joystick/linux/SDL_sysjoystick.c:1163
i = <value optimized out>
3 0x00805e40 in SDL_JoystickUpdate () at src/joystick/SDL_joystick.c:568
No locals.
4 0x007b9d17 in SDL_PumpEvents () at src/events/SDL_events.c:374
---Type to continue, or q to quit---
_this =
5 0x007ba0ea in SDL_WaitEventTimeout (event=0xbffff394, timeout=0) at src/events/SDL_events.c:403
expiration = 0
6 0x007ba1b5 in SDL_PollEvent (event=0xbffff394) at src/events/SDL_events.c:385
No locals.
7 0x08048ea8 in WatchJoystick (joystick=0x8064898) at ./testjoystick.c:50
screen = 0x8060c58
i = 0
done = 0
y = 134629576
draw = 0
axis_area = {{{x = 0, y = 0, w = 0, h = 0}, {x = 0, y = 0, w = 0, h = 0}}, {{x = 0, y = 0, w = 0, h = 0}, {x = 0,
y = 0, w = 0, h = 0}}, {{x = 0, y = 0, w = 0, h = 0}, {x = 0, y = 0, w = 0, h = 0}}, {{x = 0, y = 0, w = 0,
h = 0}, {x = 0, y = 0, w = 0, h = 0}}, {{x = 0, y = 0, w = 0, h = 0}, {x = 0, y = 0, w = 0, h = 0}}, {{x = 0,
y = 0, w = 0, h = 0}, {x = 0, y = 0, w = 0, h = 0}}}
name = 0x83b9e0 "Logitech WingMan RumblePad"
event = {type = 1 '\001', window = {type = 1 '\001', windowID = 1, event = 11 '\v', data1 = 0, data2 = 0}, key = {
type = 1 '\001', windowID = 1, which = 11 '\v', state = 255 '\377', keysym = {scancode = SDL_SCANCODE_UNKNOWN,
sym = 0, mod = 61496, unicode = 8102040}}, edit = {type = 1 '\001',
text = "B\334\000\001\000\000\000\v\377\202\000\000\000\000\000\000\000\000\000\070\360\377\277\230\240{\000T\360\377\277\001", start = 0, length = 0}, text = {type = 1 '\001', windowID = 1, which = 11 '\v',
text = "\377\202\000\000\000\000\000\000\000\000\000\070\360\377\277\230\240{\000T\360\377\277\001\000\000\000\000\000\000\000"}, motion = {type = 1 '\001', windowID = 1, which = 11 '\v', state = 255 '\377', x = 0, y = 0,
z = -1073745864, pressure = 8102040, pressure_max = -1073745836, pressure_min = 1, rotation = 0, tilt = 0,
cursor = 8585204, xrel = 3, yrel = -1073745752}, button = {type = 1 '\001', windowID = 1, which = 11 '\v',
button = 255 '\377', state = 130 '\202', x = 0, y = 0}, wheel = {type = 1 '\001', windowID = 1,
which = 11 '\v', x = 0, y = 0}, jaxis = {type = 1 '\001', which = 66 'B', axis = 220 '\334', value = 1},
jball = {type = 1 '\001', which = 66 'B', ball = 220 '\334', xrel = 1, yrel = 8584971}, jhat = {type = 1 '\001',
which = 66 'B', hat = 220 '\334', value = 0 '\000'}, jbutton = {type = 1 '\001', which = 66 'B',
button = 220 '\334', state = 0 '\000'}, quit = {type = 1 '\001'}, user = {type = 1 '\001', windowID = 1,
code = 8584971, data1 = 0x0, data2 = 0x0}, syswm = {type = 1 '\001', msg = 0x1}, proximity = {type = 1 '\001',
windowID = 1, which = 11 '\v', cursor = 0, x = 0, y = -1073745864}, active = {type = 1 '\001', gain = 66 'B',
state = 220 '\334'}, resize = {type = 1 '\001', w = 1, h = 8584971}}
x = -1073744984
8 0x080493bb in main (argc=2, argv=0xbffff4d4) at ./testjoystick.c:186
name = 0x83b9e0 "Logitech WingMan RumblePad"
i = 2
joystick = 0x8064898
(gdb)
On 2009-12-16 23:25:43 +0000, Sam Lantinga wrote:
I was able to log on remotely and debug this.
It turns out that newer 2.6 kernels add an additional 'resolution' field to input_absinfo, which was overrunning the stack when querying the axis information.
This is fixed in subversion revision 5429.
Thanks!
The text was updated successfully, but these errors were encountered:
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 2.0.0
Reported for operating system, platform: Linux, All
Comments on the original bug report:
On 2009-12-10 12:29:57 +0000, wrote:
On 2009-12-14 23:54:43 +0000, Sam Lantinga wrote:
On 2009-12-15 03:52:54 +0000, wrote:
On 2009-12-15 12:19:16 +0000, Edgar Simo wrote:
On 2009-12-16 03:16:04 +0000, wrote:
On 2009-12-16 11:31:55 +0000, Edgar Simo wrote:
On 2009-12-16 11:33:35 +0000, Edgar Simo wrote:
On 2009-12-16 13:00:32 +0000, wrote:
On 2009-12-16 13:39:48 +0000, wrote:
On 2009-12-16 13:48:27 +0000, Edgar Simo wrote:
On 2009-12-16 14:20:29 +0000, wrote:
On 2009-12-16 14:31:45 +0000, wrote:
On 2009-12-16 23:25:43 +0000, Sam Lantinga wrote:
The text was updated successfully, but these errors were encountered: