rbei-etas / busmaster

BUSMASTER is an Open Source Software tool to simulate, analyze and test data bus systems such as CAN. BUSMASTER was conceptualized, designed and implemented by Robert Bosch Engineering and Business Solutions (RBEI). Presently it is a joint project of RBEI and ETAS GmbH.
http://rbei-etas.github.com/busmaster/
GNU General Public License v3.0
929 stars 495 forks source link

Runtime Error on sending messages #21

Closed etas-lorenz closed 12 years ago

etas-lorenz commented 12 years ago

One of our customers reported that he was able to reproducible crash BUSMASTER.

In the Tx Message Window, do the following steps:

After the communication started, a message is sent every 10ms. First after pressing the Key, all 10 messages are send every 10ms.

However the transmission cannot be stopped again. The Start/Stop button is without function, the transmission continues. Some time later the BUSMASTER reproducable crashes (or after trying to "Disconnect" the hardware).

There is a window "Microsoft Visual C++ Runtime Library" that reads "Runtime Error!" and "abnormal program termination". There is no further information that helps in solving the problem.

rbei-ratnadip commented 12 years ago

We started working on this issue by trying to reproduce this scenario. In case we can't reproduce, I'll revert back immediately for further information.

rbei-ratnadip commented 12 years ago

When a cyclic transmission block is additionally associated with a key press event, the key press results in a burst of messages - a continuous transmission of messages without no imposed time delay. This is done to realise a maximum bus load scenario and hence it is intentional. It works well with PCAN USB without any problem.

But with ES581 or with the combination of the two, the crash happens. The below two modifications have been brought:

Modification 1: There is a bug identified with the Tx Window code which involves checking the current value of a boolean variable to decide if the transmission stops. This has been fixed. The respective commit information is https://github.com/rbei-etas/busmaster/commit/a4a3f677652d974bfe76ff8b7437ddd6e3c80c9d

We carried out the same with ES581 and PCAN hardware with the following setup and result:

Tx Process | Rx Process | IDE | Baud rate | Result “-----------------------------------------------------------------------------------------“ PCAN | ES581 | VC++ Ex | 1000 kBps | Crash” ES581 | ES581 | VC++ Ex | 1000 kBps | Successful PCAN | ES581 | VC++ Prof | 1000 kBps | Loss of data (fast transmission, slow reception) ES581 | ES581 | VC++ Prof | 1000 kBps | Successful ES581 | PCAN | VC++ Ex | 1000 kBps | Successful ES581 | PCAN | VC++ Prof | 1000 kBps | Successful

Since we have lent the other PCAN USB device to one of the internal user project group, PCAN against PCAN couldn't be tested.

Modification 2: The present UI isn't indicative about this message burst event, although the help file describes this strategy. It can be safely assumed that the user's intention was different. This calls for a rework on the RS. Perhaps a third option in the transmission block explicitly mentioning this scenario can be defined. This will leave apparently no room for any confusion.

Hence, as an immediate solution a time delay (equal to the same as the current Tx block) is introduced.

The result is the following:

Tx Process | Rx Process | IDE | Baud rate | Result “-----------------------------------------------------------------------------------------“ PCAN | ES581 | VC++ Ex | 1000 kBps | Successful ES581 | ES581 | VC++ Ex | 1000 kBps | Successful PCAN | ES581 | VC++ Prof | 1000 kBps | Successful ES581 | ES581 | VC++ Prof | 1000 kBps | Successful ES581 | PCAN | VC++ Ex | 1000 kBps | Successful ES581 | PCAN | VC++ Prof | 1000 kBps | Successful