C# Windows Formas and SDK 4.0 Crashing

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
wolpi
Posts: 3
Joined: Mon Apr 13, 2020 2:06 am

C# Windows Formas and SDK 4.0 Crashing

Post by wolpi »

Hi all,
I'm trying to implement 3D Space Mose support in a c# net forms app.
I'm using VS2019 and W10-64.
After substituting some obsolete libraries i got the Wpf app running (3DxTestNL).
Now I'm trying to set up the same thing with a fresh WinForms app, but it crashes in the Open3DMouse call.
I've reduce the implementation to the INavigation3D interface and the two calls to instantiate the class and open the driver
navigation3D = new Navigation3D(this);
navigation3D.Open3DMouse("Test");
but i get an access violation:
System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt.'
Which things have to be filled to work?

Regards
Wolpi
ngomes
Moderator
Moderator
Posts: 3321
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: C# Windows Formas and SDK 4.0 Crashing

Post by ngomes »

Hi wolpi,

Perhaps you can share a simplistic VS2019 project that we can use to reproduce the issue?
Nuno Gomes
wolpi
Posts: 3
Joined: Mon Apr 13, 2020 2:06 am

Re: C# Windows Formas and SDK 4.0 Crashing

Post by wolpi »

Hi ngomes,
please find attached the project.
Hope it will help :D
regards
wolpi
Attachments
SpaceMouseRaw.zip
Simple test project
(255.63 KiB) Downloaded 328 times
ngomes
Moderator
Moderator
Posts: 3321
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: C# Windows Formas and SDK 4.0 Crashing

Post by ngomes »

Does your project require "Prefer 32-bit" to be enabled? See project Properties > Build.
wolpi
Posts: 3
Joined: Mon Apr 13, 2020 2:06 am

Re: C# Windows Formas and SDK 4.0 Crashing

Post by wolpi »

Thanks for the hint, I did not see that.
I just created a new project, and it seems to be checked by default (Microsoft does not trust it's 64 bit applications? :P )
If I uncheck it, everything seems to run (at least no crash)! :D
At the moment, my target application is running as 64bit, so it should be no problem.
Some camera drivers I want to use are 32bit only, but I hope I can handle it another way than changing the whole application to 32bit.

Thanks for the quick help!
Wolpi
ngomes
Moderator
Moderator
Posts: 3321
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: C# Windows Formas and SDK 4.0 Crashing

Post by ngomes »

We have confirmed this this limitation (unhandled exception running 32-bit processes) to be a bug in the assembly delivered in the driver included in release 10.6.6 and older.

The bug is being tracked as WIN-649 and a fix should be delivered in the next release, expected in the second half of May.

Thank you, @wolpi, for bring this issue to our attention.
Post Reply