FreeEMS Issues - Tunix
View Issue Details
0000534TunixGeneral Featurespublic2012-03-09 16:412012-03-11 01:43
LinuxUbuntu10.04 Lucid
0000534: mtx crashes on finding freeEMS ecu's on start up on newest firmware
mtx crashes on finding freeEMS ecu's on start up on newest firmware

This was also tested with cutecom ~
was able to start/stop data stream
was able to send cmd for version and got response

was able to parse file correctly
Normal -
click on freeems
click on find my ecu
program disappears
( dmesg notes a seg fault )

Debug -
run in terminal ( from megatunix build root directory )
cd src/.libs ; gdb ./megatunix
copy and pastes into gdb
run --g-fatal-warnings

click on freeems
click on find my ecu
( program does not disappear )
( all tabs load on left and the 2 extra run boxes load on right - grayed out )
gdb notes seg fault
program displayed unable to communicate with ecu screen
( screen has 2x buttons exit or go offline)
program does not respond to input
( run backtrace in gdb)
result below [^] << GDB debugging information of crash [^] << cutecom dump parsed
No tags attached.
png Screenshot-1.png (550,992) 2012-03-10 15:19
? FreeEMS-0.2.0-SNAPSHOT-99-gc76a4e0-MissingTeeth-Crank-60minus2.s19 (167,736) 2012-03-10 15:53

2012-03-09 16:45   
Please include the hash of the firmware that you're using.
2012-03-09 16:54   
firmware hash = g1497f32
2012-03-09 17:03   
hash is <bit after g> or 1497f32
didnt know that at time of posting
2012-03-09 17:16   
tested with current newest firmware c76a4e0
appears to load after the choice ecu screen and then crash
( programn does display data in fields crashs on the left boxs then crashs )

debug [^]
(program turns gray after choice ecu screen loads the 2 boxes on the left no data displayed )
backtrace ran
2012-03-09 17:37   
can confirm exact same behavior with an independent Ubuntu 10.04 build, same toolchain, freeems, megatunix builds.
2012-03-10 12:44   
I Can't replicate that here. Please pull latest megatunix (197db26c50696d43184db1e87cb0b6ec68684e2f) and re-test.
2012-03-10 15:38 [^] << GDB info [^] << DMESG info from non-gdb run

build current
running in gdb

after the click ecu choice screen
the 2x boxes with ecu information read data and after a couple seconds pass just stops then turns gray ( picture and gdb backtrace posted above )

launching without GDB the program disappears after clicking the find ecu button! Also noticed kernel crash included dmesg information. this does not happen while running in gdb.
2012-03-10 15:58   
Added firmware file for further testing if needed. pl2303 usb>serial used which is a common adapter!
2012-03-10 17:25   
Updated to g197db26, repeated preludelinux's process twice using both pl2303 and ZT3241E usb>serial adapters, TA board, c76a4e0 firmware.

Ran /usr/local/bin/megatunix, selected "FreeEms" on ECU selection screen, clicked "Find my ECU", concluded with segfault but no kernel crash (using Lucid 10.04's 2.6.32-37-generic)

Debug mode pastebin: [^]

Can communicate with firmware via CuteCom and injected commands. Will try different parity options with serial/MegaTunix and report back.
2012-03-10 20:00   
Modified-parity tests yield no change.
2012-03-10 21:50   
Toxic, did you send binary packets, get desired results, and record a valid parseable stream from your old weird adaptor with cutecom? Just curious. If you did, it should work with MTX too.
2012-03-10 23:07   
strange. I can NOT replicate either of your faults. It seems to be 64 bit specific.

I tried some explicit casting (don't think it would have an effect, but I don't have access to a 64 bit box with an ECU to test with.
2012-03-11 00:18   
Ok updated.
It appears to work on 64bit now. Tested with debug version~
Still causes a kernel driver crash but that might be due to ubuntu but never use to get kernel crashes just making a note of that.

passing > Toxicgumbo to also test and close if fixed!
2012-03-11 01:39   
The latest MTX build works flawlessly for me with the pl2303. Great job.

Fred, yes, yes, and yes, however MTX reports serial errors as the data streams in. I'll investigate that off to the side.
2012-03-11 01:43   
Tested as fixed in hash 6302de8.