Mysterious protocol issues in a Cinema4D plugin - where does MWM come from?

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

Moderator: Moderators

Post Reply
Cairyn
Posts: 2
Joined: Fri Nov 04, 2016 3:40 pm

Mysterious protocol issues in a Cinema4D plugin - where does MWM come from?

Post by Cairyn » Wed Feb 24, 2021 9:21 am

Hello; I ran into a mysterious protocol issue with Cinema 4D.

Many years ago, I programmed a plugin for Cinema 4D to support the SpaceNavigator. (Yes, there is a built-in one but that doesn't even support turntable motion so I did my own.) This is using the 3Dconnexion SDK, and it works fine; I've been using it for years in various installations on various computers, including a major revamp to the newest 3Dconnexion driver versions (almost, I'm on 10.6.3 now).

Recently though, I wanted to give the plugin to a "customer", and they found that it doesn't work for them. During initialization, the SDK throws an error "Attempt to mix MWM and S80 protocol in invalid way -- Error code: 22" and subsequently, "Invalid 3DxWare handle". (The texts are my own output but it's all taken from the SDK so it shouldn't matter.)

Now, I am aware that the older Cinema 4D versions wanted the MWM protocol for the internal SpaceMouse handler, so originally I ran into issues until I adapted the configuration file, as my plugin uses S80. But that was many years ago, and was a problem long solved, and I think Maxon has updated the internal handler to use S80 as well.

In fact, if I remove the Cinema 4D.exe.xml configuration file, everything still works on my machines - the defaults seem to be enough to keep the SpaceNavigator happy. The driver creates a new configuration file when necessary (e.g. when I start some context definitions), and that new configuration file says:
<InheritsFromID>ID_Default_S80_Cfg</InheritsFromID>
So, S80 is fine and working great, and if I read correctly, MWM is even deprecated by 3Dconnexion, so I haven't seen any reason to watch out for that any more...

...except now this "customer" is getting that very error. As my plugin wants S80, I would interpret the message in the way that the customer's system is sending messages by way of the MWM protocol to Cinema 4D / my plugin.

And that's what I don't get. The customer reinstalled the 3Dconnexion driver; they deleted the config file for Cinema 4D; they tried versions 10.6 and 10.7; it's still not working. Where is that MWM coming from?

I see no way to reconfigure; the "3Dconnexion Home" program doesn't offer a base protocol selection. The automatically generated config file for Cinema 4D refers to ID_Default_S80_Cfg; the file Global.xml refers to ID_Base_Cfg; neither configuration can be found on my system (I suppose they are built-in?). How can I find out what is initiating that MWM protocol?

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

Re: Mysterious protocol issues in a Cinema4D plugin - where does MWM come from?

Post by ngomes » Wed Feb 24, 2021 11:55 am

Hi Cairyn,
Cairyn wrote:
Wed Feb 24, 2021 9:21 am
they deleted the config file for Cinema 4D; they tried versions 10.6 and 10.7; it's still not working. Where is that MWM coming from?
Are you positive they deleted the correct file?

In addition to the default configuration in the driver installation directory, user configuration settings are saved to %APPDATA%\3Dconnexion\3DxWare\Cfg. Your customer may have a config that is somehow conflicting with what you're trying to do.

We suggest the customer to try cleaning up the user config (stop driver, rename the "3Dconnexion" directory in %APPDATA%) to see if changes anything.

Cairyn
Posts: 2
Joined: Fri Nov 04, 2016 3:40 pm

Re: Mysterious protocol issues in a Cinema4D plugin - where does MWM come from?

Post by Cairyn » Wed Feb 24, 2021 4:38 pm

ngomes wrote:
Wed Feb 24, 2021 11:55 am
Hi Cairyn,
Cairyn wrote:
Wed Feb 24, 2021 9:21 am
they deleted the config file for Cinema 4D; they tried versions 10.6 and 10.7; it's still not working. Where is that MWM coming from?
Are you positive they deleted the correct file?

In addition to the default configuration in the driver installation directory, user configuration settings are saved to %APPDATA%\3Dconnexion\3DxWare\Cfg. Your customer may have a config that is somehow conflicting with what you're trying to do.

We suggest the customer to try cleaning up the user config (stop driver, rename the "3Dconnexion" directory in %APPDATA%) to see if changes anything.
Well, I'm not in the same location as the customer, so I can't tell for sure, but we are aware of the %APPDATA% directory. Then there is the directory under ProgramData but on my system, the cfg directory here is empty. And then I just noticed that there is a third possible source, the installation directory where under 3DxWinCore64/Cfg I find a ton of config files for all kinds of software - apparently also the default configs that the other configs inherit from. So I suppose it can be possible that the driver pulls an old Cinema4D config file from there, too...?

(On my system, there just is no config file for Cinema 4D there... also, it would surprise me if it would use MWM as any newer C4D should use S80 already. Sadly I cannot install a newer driver since these do no longer support the SpaceNavigator.)

I will inform the customer about that third option, and we'll see if they still have some C4D config relics on their system. Thanks; I'll follow up later...

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

Re: Mysterious protocol issues in a Cinema4D plugin - where does MWM come from?

Post by ngomes » Thu Feb 25, 2021 3:09 am

Cairyn wrote:
Wed Feb 24, 2021 4:38 pm
I cannot install a newer driver since these do no longer support the SpaceNavigator.
You most definitely can install the very latest driver. It supports the SpaceNavigator just fine. Refer to this FAQ article and see it has "latest available" for the driver version with extended support. That status won't change until end of September when "extended support" ends, after a 15 year-long run since the product was launched back in 2006.

Post Reply