[PD] [hid] crashing with segmentation fault

Hans-Christoph Steiner hans at eds.org
Sun Feb 5 21:23:54 CET 2006


Please let me know.  I think I committed a better fix more recently too.

.hc

On Feb 5, 2006, at 11:08 AM, Jerome Tuncer wrote:

> Hi Hans Christopher,
>
> I hadn't noticed you answered, thread is so down in the list! (-;
>
> Thanks for the reply, I'll check that out and keep you informed about  
> the results.
>
> ++
>
>
>>
> Hans-Christoph Steiner a écrit :
>> Ok, still haven't had a moment to get my Debian going again, but I   
>> thought of something else.  I updated make-arrays-from-input.h.pl to   
>> generate a ev_syn array of 512 items.  This should hopefully prevent   
>> the segfaults on Linux 2.6 kernels until I figure out a better way to  
>>  do this.
>> .hc
>> On Jan 10, 2006, at 1:12 PM, Jerome Tuncer wrote:
>>> Hi Hans,
>>>
>>> I just tried replacing the line you told me in hid_linux.c and it   
>>> doesn't work. External compiles well but it still segfaults with   
>>> exactly the same error.
>>>
>>> Since I don't understand much C programming, I just replaced what  
>>> you  said blindly...
>>>
>>> Good luck with your PowerBook anyway (-;
>>>
>>> ++
>>>
>>>>>>
>>> Hans-Christoph Steiner a écrit :
>>>
>>>> Ok, while working on this, my Linux install went down in flames.  I  
>>>>   guess "unstable" was actually unstable this time.  After a few  
>>>> long   fscks, I am back on Mac OS X, but not yet on Debian.   
>>>> Anyway, the  Linux  2.6 sync events are not used by [hid] and are  
>>>> not HID events,  but  generated by the Linux kernel, so they'll be  
>>>> eventually removed  so that  everything is the same across  
>>>> platform.
>>>> For now, try replacing this line in hid_linux.c (line 180):
>>>>     else
>>>> with this:
>>>>     else if ( event_type != EV_SYN )
>>>> Sorry, I can't test it myself until I fix Debian on my PowerBook.    
>>>>  Arg...
>>>> .hc
>>>> On Jan 7, 2006, at 10:19 PM, Jerome Tuncer wrote:
>>>>
>>>>> Hi Haans Christopher,
>>>>>
>>>>> In fact, it seems that both the keyboard and the mouse are making   
>>>>>  [hid] crash. Some time ago, when the touchpad used to work, I   
>>>>> remember  it made it crash as well and I'm quite sure it gave   
>>>>> syn_report  messages as well...
>>>>>
>>>>> By the way: [hid] doesn't crash on my desktop which is Debian   
>>>>> testing  as well... I'll check the output to see if syn_report   
>>>>> messages are  present or not.
>>>>>
>>>>> ++
>>>>>
>>>>>>>>>>
>>>>>
>>>>> Hans-Christoph Steiner a écrit :
>>>>>
>>>>>> Are you able to narrow down which device is causing it?  Looks  
>>>>>> like    syn_report messages are the culprit.  I don't have a  
>>>>>> device that    outputs syn_report events (IIRC).
>>>>>> I'll look at this today.
>>>>>> .hc
>>>>>> On Jan 6, 2006, at 11:51 PM, Jerome Tuncer wrote:
>>>>>>
>>>>>>> Hi Hans, hi list,
>>>>>>>
>>>>>>> I just got back to trying to make [hid] work on my laptop and I   
>>>>>>>  still  can't...
>>>>>>>
>>>>>>> [hid] is the latest from CVS (Friday, January 6th 2006) and  
>>>>>>> still    gives segmentation faults.
>>>>>>>
>>>>>>> My machine is a PC running Debian unstable with 2.6.14.
>>>>>>>
>>>>>>> Here's more detail:
>>>>>>>
>>>>>>> I have 3 HID peripherals on the machine:
>>>>>>>
>>>>>>> - /dev/input/event0 :: Keyboard
>>>>>>> - /dev/input/event1 :: Touchpad
>>>>>>> - /dev/input/event2 :: USB Mouse
>>>>>>>
>>>>>>> "$ hexdump /dev/input/event1" doesn't output anything so I  
>>>>>>> assume   the  touchpad doesn't send info well. Let's forget  
>>>>>>> about that for   now.
>>>>>>>
>>>>>>> "$ hexdump /dev/input/event0"
>>>>>>> "$ hexdump /dev/input/event2"
>>>>>>> Both output hex. dataflow.
>>>>>>>
>>>>>>> The output from [print( sent to [hid] compiled in debug mode for  
>>>>>>>  the   keyboard is printKeyboard.txt. printTouchpad.txt and   
>>>>>>> printMouse.txt   are the outputs from the 2 other peripherals.
>>>>>>>
>>>>>>> The 2 other files (printSegFaultKeyboard.txt and     
>>>>>>> printSegFaultMouse.txt)  is the stderr from the two peripherals   
>>>>>>> that   make [hid] crash. Touchpad doesn't seem to send anything.
>>>>>>>
>>>>>>> I suspect the problem being similar to what Gerda experienced  
>>>>>>> in:     
>>>>>>> http://lists.puredata.info/pipermail/pd-list/2005-08/030339.html
>>>>>>>
>>>>>>> Do you know where the problem may come from?
>>>>>>> Do you need more output from anything?
>>>>>>>
>>>>>>>
>>>>>>> ++
>>>>>>>
>>>>>>>
>>>>>>>>>>>>>> hid_new
>>>>>>> [hid] 0.6, written by Hans-Christoph Steiner <hans at eds.org>
>>>>>>> hid_open
>>>>>>> [hid] opened device 0 (/dev/input/event0): AT Translated Set 2    
>>>>>>> keyboard
>>>>>>>
>>>>>>> Device 0: 'AT Translated Set 2 keyboard' on '/dev/input/event0'
>>>>>>> Device 1: 'SynPS/2 Synaptics TouchPad' on '/dev/input/event1'
>>>>>>> Device 2: 'Microsoft Microsoft Wheel Mouse Optical®' on     
>>>>>>> '/dev/input/event2'
>>>>>>>
>>>>>>>
>>>>>>> Supported events:
>>>>>>>
>>>>>>>   TYPE  CODE    EVENT NAME
>>>>>>> -----------------------------------------------------------
>>>>>>>   syn   syn_report      Synchronization
>>>>>>>   syn   syn_config      Synchronization
>>>>>>>   syn   ?       Synchronization
>>>>>>>   syn   ev_9    Synchronization
>>>>>>>   syn   ev_12   Synchronization
>>>>>>>
>>>>>>>   TYPE  CODE    EVENT NAME
>>>>>>> -----------------------------------------------------------
>>>>>>>   key   key_esc Keys/Buttons
>>>>>>>   key   key_1   Keys/Buttons
>>>>>>>   key   key_2   Keys/Buttons
>>>>>>>   key   key_3   Keys/Buttons
>>>>>>>   key   key_4   Keys/Buttons
>>>>>>>   key   key_5   Keys/Buttons
>>>>>>>   key   key_6   Keys/Buttons
>>>>>>>   key   key_7   Keys/Buttons
>>>>>>>   key   key_8   Keys/Buttons
>>>>>>>   key   key_9   Keys/Buttons
>>>>>>>   key   key_0   Keys/Buttons
>>>>>>>   key   key_minus       Keys/Buttons
>>>>>>>   key   key_equal       Keys/Buttons
>>>>>>>   key   key_backspace   Keys/Buttons
>>>>>>>   key   key_tab Keys/Buttons
>>>>>>>   key   key_q   Keys/Buttons
>>>>>>>   key   key_w   Keys/Buttons
>>>>>>>   key   key_e   Keys/Buttons
>>>>>>>   key   key_r   Keys/Buttons
>>>>>>>   key   key_t   Keys/Buttons
>>>>>>>   key   key_y   Keys/Buttons
>>>>>>>   key   key_u   Keys/Buttons
>>>>>>>   key   key_i   Keys/Buttons
>>>>>>>   key   key_o   Keys/Buttons
>>>>>>>   key   key_p   Keys/Buttons
>>>>>>>   key   key_leftbrace   Keys/Buttons
>>>>>>>   key   key_rightbrace  Keys/Buttons
>>>>>>>   key   key_enter       Keys/Buttons
>>>>>>>   key   key_leftctrl    Keys/Buttons
>>>>>>>   key   key_a   Keys/Buttons
>>>>>>>   key   key_s   Keys/Buttons
>>>>>>>   key   key_d   Keys/Buttons
>>>>>>>   key   key_f   Keys/Buttons
>>>>>>>   key   key_g   Keys/Buttons
>>>>>>>   key   key_h   Keys/Buttons
>>>>>>>   key   key_j   Keys/Buttons
>>>>>>>   key   key_k   Keys/Buttons
>>>>>>>   key   key_l   Keys/Buttons
>>>>>>>   key   key_semicolon   Keys/Buttons
>>>>>>>   key   key_apostrophe  Keys/Buttons
>>>>>>>   key   key_grave       Keys/Buttons
>>>>>>>   key   key_leftshift   Keys/Buttons
>>>>>>>   key   key_backslash   Keys/Buttons
>>>>>>>   key   key_z   Keys/Buttons
>>>>>>>   key   key_x   Keys/Buttons
>>>>>>>   key   key_c   Keys/Buttons
>>>>>>>   key   key_v   Keys/Buttons
>>>>>>>   key   key_b   Keys/Buttons
>>>>>>>   key   key_n   Keys/Buttons
>>>>>>>   key   key_m   Keys/Buttons
>>>>>>>   key   key_comma       Keys/Buttons
>>>>>>>   key   key_dot Keys/Buttons
>>>>>>>   key   key_slash       Keys/Buttons
>>>>>>>   key   key_rightshift  Keys/Buttons
>>>>>>>   key   key_kpasterisk  Keys/Buttons
>>>>>>>   key   key_leftalt     Keys/Buttons
>>>>>>>   key   key_space       Keys/Buttons
>>>>>>>   key   key_capslock    Keys/Buttons
>>>>>>>   key   key_f1  Keys/Buttons
>>>>>>>   key   key_f2  Keys/Buttons
>>>>>>>   key   key_f3  Keys/Buttons
>>>>>>>   key   key_f4  Keys/Buttons
>>>>>>>   key   key_f5  Keys/Buttons
>>>>>>>   key   key_f6  Keys/Buttons
>>>>>>>   key   key_f7  Keys/Buttons
>>>>>>>   key   key_f8  Keys/Buttons
>>>>>>>   key   key_f9  Keys/Buttons
>>>>>>>   key   key_f10 Keys/Buttons
>>>>>>>   key   key_numlock     Keys/Buttons
>>>>>>>   key   key_scrolllock  Keys/Buttons
>>>>>>>   key   key_kp7 Keys/Buttons
>>>>>>>   key   key_kp8 Keys/Buttons
>>>>>>>   key   key_kp9 Keys/Buttons
>>>>>>>   key   key_kpminus     Keys/Buttons
>>>>>>>   key   key_kp4 Keys/Buttons
>>>>>>>   key   key_kp5 Keys/Buttons
>>>>>>>   key   key_kp6 Keys/Buttons
>>>>>>>   key   key_kpplus      Keys/Buttons
>>>>>>>   key   key_kp1 Keys/Buttons
>>>>>>>   key   key_kp2 Keys/Buttons
>>>>>>>   key   key_kp3 Keys/Buttons
>>>>>>>   key   key_kp0 Keys/Buttons
>>>>>>>   key   key_kpdot       Keys/Buttons
>>>>>>>   key   key_zenkakuhankaku      Keys/Buttons
>>>>>>>   key   key_102nd       Keys/Buttons
>>>>>>>   key   key_f11 Keys/Buttons
>>>>>>>   key   key_f12 Keys/Buttons
>>>>>>>   key   key_ro  Keys/Buttons
>>>>>>>   key   key_katakana    Keys/Buttons
>>>>>>>   key   key_hiragana    Keys/Buttons
>>>>>>>   key   key_henkan      Keys/Buttons
>>>>>>>   key   key_katakanahiragana    Keys/Buttons
>>>>>>>   key   key_muhenkan    Keys/Buttons
>>>>>>>   key   key_kpjpcomma   Keys/Buttons
>>>>>>>   key   key_kpenter     Keys/Buttons
>>>>>>>   key   key_rightctrl   Keys/Buttons
>>>>>>>   key   key_kpslash     Keys/Buttons
>>>>>>>   key   key_sysrq       Keys/Buttons
>>>>>>>   key   key_rightalt    Keys/Buttons
>>>>>>>   key   key_home        Keys/Buttons
>>>>>>>   key   key_up  Keys/Buttons
>>>>>>>   key   key_pageup      Keys/Buttons
>>>>>>>   key   key_left        Keys/Buttons
>>>>>>>   key   key_right       Keys/Buttons
>>>>>>>   key   key_end Keys/Buttons
>>>>>>>   key   key_down        Keys/Buttons
>>>>>>>   key   key_pagedown    Keys/Buttons
>>>>>>>   key   key_insert      Keys/Buttons
>>>>>>>   key   key_delete      Keys/Buttons
>>>>>>>   key   key_macro       Keys/Buttons
>>>>>>>   key   key_mute        Keys/Buttons
>>>>>>>   key   key_volumedown  Keys/Buttons
>>>>>>>   key   key_volumeup    Keys/Buttons
>>>>>>>   key   key_power       Keys/Buttons
>>>>>>>   key   key_kpequal     Keys/Buttons
>>>>>>>   key   key_kpplusminus Keys/Buttons
>>>>>>>   key   key_pause       Keys/Buttons
>>>>>>>   key   key_kpcomma     Keys/Buttons
>>>>>>>   key   key_yen Keys/Buttons
>>>>>>>   key   key_leftmeta    Keys/Buttons
>>>>>>>   key   key_rightmeta   Keys/Buttons
>>>>>>>   key   key_compose     Keys/Buttons
>>>>>>>   key   key_stop        Keys/Buttons
>>>>>>>   key   key_calc        Keys/Buttons
>>>>>>>   key   key_sleep       Keys/Buttons
>>>>>>>   key   key_wakeup      Keys/Buttons
>>>>>>>   key   key_www Keys/Buttons
>>>>>>>   key   key_mail        Keys/Buttons
>>>>>>>   key   key_bookmarks   Keys/Buttons
>>>>>>>   key   key_computer    Keys/Buttons
>>>>>>>   key   key_back        Keys/Buttons
>>>>>>>   key   key_forward     Keys/Buttons
>>>>>>>   key   key_nextsong    Keys/Buttons
>>>>>>>   key   key_playpause   Keys/Buttons
>>>>>>>   key   key_previoussong        Keys/Buttons
>>>>>>>   key   key_stopcd      Keys/Buttons
>>>>>>>   key   key_refresh     Keys/Buttons
>>>>>>>   key   key_f13 Keys/Buttons
>>>>>>>   key   key_f14 Keys/Buttons
>>>>>>>   key   key_f15 Keys/Buttons
>>>>>>>   key   key_search      Keys/Buttons
>>>>>>>   key   key_media       Keys/Buttons
>>>>>>>
>>>>>>>   TYPE  CODE    EVENT NAME
>>>>>>> -----------------------------------------------------------
>>>>>>>   msc   msc_scan        Miscellaneous
>>>>>>>
>>>>>>>   TYPE  CODE    EVENT NAME
>>>>>>> -----------------------------------------------------------
>>>>>>>   led   led_numl        LEDs
>>>>>>>   led   led_capsl       LEDs
>>>>>>>   led   led_scrolll     LEDs
>>>>>>>
>>>>>>>   TYPE  CODE    EVENT NAME
>>>>>>> -----------------------------------------------------------
>>>>>>>
>>>>>>> Detected:
>>>>>>>   5 Sync types
>>>>>>>   142 Key/Button types
>>>>>>>   1 Misc types
>>>>>>>   3 LED types
>>>>>>> hid_new
>>>>>>> [hid] 0.6, written by Hans-Christoph Steiner <hans at eds.org>
>>>>>>> hid_open
>>>>>>> [hid] opened device 2 (/dev/input/event2): Microsoft Microsoft   
>>>>>>> Wheel   Mouse Optical®
>>>>>>>
>>>>>>> Device 0: 'AT Translated Set 2 keyboard' on '/dev/input/event0'
>>>>>>> Device 1: 'SynPS/2 Synaptics TouchPad' on '/dev/input/event1'
>>>>>>> Device 2: 'Microsoft Microsoft Wheel Mouse Optical®' on     
>>>>>>> '/dev/input/event2'
>>>>>>>
>>>>>>>
>>>>>>> Supported events:
>>>>>>>
>>>>>>>   TYPE  CODE    EVENT NAME
>>>>>>> -----------------------------------------------------------
>>>>>>>   syn   syn_report      Synchronization
>>>>>>>   syn   syn_config      Synchronization
>>>>>>>   syn   ?       Synchronization
>>>>>>>
>>>>>>>   TYPE  CODE    EVENT NAME
>>>>>>> -----------------------------------------------------------
>>>>>>>   key   btn_0   btn_left
>>>>>>>   key   btn_1   btn_right
>>>>>>>   key   btn_2   btn_middle
>>>>>>>
>>>>>>>   TYPE  CODE    EVENT NAME
>>>>>>> -----------------------------------------------------------
>>>>>>>   rel   rel_x   Relative Axis
>>>>>>>   rel   rel_y   Relative Axis
>>>>>>>   rel   rel_wheel       Relative Axis
>>>>>>>
>>>>>>> Detected:
>>>>>>>   3 Sync types
>>>>>>>   3 Key/Button types
>>>>>>>   3 Relative Axis types
>>>>>>> hid_new
>>>>>>> [hid] 0.6, written by Hans-Christoph Steiner <hans at eds.org>
>>>>>>> hid_open
>>>>>>> [hid] opened device 0 (/dev/input/event0): AT Translated Set 2    
>>>>>>> keyboard
>>>>>>> hid_float
>>>>>>> hid_start
>>>>>>> [hid] polling started
>>>>>>> INPUT_EVENT: msc msc_scan 57
>>>>>>> INPUT_EVENT: key key_space 1
>>>>>>> INPUT_EVENT: syn syn_report 0
>>>>>>> pd_gui: pd process exited
>>>>>>> Erreur de segmentation
>>>>>>> hid_new
>>>>>>> [hid] 0.6, written by Hans-Christoph Steiner <hans at eds.org>
>>>>>>> hid_open
>>>>>>> [hid] opened device 2 (/dev/input/event2): Microsoft Microsoft   
>>>>>>> Wheel   Mouse Optical®
>>>>>>> hid_float
>>>>>>> hid_start
>>>>>>> [hid] polling started
>>>>>>> INPUT_EVENT: rel rel_x 4
>>>>>>> INPUT_EVENT: syn syn_report 0
>>>>>>> socket receive error: Connection reset by peer (104)
>>>>>>> Erreur de segmentation
>>>>>>> hid_new
>>>>>>> [hid] 0.6, written by Hans-Christoph Steiner <hans at eds.org>
>>>>>>> hid_open
>>>>>>> [hid] opened device 1 (/dev/input/event1): SynPS/2 Synaptics   
>>>>>>> TouchPad
>>>>>>>
>>>>>>> Device 0: 'AT Translated Set 2 keyboard' on '/dev/input/event0'
>>>>>>> Device 1: 'SynPS/2 Synaptics TouchPad' on '/dev/input/event1'
>>>>>>> Device 2: 'Microsoft Microsoft Wheel Mouse Optical®' on     
>>>>>>> '/dev/input/event2'
>>>>>>>
>>>>>>>
>>>>>>> Supported events:
>>>>>>>
>>>>>>>   TYPE  CODE    EVENT NAME
>>>>>>> -----------------------------------------------------------
>>>>>>>   syn   syn_report      Synchronization
>>>>>>>   syn   syn_config      Synchronization
>>>>>>>   syn   ?       Synchronization
>>>>>>>
>>>>>>>   TYPE  CODE    EVENT NAME
>>>>>>> -----------------------------------------------------------
>>>>>>>   key   btn_0   btn_left
>>>>>>>   key   btn_1   btn_right
>>>>>>>   key   btn_2   btn_middle
>>>>>>>   key   btn_5   btn_forward
>>>>>>>   key   btn_6   btn_back
>>>>>>>   key   btn_5   btn_tool_finger
>>>>>>>   key   btn_10  btn_touch
>>>>>>>   key   btn_13  btn_tool_doubletap
>>>>>>>   key   btn_14  btn_tool_tripletap
>>>>>>>
>>>>>>>   TYPE  CODE    EVENT NAME
>>>>>>> -----------------------------------------------------------
>>>>>>>   abs   abs_x   Absolute Axis
>>>>>>>   abs   abs_y   Absolute Axis
>>>>>>>   abs   abs_pressure    Absolute Axis
>>>>>>>   abs   abs_tool_width  Absolute Axis
>>>>>>>
>>>>>>> Detected:
>>>>>>>   3 Sync types
>>>>>>>   9 Key/Button types
>>>>>>>   4 Absolute Axis types
>>>>>>> _______________________________________________
>>>>>>> PD-list at iem.at mailing list
>>>>>>> UNSUBSCRIBE and account-management ->     
>>>>>>> http://lists.puredata.info/listinfo/pd-list
>>>>>>>
>>>>>> __________________________________________________________________ 
>>>>>> __ __ __ ____
>>>>>> "Computer science is no more related to the computer than  
>>>>>> astronomy   is  related to the telescope."
>>>>>>                                                           -Edsger  
>>>>>>    Dykstra
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> PD-list at iem.at mailing list
>>>>> UNSUBSCRIBE and account-management ->    
>>>>> http://lists.puredata.info/listinfo/pd-list
>>>>>
>>>> ____________________________________________________________________ 
>>>> __ __ ____
>>>>                     There is no way to peace, peace is the way.
>>>>                                                 -A.J. Muste
>>>>
>> ______________________________________________________________________ 
>> __ ____
>> "[W]e have invented the technology to eliminate scarcity, but we are   
>> deliberately throwing it away to benefit those who profit from   
>> scarcity."
>>                                                      -John Gilmore
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->  
> http://lists.puredata.info/listinfo/pd-list
>

________________________________________________________________________ 
____

I spent 33 years and four months in active military service and during  
that period I spent most of my time as a high class muscle man for Big  
Business, for Wall Street and the bankers.
                                             - General Smedley Butler





More information about the Pd-list mailing list