Memory Leak with Notification-Only Device

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

Moderator: Moderators

Post Reply
dmadigan
Posts: 2
Joined: Sat Apr 18, 2015 6:46 pm

Memory Leak with Notification-Only Device

Post by dmadigan » Sat Apr 18, 2015 7:11 pm

Hi,
I am currently working on updating our existing 3D mouse application to use the new SDK (3.0) with driver version 10.2.3 and am seeing some strange behavior when I my 3D mouse is disconnected. I run through the normal initialization routine, SiInitialize(), SiOpenWinInit(&oData, appWindow), SiOpen(appName, SI_ANY_DEVICE, SI_NO_MASK, SI_EVENT, &oData). In this case, even though there is no device connected, the SiOpen call is returning a valid device handle with a device name of "Notification-Only device". Later on in my message loop I call SiGetEvent (I had been assuming that if I got a valid device handle back from SiOpen then a device was actually connected), in order to see if whatever event I am processing is a 3D mouse event. This call correctly returns that it is not an event but appears to leak memory every time it is called in this situation.

Also note that I see the same behavior in some of the demo applications as well (Chicken, Jet, Puzzle, 3DxTest). If I launch the application with no device attached and move the mouse around in the graphics area the memory for these applications skyrockets.

I am able to work around this currently since it appears that SiGetNumDevices() returns the correct number of connected devices and I can avoid trying to call SiGetEvent if there are 0 connected devices. I have seen situations where SiOpen is returning NULL as I would expect but I am not sure what triggers a NULL return vs a return of a "Notification-Only device".

Is there something that I am missing here or something that I am doing wrong?

Thanks for the help.

ngomes
Moderator
Moderator
Posts: 2440
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Memory Leak with Notification-Only Device

Post by ngomes » Mon Apr 27, 2015 4:15 am

Hi dmadigan,

Thanks for reporting this issue. We're currently looking at it.

We believe that you have not done anything wrong as the memleak appears to be somewhere in 3Dconnexion's code.

End-users can prevent the memleak but ensuring that at least one 3Dconnexion is connected or by removing the driver (if no device will be connected).

ngomes
Moderator
Moderator
Posts: 2440
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: Memory Leak with Notification-Only Device

Post by ngomes » Mon Aug 29, 2016 1:46 am

The memory leaks were resolved in version 3.2.0 of the 3DxWare SDK for Windows, published in June 2015.

If your program is affected by this bug, please ensure you link against the libs that ship in the latest SDK.
Nuno Gomes

Post Reply