Page MenuHome

NDOF mouse not working in code signed macOS builds
Closed, ResolvedPublic

Description

System Information
Operating system: MacOS Mojave 10.14.5
Graphics card: Radeon Pro 555X 4 GB, Intel UHD Graphics 630 1536 MB

Blender Version
Broken: v2.8 RC 3
Worked: Version 2.79b (2.79b 2018-03-22, Blender Foundation) It works just fine in the last official release.
Note that this also worked for several interim 2.8 versions, but unfortunately I don't know the specific hashes.

Short description of error
No longer able to use 3d Connexion Space Navigator (USB wired version, the simple one with two side buttons) in latest 2.8 RC 3.
The device works just fine in 2.79b which I also have installed and tested back and forth between the two programs.

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).

  1. Confirm Space Navigator mouse works on OS listed above. Has latest software installed. Works with Demo apps and Blender 2.79b.
  2. Launch affected Blender version (RC3) in new scene.
  3. Observe that viewport can't be controlled at all when moving mouse.
  4. Observer that pressing the buttons on mouse which typically bring up the NDOF menu, do nothing.

Event Timeline

I just tested RC3 with my 3dconnexion Spacemouse Compact, and it seems to work fine.

Following up on my original bug report. I had the opportunity to test on a different machine with a nearly identical setup, but this time using a SpaceMouse Wireless (Similar, but newer model with two button device but connected to USB wireless receiver). Just to be clear this was a different laptop and a different SpaceMouse. Result was the same.

Things work just fine in 2.79b but don't work in 2.8 RC3.

Broken on:
2.8 RC3, MacOS Mojave 10.14.5, 3D Connexion 3DXWare 10 (3DxMacCore version 1.1.0, 3DxWare version 10.6.1)

Same exact behavior as originally reported, no response whatsoever from Blender, neither on movement of the stick nor button presses.

And for additional clarity, since it appears the company renamed their product line at some point in time. The two pieces of hardware I tested are these:
SpaceMouse Compact: https://www.3dconnexion.com/spacemouse_compact/en/
SpaceMouse Wireless: https://www.3dconnexion.com/spacemouse_wireless/en/

Hello Dev Team,

Same here with 2.8 RC1 to 3 and MacOS Mojave 10.14.6, 3dconnexion Spacemouse Wireless does not respond.
In the experimental builds the mouse works as expected, just tested with 379b2d and works OK.

Thanks,
Ludo

Hello,

I have been unable to use my 3DConnexion Wired SpaceMouse Compact on Blender 2.8rc1, rc2, and rc3 on macOS 10.14.5 Mohave. Works in blender 2.79.

I've attached my system-info.

Same issue here. Not working anymore for me either.

Spacemouse compact (wired).

3Dconnexion software is up to date:
   3DxMacCore version 1.1.0
   3DxWare version 10.6.1

Mac OSX Mojave 10.14.5

Everything worked fine for all of the experimental builds... I did not try RC1, or RC2, however RC3 is not responding to the 3D mouse.

Same Issue for RC1/2/3. Works fine in all other software. Mac OSX Mojave 10.14.3 .. So its also not about the Mojave version. It is definitely Blender.

I just built a debug build of Blender 2.81a and the SpaceMouse is working again!

Brecht Van Lommel (brecht) triaged this task as Needs Information from User priority.

The issue is most likely that that final releases are code signed, which is somehow affecting loading of the NDOF library. Can anyone run the release candidate from the command line, and attach any output it gives here?
https://docs.blender.org/manual/en/dev/advanced/command_line/launch/macos.html

There is most likely some security feature that prevents the 3D connexion driver from being loaded.

Hello Brecht,

Just ran Blender from the terminal and this is the output:


Last login: Tue Jul 30 11:14:59 on ttys000
Ludos-iMac:~ LMD$ cd /Applications/Blender.app/Contents/MacOS
Ludos-iMac:MacOS LMD$ ./Blender
Read prefs: /Users/LMD/Library/Application Support/Blender/2.80/config/userpref.blend
found bundled python: /Applications/Blender.app/Contents/Resources/2.80/python


