Crash on mouse movement

Bug #135649 reported by gwieser
4
Affects Status Importance Assigned to Milestone
Pystromo
Fix Released
Undecided
Raumkraut

Bug Description

System (kind of exotic :-):
SLED 10 SP1 64bit
kernel: 2.6.16.46-0.14-smp
python: 2.4.2-18.10
uinput is loaded, udev rules are in place
Logitech MX510: Bus 001 Device 004: ID 046d:c01d Logitech, Inc.

--------------------

georg@blaine:~/Desktop/pystromo> ./input-remapper.py -v
Using output: <devices.OutputDevice object at 0x2af091a55d90>
Using device: <InputDevice "mx510" on 1 device nodes>

As soon as I move the mouse I get a crash with the following error:

Traceback (most recent call last):
  File "./input-remapper.py", line 127, in ?
    events = devices.read(blocking=shouldBlock)
  File "/home/georg/Desktop/pystromo/devices.py", line 33, in read
    events.extend(devices[dev].read(dev))
  File "/home/georg/Desktop/pystromo/devices.py", line 126, in read
    return self.readNode(node)
  File "/home/georg/Desktop/pystromo/devices.py", line 143, in readNode
    event = self.Event(node.read(self.Event.size))
  File "/home/georg/Desktop/pystromo/events.py", line 36, in __init__
    self.unpack(raw)
  File "/home/georg/Desktop/pystromo/events.py", line 94, in unpack
    tup = struct.unpack(self.format, raw)
struct.error: unpack str size does not match format

I have a N52 too, it also crashes with a similiar output, not when I press a button but after a seemingly random time.
Contact me if I can run some tests for you.

Revision history for this message
Raumkraut (raumkraut) wrote :

I suspect this is due to your system being 64-bit.
Could you try changing line #16 of events.py:
 format = 'LLHHl'
to:
 format = 'LLHHi'

or, failing that:
 format = '=LLHHi'
or possibly even:
 format = '=LLHHl'

Changed in pystromo:
assignee: nobody → raumkraut
Revision history for this message
gwieser (georg-wieser) wrote : Re: [Bug 135649] Re: Crash on mouse movement

On 8/29/07, Raumkraut <email address hidden> wrote:
>
> I suspect this is due to your system being 64-bit.
> Could you try changing line #16 of events.py:
> format = 'LLHHl'
> to:
> format = 'LLHHi'

That seemed to work with the MX510, thanks! I will try with my n52 soon but
I suppose it should work too. A question: What about the n52`s mode
switching (red/green/blue). Can this be implemented with this method or
would it require a specialized driver?

Best,
Georg

Revision history for this message
Raumkraut (raumkraut) wrote :

Excellent, that fix will go into the next numbered release then. Which should be soon.

Implementing mode switching is certainly in the plan, and I should be able to get on to that after the next release. :)

Changed in pystromo:
status: New → Fix Committed
Raumkraut (raumkraut)
Changed in pystromo:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.