[PD-dev] Re: [hid] crashes Re: [PD] Couldn't Create sndfiler thread: 1?

Hans-Christoph Steiner hans at eds.org
Fri Mar 24 00:19:51 CET 2006


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





More information about the Pd-dev mailing list