hmatuschek / qdmr

A GUI application for configuring and programming cheap DMR radios under Linux and MacOS X.
https://dm3mat.darc.de/qdmr/
GNU General Public License v3.0
223 stars 46 forks source link

Anytone AT-D878UV: segfault when reading codeplug #467

Closed lx1ge closed 3 months ago

lx1ge commented 3 months ago

Hi, When trying to read the codeplug from my Anytone AT-D878UV, I qdmr and dmrconfig are crashing with a segfault.

qdmr console output:

Debug in src/application.cc@999: Set icon theme to 'dark'. Debug in src/application.cc@81: Search for translation in '/var/tmp/pamac-build-georges/qdmr/pkg/qdmr/usr/share/locale/en_US/LC_MESSAGES'. Debug in src/application.cc@81: Search for translation in '/var/tmp/pamac-build-georges/qdmr/pkg/qdmr/usr/share/locale/en/LC_MESSAGES'. Debug in src/repeaterbookcompleter.cc@329: Loaded repeater cache of 23 entries. Debug in lib/userdatabase.cc@132: Loaded user database with 264002 entries from /home/georges/.local/share/DM3MAT/qdmr/user.json. Debug in lib/talkgroupdatabase.cc@140: Loaded talk group database with 1680 entries from /home/georges/.local/share/DM3MAT/qdmr/talkgroups.json. Debug in src/application.cc@137: Last known position: Debug in src/application.cc@189: Create main window using icon theme 'dark'. Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication. Debug in src/application.cc@554: Last device is invalid, search for new one. Debug in lib/usbserial.cc@117: Search for serial port with matching VID:PID 28e9:18a. Debug in lib/usbserial.cc@124: Found ttyACM0 (USB 28e9:18a). Debug in lib/usbserial.cc@117: Search for serial port with matching VID:PID 1fc9:94. Debug in lib/hid_libusb.cc@128: Search for HID interfaces matching VID:PID 15a2:73. Debug in lib/dfu_libusb.cc@157: Search for DFU devices matching VID:PID 483:df11. Debug in lib/c7000device.cc@236: Search for C7000 devices matching VID:PID 1206:227. Debug in lib/usbdevice.cc@258: Check if serial port ttyACM0 still exisist and has VID:PID 28e9:18a. Debug in lib/radio.cc@61: Try to detect radio at Serial interface 'ttyACM0'. Debug in lib/usbserial.cc@27: Try to open Serial interface 'ttyACM0'. Debug in lib/usbserial.cc@72: Opened serial port ttyACM0 with 115200baud. Debug in lib/anytone_interface.cc@308: Anytone: In program-mode now. Debug in lib/anytone_interface.cc@337: Found radio 'D878UV', version 'V101'. Debug in lib/anytone_radio.cc@200: Download of 15 bitmaps. Debug in lib/anytone_interface.cc@357: Anytone: Left program-mode. Debug in lib/usbserial.cc@105: Serial port will close now. FATAL in lib/dfufile.cc@665: Cannot resolve offset 2180800h. [1] 49818 segmentation fault (core dumped) qdmr

dmrconf:

dmrconf --verbose -D ttyACM0 -R d878uv read test.yaml Debug in cli/autodetect.cc@40: Autodetect radios. Debug in lib/usbserial.cc@117: Search for serial port with matching VID:PID 28e9:18a. Debug in lib/usbserial.cc@124: Found ttyACM0 (USB 28e9:18a). Debug in lib/usbserial.cc@117: Search for serial port with matching VID:PID 1fc9:94. Debug in lib/hid_libusb.cc@128: Search for HID interfaces matching VID:PID 15a2:73. Debug in lib/dfu_libusb.cc@157: Search for DFU devices matching VID:PID 483:df11. Debug in lib/c7000device.cc@236: Search for C7000 devices matching VID:PID 1206:227. Info in cli/autodetect.cc@51: Found 1 device(s): Info in cli/autodetect.cc@53: Serial interface 'ttyACM0'. Debug in lib/usbdevice.cc@258: Check if serial port ttyACM0 still exisist and has VID:PID 28e9:18a. Debug in cli/autodetect.cc@90: Using device ttyACM0. Debug in lib/usbdevice.cc@258: Check if serial port ttyACM0 still exisist and has VID:PID 28e9:18a. Debug in lib/radio.cc@61: Try to detect radio at Serial interface 'ttyACM0'. Debug in lib/usbserial.cc@27: Try to open Serial interface 'ttyACM0'. Debug in lib/usbserial.cc@72: Opened serial port ttyACM0 with 115200baud. Debug in lib/anytone_interface.cc@308: Anytone: In program-mode now. Debug in lib/anytone_interface.cc@337: Found radio 'D878UV', version 'V101'. [ ] 0% [================================================= ] 99% Debug in lib/anytone_interface.cc@357: Anytone: Left program-mode. Debug in lib/usbserial.cc@105: Serial port will close now. Debug in cli/readcodeplug.cc@48: Save codeplug at 'test.yaml'. FATAL in lib/dfufile.cc@665: Cannot resolve offset 2180800h. [1] 50149 segmentation fault (core dumped) dmrconf --verbose -D ttyACM0 -R d878uv read test.yaml

qdmr version 0.12 running on Manjaro and installed via AUR previous qdmr versions are not impacted

codeplug writing has not yet been tested

73, Georges LX1GE

hmatuschek commented 3 months ago

Oh, that is bad. If there is nothing secret in your codeplug, could you read the binary one and attach it here?

Simply use dmrconf for that: 'dmrconf read codeplug.dfu'

lx1ge commented 3 months ago

codeplug.dfu.tar.gz

here is the requested binary codeplug

hmatuschek commented 3 months ago

Thanks for the quick reply. I am currently traveling and I'll have a look at it, once I am back.

lx1ge commented 3 months ago

Thanks for the patch, I can confirm that the issue is solved