Maybe not at all related to this issue but also noticed that in all RC`s (Spacemouse not working) the 2 Spacemouse buttons call the radial menus, not the Blender NDOF settings and Home.

Hope is of any help.

Regards,
Ludo

The issue is most likely that that final releases are code signed, which is somehow affecting loading of the NDOF library. Can anyone run the release candidate from the command line, and attach any output it gives here?
https://docs.blender.org/manual/en/dev/advanced/command_line/launch/macos.html
There is most likely some security feature that prevents the 3D connexion driver from being loaded.

Just tried on the 2.8 release (btw congratulations!). Sadly NDOF is still broken. Here's the entire command line output.

mugurm-macbookpro:~ mugurm$ /Applications/Blender.app/Contents/MacOS/Blender
Read prefs: /Users/mugurm/Library/Application Support/Blender/2.80/config/userpref.blend
found bundled python: /Applications/Blender.app/Contents/Resources/2.80/python

Hello again,

I too am still experiencing issues with the new blender 2.8 release not detecting my Space Mouse Compact Wired.

I compiled the HEAD version with make debug and and it does work there. I messed around with GHOST_NDOFManager.cpp with DEBUG_NDOF_MOTION set and noticed a bug in GHOST_NDOFManager::sendMotionEvent(). In the switch statement checking m_motionState, it tries to print progress_string[data->progress]. If the motion state is set to finished (the last position of the enum), then the data pointer contains random data and crashes the program. I doubt that affects the main issue, but I can't find another reason for the SpaceMouse not to work in the release version.

Also, the GHOST_NDOFManager::setDevice function does not have product_id information for the SpaceMouse compact. It prints the following to the console:
ndof: unknown 3Dconnexion product c635

Finally, I ran into an issue where after a reboot, the 3dConnection driver under system preferences would not detect the device until I unplugged the USB connection and plugged it back in. Under the tools tab on the right side, it said "no device detected", but the SpaceMouse still functioned as a mouse. This was the most confusing behavior in Blender, as it would zoom in and out in the viewport.

I'm guessing it's failing to dlopen the library due to more restricted permission for code signed apps.

We may have to either enabled this:
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_allow-dyld-environment-variables

Or use an absolute path here:

module = dlopen("3DconnexionClient.framework/3DconnexionClient", RTLD_LAZY | RTLD_LOCAL);
Brecht Van Lommel (brecht) raised the priority of this task from Needs Information from User to Confirmed, High.Jul 31 2019, 4:53 PM

Marking as high since this should be resolved for the next release.

Hi there, I have the exact same problem and stumbled over this issue here (with the issue search ;)) before reporting it myself.

I might add that it seems that I have been "lucky" in the beta phase, as the two builds that I've downloaded always worked together with my connexion SpaceNavigator "3D mouse" (in my case it is connected via USB and officially not supported anymore by connexion, but other than that it still works great with the current connexion drivers under macOS Mojave 10.4.6 - and yes, including the mentioned beta versions of Blender, including Blender 2.79c that I've tried in the exact same configuration (on the same machine, hardware, software drivers etc.).

So the last known (to me) Blender beta version that works perfectly with the 3D connexion SpaceNavigator on Mojave 10.14.6 is:

  • Blender 2.80 Beta 2019-06-24 Hash: c0c1bb4542f39

And also:

  • Blender 2.79 2017-09-11 Hash: 5bd8c9

And with "working" I mean that I can move the virtual camera in the scene, and with "not working" I mean that "nothing moves".

System info (generated with the final 2.80):

I can confirm that it is the System Integrity Protection (SIP) that is causing My 3DConnexion SpaceMouse Enterprise with driver 10.6.3 not to work on macOS 10.14.6. I have disabled SIP and navigation now works as expected, but I still cannot assign keystrokes to buttons 1-10, however I can assign keystrokes to buttons 11 & 12. Hopefully keystrokes can be enabled for buttons 1-10 as it would be a huge time saver.

Can someone upload or tell me where to find a beta version from before RC1? Preferably the last Beta version they published..
I got blender 2.8 files to work on.. and am totally sick of doing so without the Spacemouse Pro. I set up my hotkeys to work with the 3D mouse.. and can't get the hang of doing everything with the keyboard and normal mouse only.. I actually put my client on hold.. simply because the space mouse doesn't work anymore.. kind of didn't expect the beta version to be more reliable then the release version.

I'd be really glad for any help

If there is something I can do to get this fixed, please let me know. I am not a programmer/software developer though..

Thank you in advance!

The 2.81 build should work since it is not signed:
https://builder.blender.org/download/

Using the nightly unsigned builds of 2.81 from https://builder.blender.org/download/ does indeed work. @Brecht Van Lommel (brecht) thanks for the tip. I'll be using one of those versions for the foreseeable future.

I'm guessing it's failing to dlopen the library due to more restricted permission for code signed apps.
We may have to either enabled this:
https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_allow-dyld-environment-variables
Or use an absolute path here:

module = dlopen("3DconnexionClient.framework/3DconnexionClient", RTLD_LAZY | RTLD_LOCAL);

I'd do with dlopen("/Library/Frameworks/3DconnexionClient.framework/3DconnexionClient" ... )
As it is installed on that location, I think there is no need for extra check if that exists. dlerror will report anyways if there was problem loading the framework.
(I can commit fix)

@Arto Kitula (akitula) : Just a note that I have added this to 2.81 milestone (since it was set to "High")

Can anyone here test the build that @Arto Kitula (akitula) posted to verify if it solves the issue?

I'll be back in 3 days, maybe @Brecht Van Lommel (brecht) can do it sooner.

@Arto Kitula (akitula) @Brecht Van Lommel (brecht) @Francesco Siddi (fsiddi) I had a chance to try the build from @Arto Kitula (akitula) and can confirm that NDOF works in it. All 6 axis work and seem responsive and also the NDOF menu pops up as expected. Thanks @Arto Kitula (akitula) for working on this! Looking forward to seeing this in the next release.