COM event handler not called

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

Moderator: Moderators

Post Reply
Ambroise
Posts: 4
Joined: Mon May 14, 2007 8:33 am

COM event handler not called

Post by Ambroise »

Hello,

After using the COM SDK to add 3Dconnexion device support to our non-COM, single-threaded, wxWidgets-based application, I had a completely working prototype.

However, I switched to a new computer last week and since then, although I can connect to the driver, hooked event handlers are never called.

Could it be related to the fact the new computer has a dual-core CPU while I was previously working on a single-core?

FYI, here is the 3dxWare log file:

Code: Select all

17:43:44.945: UdCtl: Protocol 30 request to open connection for hwnd 0x80932.
17:43:44.945: UdCtl: App transport list: 17:43:44.945: 50 17:43:44.945: 30 17:43:44.945: 
17:43:44.945: UdUi:TlReadConfigFile: Reading file: C:\Program Files\3Dconnexion\3Dconnexion 3DxSoftware\3DxWare\FR_FR\profiles\default\any.scg
17:43:44.945: UdUi:TlReadConfigFile: Reading file: C:\Program Files\3Dconnexion\3Dconnexion 3DxSoftware\3DxWare\FR_FR\profiles\default\any.scg
17:43:44.976: UdArbitrate:  New Target: hWnd: 0x80932, Class Name: 3DxInput:Default, AppName (SiOpen): MyAppName.exe, ExeName: MyAppName.exe
17:43:44.976: UdCtl: Open accepted on protocol 30 for application: MyAppName.exe(MyAppName.exe)
17:43:44.976: UdUi:HandleSyncCommand: rec'd SI_SYNC_ITEM_QUERY
17:43:44.976: UdUi:HandleSyncCommand: SI_SYNC_ITEM_QUERY rejected.  APP_CONTROLS_BUTTONS==FALSE
17:43:46.552: UdUi:TlReadConfigFile: Reading file: C:\Program Files\3Dconnexion\3Dconnexion 3DxSoftware\3DxWare\FR_FR\profiles\default\any.scg
17:43:46.567: UdUi:TlReadConfigFile: Reading file: C:\Program Files\3Dconnexion\3Dconnexion 3DxSoftware\3DxWare\FR_FR\profiles\default\any.scg
17:43:46.598: UdCtl: Closed application MyAppName.exe on protocol 0.
17:43:46.598: kbdtrans: UdTransClose request made
17:43:46.598: UdCtl: Closed application MyAppName.exe on protocol 50.
17:43:46.598: s80trans: UdTransClose request made
17:43:46.598: UdCtl: Closed application MyAppName.exe on protocol 30.
From time to time, I also get about 20 "full buffer" lines before the three Close lines. However, I'm not able to reproduce this now, therefore I cannot tell you the exact content of these lines.

I'm testing all result codes and there's no error while registering handlers and connecting to the driver. I can event ask the device type.

All demos are working fine, so the issue is definitely in my code.

Any hint?

[Windows XP SP2, Intel Core 2 Duo, software 3.3.2, driver 6.3.3, firmware 3.18, SpaceNavigator]
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

Hi Ambroise,

Nothing comes to mind here. Dual-core shouldn't be a problem. The log file looks normal. The buffer full messages will be generated when the device is sending data to your app (or some app) and the app isn't listening. It could be because the app is in the process of shutting down.

Jim
3Dx Software Development
Ambroise
Posts: 4
Joined: Mon May 14, 2007 8:33 am

Post by Ambroise »

Thank you for your quick reply.

I have made further tests today and I found out that this is not linked to the dual core CPU, since the software also fails on Pentium 4 machines like the one it used to be working on.

I keep investigating... I will try to find a backup of the application that was compiled on my previous computer so as to run it on my new machine in order to tell if the problem comes from the runtime environment or from the compile-time environment.

Is it normal to have the three "Close" lines right after loading the driver? My app isn't closing, it just keeps running after that. What are protocols 0/30/50?
Ambroise
CAD/CAM Software Engineer
ngomes
Moderator
Moderator
Posts: 3321
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

Hi Ambroise,
Is it normal to have the three "Close" lines right after loading the driver? My app isn't closing, it just keeps running after that.
I think not.
Are you instantiating the TDxInput Device object before your application completes initialising? For example, is there a splash screen that gets created (and/or closed) after your create the COM object?
Nuno Gomes
Ambroise
Posts: 4
Joined: Mon May 14, 2007 8:33 am

Post by Ambroise »

Hi,

There is indeed a splash screen that is displayed while the COM object is created (however, hooking handlers and connecting to the driver happens after the splash screen is closed).

I went back to my previous computer and I noticed it was running 3DxWare 3.2.2 (while the new machine has 3.3.2 installed).

So I uninstalled 3.3.2 and I downloaded 3.2.2 from your legacy software archive, and things are working fine now. However, the About panel still displays Driver 6.3.3 (as with version 3.3.2) while on my older computer it says 6.2.1.

Do you believe there could be a bug in 3DxWare 3.3.2, or could it be possible that a design change from 3.2.2 to 3.3.2 has revealed a bug on our side?

Also, what's the difference between the PE version and the non-PE version? The older computer has 3.2.2 PE and I installed 3.2.2 non-PE on the new one. However, both seem to be working fine.

To sum things up:
- PE 3.2.2 + Driver 6.2.1 : OK
- 3.2.2 + Driver 6.3.3 : OK
- PE 3.3.2 + Driver 6.3.3 : demos OK, problem with my app
Ambroise
CAD/CAM Software Engineer
ngomes
Moderator
Moderator
Posts: 3321
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

Hi Ambroise,

There was indeed an implementation change (not design) of 3DxInput in 3.3 that is causing problems. One of the consequences, is that closing top-level windows (like splash screen) after the Device object is created, may close the connection down. This is a bug in release 3.3.2. More specifically, in driver 6.3.3.

One of the configurations you reported is unsupported: driver v. 6.3.3 in release 3.2. I believe the uninstallation of 3.3.2 was not successful before you installed 3.2 on the new machine. To be sure, you should uninstall 3.2, reboot the machine and re-install. That should bring it to driver 3.2 (the supported configuration).

For an explanation on differences between Standard and Personal editions of the SpaceNavigator, please refer to this topic. From the point-of-view of a developer, there is no difference.
Ambroise
Posts: 4
Joined: Mon May 14, 2007 8:33 am

Post by Ambroise »

That must definitely be the cause for our issue: our 3Dconnexion support plug-in can be loaded either at application startup (while a splash screen is displayed) or later from a modal dialog. In both cases, the top-level window is distinct from the application main window and is closed shortly after. And in both cases, the bug appears.

We're waiting for a fix and until then, I'll stay with version 3.2.2.

Thank you for your very responsive support.
Ambroise
CAD/CAM Software Engineer
ngomes
Moderator
Moderator
Posts: 3321
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Post by ngomes »

We're waiting for a fix and until then, I'll stay with version 3.2.2.
We will have the fix ready for release 3.4 and we will see if it is possible to merge it in a point-release for 3.3.
Post Reply