ADC Init in C++ Application Fails When C# Application Is Running And Using Library

I’m using the new library (TdxAllLibraries.dll) in a C# application and C++ application, both running same time.

  • C# app only initialise and use I2C
  • C++ app uses I2C, ADC,…

Now when I’m running the C# application and start the C++ application I get an error at ADC initialisation (see below). If I stop the C# application OR stop using the I2C in C# (I guess the TdxAllLibraries at all) my C++ application runs fine.

I’ve tested this with the latest library V2.0-20170524 under WinCE 2.0 and WinCE 2.1b2. With library V1.9.3609 it works!

So I guess this is a bug in the latest library release.

ADC init errror:

Error is “Unhandled exception at 0x426AC459 (TdxAllLibraries.Dll.dll) in …exe 0xC0000005h: Access violation reading location 0x00000070”

[upload|KGEpxyFzHYRWtxBF4zOgSKmG6Vk=]

Call stack shows:

[upload|sEYeW+o3hWOeyY3G9UtW6IgMpqE=]

@TriUrs : Do you have a little sample code, to reproduce this immediately on our side?

Hi @samuel.tx

An example project attached. Created in VS 2013. All libraries are included.

As soon as the I2C library has been initialized in the C# program, the ADC can no longer be opened in the C++ program and the upper error message appears with the crash. If I quit the C# program (de-initialize I2C isn’t enough) the C++ program can open the ADC again.

Toradex Lib Access .Net and Cpp

I tried to reproduce this with the an internal library version and was not able to reproduce this issue any longer. Can you confirm this? Here you get the internal library boundle.