Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000060 [FreeEMS-Tuner] Comm Interface crash have not tried 2008-11-16 14:42 2009-09-02 21:39
Reporter Fred View Status public  
Assigned To sry_not4sale
Priority normal Resolution open  
Status feedback   Product Version
Summary 0000060: Serial Comms Funnies Cause Hard Freeze
Description A while ago I noticed that I could connect both cute comm and this to the serial port at the same time. This is unusual in itself and probably related as most apps lock the device for exclusive use by default. Today I had cutecom listening and tuner talking which was fine. Then I disconnected cutecom and sent another packet and it locked up solid using lots of cpu.
Additional Information It was dumping a lot of these out before dying (while both connected) :

<LogRecord: serial.FreeEMS_Vanilla, 40, /home/fred/ben/protocols/FreeEMS_Vanilla/0_0_17.py, 163, "Bad/incomplete data found in buffer before start byte: E0">
<LogRecord: serial.FreeEMS_Vanilla, 40, /home/fred/ben/protocols/FreeEMS_Vanilla/0_0_17.py, 163, "Bad/incomplete data found in buffer before start byte: E0">
<LogRecord: serial.FreeEMS_Vanilla, 40, /home/fred/ben/protocols/FreeEMS_Vanilla/0_0_17.py, 163, "Bad/incomplete data found in buffer before start byte: E0">
<LogRecord: serial.FreeEMS_Vanilla, 40, /home/fred/ben/protocols/FreeEMS_Vanilla/0_0_17.py, 163, "Bad/incomplete data found in buffer before start byte: E0">
Tags No tags attached.
Issue Type Bug
Attached Files

- Relationships

-  Notes
(0000075)
Fred (administrator)
2008-11-16 14:45

Related to this is the thing where the gui is locked while receiving data. I'd like to understand that a bit better as it seems like the gui should be a thread (or more) and the reception and sending should be a thread each. Serial transmission is slow and binding up during that seems like a bad idea. Perhaps I have a poor understanding of it at the moment?
(0000076)
BenFenner (developer)
2008-11-16 15:06

Stop trying to break shit on purpose. ;)
(0000077)
sry_not4sale (administrator)
2008-11-16 20:33

The incomplete data in the buffer message is because there is a constant stream of 0xE0 bytes coming through.

Sounds like a cutecom issue (of course... its never my code... :P).

Although its definitely worth either moving the receive code into a thread or at least limiting the amount of bad bytes it will loop through at a time.
(0000078)
Fred (administrator)
2008-11-16 20:53

Well, you may say this, but cute com and minicom don't allow hcs12mem to talk and your com library does :

FLASH erase: wait ...
FLASH erase: memory erased
Erasing flash was successful!
Load the firmware to your FreeEMS? [ yes | abort ]
abort
Thank you for choosing the FreeEMS to run your engine, goodbye.
fred@rwdlsd:~/workspaces/home/freeems/src$ ../bin/freeEMSloader.bash /dev/ttyUSB0 zoutput/freeems-v0.0.18.s19
Welcome to the FreeEMS firmware loader

This program is released under the GPL V3
Please see http://www.gnu.org/licenses/ [^] for details

This version is for mc9s12xdp512 based FreeEMS's

Do you have a mc9s12xdp512 based FreeEMS? [ yes | quit ]
yes
Checking configuration and arguments...
Everything looks good!
Erase the flash on your FreeEMS? (This is necessary to load new firmware) [ yes | abort ]
yes
Erasing the FreeEMS flash without verification...
hcs12mem: Freescale S12 MCU memory loader V1.4.1 (C) 2005-2007 Michal Konieczny <mk@cml.mfk.net.pl>

target info <single chip MC9S12XDP512 MCU>
target mcu <MC9S12XDP512> family <S12X>
SM serial port </dev/ttyUSB0> baud rate <115200 bps>

error: timeout - no connection with target
Erasing flash failed! exiting...

I don't necessarily think this issue is your code, but quite possibly the library.

As for the threading discussion, consider the situation where their is a constant stream of data coming in from the port. Will it lock up solid for that? Or will it continue to smoothly display graphs and user actions etc?

Thoughts?

- Issue History
Date Modified Username Field Change
2008-11-16 14:42 Fred New Issue
2008-11-16 14:42 Fred Status new => assigned
2008-11-16 14:42 Fred Assigned To => sry_not4sale
2008-11-16 14:42 Fred Issue Type => Bug
2008-11-16 14:45 Fred Note Added: 0000075
2008-11-16 15:06 BenFenner Note Added: 0000076
2008-11-16 20:33 sry_not4sale Note Added: 0000077
2008-11-16 20:53 Fred Note Added: 0000078
2009-09-02 21:39 sry_not4sale Status assigned => feedback


Mantis 1.1.7[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker