dagargo/overwitch

Segfault when running overwitch -l (Digitone)

ScottGarman opened this issue · 2 comments

Hi there, I've just compiled and installed the latest overwitch from the master branch (3a71a8d), and when I run overwitch -l after turning on my Digitone, I get a segfault. I'm including the stack trace and other relevant information.

OS: Ubuntu 20.04 running the latest Liquorix kernel (5.16.0-17.2-liquorix-amd64)
The Digitone is running the latest firmware, 1.32A.

dmesg output after turning on the Digitone:

[   76.785068] usb 3-1.1.4: new high-speed USB device number 7 using xhci_hcd
[   76.875361] usb 3-1.1.4: New USB device found, idVendor=1935, idProduct=1036, bcdDevice= 0.01
[   76.875366] usb 3-1.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   76.875369] usb 3-1.1.4: Product: Elektron Digitone
[   76.875370] usb 3-1.1.4: Manufacturer: Elektron Music Machines
[   76.875371] usb 3-1.1.4: SerialNumber: 000000000001
overwitch -l
Segmentation fault (core dumped)
gdb --args /usr/local/bin/overwitch -l
(gdb) run
Starting program: /usr/local/bin/overwitch -l
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff762a700 (LWP 9897)]

Thread 1 "overwitch" received signal SIGSEGV, Segmentation fault.
0x000055555555c2be in ow_get_device_desc_from_vid_pid (vid=<optimized out>, device_desc=<optimized out>, pid=<optimized out>)
    at overwitch.c:200
200	      if ((*d)->pid == pid)
(gdb) bt
#0  0x000055555555c2be in ow_get_device_desc_from_vid_pid (vid=<optimized out>, device_desc=<optimized out>, 
    pid=<optimized out>) at overwitch.c:200
#1  ow_get_device_desc_from_vid_pid (device_desc=<synthetic pointer>, pid=4150, vid=6453) at overwitch.c:191
#2  ow_get_devices (devices=devices@entry=0x7fffffffd430, size=size@entry=0x7fffffffd428) at overwitch.c:167
#3  0x000055555555c6af in print_devices () at common.c:54
#4  0x0000555555557f3e in main (argc=2, argv=0x7fffffffd698) at main.c:241

Please let me know if I can provide any other useful information. And thank you for your work on this project!

Thanks for reporting this. Clearly, a mistake on my side. Solved in 3744e06.

Confirm, please, that it fixes your issue.

The fix works as intended! Thanks for being so responsive, and have a great day!