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
928 stars 495 forks source link

Busmaster crashes when selecting Peak-Driver #703

Closed GT-Derka closed 10 years ago

GT-Derka commented 10 years ago

I downloaded the Busmaster-Sources, compiled (without any changes) and started Busmaster. Afterwards I choose CAN->Driver Selection->PEAK USB and Busmaster crashes. "Unbehandelte Ausnahme bei 0x0F046C3F (CAN_PEAK_USB.dll) in BUSMASTER.exe: 0xC0000005: Zugriffsverletzung beim Lesen an Position 0xC52924F7". The corresponding source-code is the last line of: if ( m_pBaseDILCAN_Controller ) { // set the application parameters. m_pBaseDILCAN_Controller->CAN_SetAppParams(hWndOwner, pILog); hResult = m_pBaseDILCAN_Controller->CAN_LoadDriverLibrary(); in DILC_SelectDriver() in DIL_CAN.cpp.

The hardware is properly connected (Windows 7 device manager confirms this). The latest driver (3.8.2.10146) is installed. The crash occurs independently of the connected hardware (PCAN-USB, PCAN-USB Pro, no hardware).

But! When I use the installed version of Busmaster v2.3.0 no crash occurs. However using this version, the CAN-messages seems to become transmitted on the wrong channel (Channel 1 selected -> physically transmitted on CAN2 and vice versa). Maybe this behaviour is a misconfiguration of mine, that's why I started to use the Compile-Version of Busmaster...

Can anyone verify the crash?

RBEI-Saravanan commented 10 years ago

Following points are to be taken care when using source code:

  1. Visual Studio 2012 should be launched as Administrator
  2. Startup project should be BUSMASTER
  3. To debug, please use busmaster_debug configuration
GT-Derka commented 10 years ago

Yes, I considered all three points.

RBEI-Saravanan commented 10 years ago

Could you please check by copying the CAN_PEAK_USB.dll form the installed folder to the busmaster_debug and Release folders under BIN folder.

If the issue is not reproducible, then this could be related with outdated dll in these folders

GT-Derka commented 10 years ago

Ok, I don't understand what's going on here, but this solves the issue, that busmaster crashes when loading the driver. As I wrote, the latest Windows-Driver is installed, but when I compile Busmaster using the CAN_PEAK_USB.dll delivered with the Sourcecode from GitHub, Busmaster will crash when loading the driver. When I use the CAN_PEAK_USB.dll from the install-version of Busmaster, the driver loads successfully, without any crash. The difference between both dll-files is the filesize (127.488 Bytes - works; 118.784 Bytes - crashes). The dataversion in both files is the same. Is something wrong in here? In my eyes at least the dll delivered via GitHub must be replaced with the version from the installation-file. Thus I don't close the issue yet.

RBEI-Saravanan commented 10 years ago

Issue fixed with commits 609fe41de29f3f55346995dff6019426d5259a89 and e51e7156241028056d9fc846776e34e619fae66d