Hallo!
moved to pd-dev ...
Ok, please send info. Bug reports are most appreciated, as much info as possible, and a Pd console log too. Its hard to tell what's going on from "I used hid and it crashes".
I tried now to debug it:
the problem seems to be in hid_get_events: in the while loop hid_input_event.type is 0 at the second key wich is read ... so the problem should be somewhere in the read function, but I didn't figure out why ...
the first key-event is read correct ...
hear a console log with some custom debug messages:
----------------------- in while-loop EV_KEY: 1, read-type: 4 event_names[hid_input_event.type][hid_input_event.code] != NULL print: msc msc_scan 31 in while-loop EV_KEY: 1, read-type: 1 hid_input_event.type == EV_KEY after hid_convert_linux_buttons after hid_convert_linux_keys print: key key_s 1 in while EV_KEY: 1, read-type: 0 output 3 events
CRASH ------------------------
Let me know if you need some other information or if you have an idea ...
LG Georg
On Mar 23, 2006, at 4:23 AM, Georg Holzmann wrote:
Hallo!
moved to pd-dev ...
Ok, please send info. Bug reports are most appreciated, as much info as possible, and a Pd console log too. Its hard to tell what's going on from "I used hid and it crashes".
I tried now to debug it:
the problem seems to be in hid_get_events: in the while loop hid_input_event.type is 0 at the second key wich is read ... so the problem should be somewhere in the read function, but I didn't figure out why ...
the first key-event is read correct ...
hear a console log with some custom debug messages:
in while-loop EV_KEY: 1, read-type: 4 event_names[hid_input_event.type][hid_input_event.code] != NULL print: msc msc_scan 31 in while-loop EV_KEY: 1, read-type: 1 hid_input_event.type == EV_KEY after hid_convert_linux_buttons after hid_convert_linux_keys print: key key_s 1 in while EV_KEY: 1, read-type: 0 output 3 events
CRASH
Let me know if you need some other information or if you have an idea ...
Whoa, that's a new one for me. That's not the old segfaulting bug. Which kernel version are you using? An easy fix would be to test to make sure the hid_input_event.type is within range, but unfortunately I am overcommitted at the moment.
So far all of the crasher bugs that I have seen in [hid] on GNU/Linux are caused by events that are outside of the documented ranges. I wish the Linux input stuff had better docs. But [hid] should have more bounds checking too.
.hc
________________________________________________________________________ ____
There is no way to peace, peace is the way. -A.J. Muste
Hallo!
Whoa, that's a new one for me. That's not the old segfaulting bug. Which kernel version are you using? An easy fix would be to test to make sure the hid_input_event.type is within range, but unfortunately I am overcommitted at the moment.
kernel 2.6.15 - but I also discoverd this on older kernels...
the hid_input_event.type is 0 before it crashes - but it should be 1 (EV_KEY) and so it returns from hid_get_events ... however, I didn't find the bug ...
LG Georg