Closed HondaRulez closed 2 years ago
Hi, I have done a build from GITHUB on a new machine running the current version of Mint. This consisted of cloning the archive and running LinuxPackages (with some problems) and then running doit.
Testing FirmwareChanger ran and updated the target firmware without any problems.
I'm sorry but I can't see any way to determine the error.
There are some some differences in the log files that are puzzling.
/* 0.00 */ static std::shared_ptr<_Tp> PluginFactory<T>::createPlugin(std::string, std::string) [with T = FlashImage; std::string = std::__cxx11::basic_string<char>]: Entry ===============
/* 0.01 */ static std::shared_ptr<_Tp> PluginFactory<T>::createPlugin(std::__cxx11::string, std::__cxx11::string) [with T = FlashImage; std::__cxx11::string = std::__cxx11::basic_string<char>]: Entry ===============
This may indicate different C compiler version or library versions?
Perhaps a clean and rebuild may help to ensure consistent versions for plugins?
FirmwareChanger.log
Really the FirmwareChanger does not work since version 250 or so.. and tryed many dsistros... therefore not a distro problem probably.
now, I made a clean clone and compille, still segfault..
it's possible due the localization settings, I'm using Hungarian.
here is a gdb log:
Reading symbols from ./FirmwareChanger-debug...done. (gdb) r Starting program: /opt/src/usbdm/FirmwareChanger/FirmwareChanger-debug.x86_64-linux-gnu/FirmwareChanger-debug [Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff2e54700 (LWP 4482)]
Thread 1 "FirmwareChanger" received signal SIGSEGV, Segmentation fault. 0x000055555557fe07 in wxStringOperationsWchar::DecodeChar ( i=<error reading variable: Cannot access memory at address 0x5559557f3d8c>) at /usr/include/wx-3.0/wx/stringops.h:52 52 { return *i; } (gdb)
another little thing, the make clean does not work in the USBDM_API_Example and USBD_Programmer_API_Example directoryes
Hi, I'll have a look at the examples but they a pretty low priority. Could you provide a stack trace in GDB of the crash. I can't tell much from an error inside wxWidgets. bye
my BDM device's serial # is "0003" if it's matter... the stack strace on the image is without BDM connected
(gdb) bt
(i=<error reading variable: Cannot access memory at address 0x5559557ee25c>) at /usr/include/wx-3.0/wx/stringops.h:52
at /usr/include/wx-3.0/wx/string.h:1514
0x5555556ec740, serialNumber=..., serialNumberPrefix=...) at src/FirmwareChanger.cpp:889
at src/FirmwareChanger.cpp:904
at src/FirmwareChanger.cpp:1090
OK I believe I have found the error. It is caused by a combination of zero length serial number and autoload being enabled. Still a silly error where I didn't check for an empty string. Please use the updated file on GITHUB. bye
The app starts now, but clicking on the Auto Sselect BDM Firmware or Read From Device still segfault
Hi, As before can you run in GDB and provide a stack trace as I can't get it to misbehave for me. bye
Thanks for that. Basically the same error - checking for underflow in a unsigned number in the same bit of code. Please try the update on GITHUB. It is triggered by having a serial number which is actually a number! I usually use a mixture such as USBDM-JS16-SWD-0004 Strangely enough USB Serial numbers don't have to be a number!
Everything works fine,
thanks alot for fast response/solution :)
BTW, I use simple serials to make symlynk like /dev/serial/Usbdm-0003 by udev rules to easy find the serialport for debug.
Another question, any plan to platformio porting and more STM32 support ? :)
Assumed Closed
Hi,
The FirmwareChager got segfault at startup (probably localization/text related, something wx character conversion issue)
log and coredump are attached.
core.zip FirmwareChanger.zip