-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependency to libjack64.dll crashes Unity 2019 #15
Comments
This also affects builds made with Unity. However, the latest version producing working builds with Jack is Unity 2017.1.5.
I've created a minimal console application utilising the Jack 1.9.11 library on Windows 10 1903 x64 and Visual Studio 2019 (v142 platform toolset and Windows SDK 10.0.18362). That one crashes before the "hello world" line, too. MinimalJack-Console.zip |
So it seems that the jack developers have been informed about this problem, but didn't do anything until this point: jackaudio/jack2#332 For the time being, there is an insecure workaround on Windows 10:
Note: this option can also be set per-application, which might be desirable. On Windows 7, the equivalent of this workaround seems to be setting the registry key |
Hello, @Schroedingers-Cat I tried your workaround but Unity is still crashing whenever I try to enter in play mode with the test scenes. Unity just closes and it also closes Jack server. |
This issue is about the crashes upon accessing the jack dll when opening a Unity project. Your problem seems to be related to crashing when running a scene, so it's likely a different issue. I've answered your question on the Unity forum. |
Hi, I will follow in Unity forum then. Thanks https://forum.unity.com/threads/multiple-audio-channels-to-multiple-audio-outputs.522738/ |
So the solution is either #15 (comment) or to build Jack on Windows from Source Code with a more recent version of VS which has the ASLR feature implicitly enabled by default. |
@Schroedingers-Cat thanks for the hint. oops i realized the post is about Unity. But on SuperCollider Win10 64x there's the same exact problem. How did you change the option on an app base? On the Unity side or on the Jack side or both? |
You'll need to set the option for every executable that has a dependency to JACK. You can use a tool like this to find what libraries are necessary for a given software: https://github.com/lucasg/Dependencies |
Many thanks @Schroedingers-Cat ! |
Should i set this option for .exe only or for .dll too? |
I had to set the option only for the program loading the dll. |
FYI this has been fixed in Jack 1.9.17 - JackRouter has been recompiled and shouldn't cause this crash anymore, AFAIU. |
So great to see the devs have had the time to work on windows releases. |
Opening the sample project included within this repository, Unity 2019 instantly crashes during project loading while accessing the dependency libjack64.dll. This is reproducible on 9d3a32c but also all working previous commits are affected. The plugin from commit 9d3a32c has been built using Jack 1.9.11 libraries and the exact version of this library is installed on the systems where Unity 2019 crashes. This rules out incompatible jack library versions. Unity 5-2018 are not affected by this behaviour. The platform is Windows 10 x64 1809 and 1903.
How to reproduce:
Side note: It is also possible to delete any asset from the "Asset" directory except for the "Plugins" directory, ruling out any C# scripts as cause for the crash.
This project already uses the latest native audio SDK from Unity, so that cannot cause the problem.
Checking the editor log from "%localappdata%\Unity\Editor\Editor.log", the crash happens just after Unity found all compatible native plugins:
When creating a debug version of the plugin with VS 2019 and setting up breakpoints to all available functions or constructors and starting the Unity 2019 editor with VS in debug mode, it seems that Unity actually never get's to run any line of code from the plugin. VS will instead report a crash in the external dependency of this plugin "libjack64.dll".
Removing any dependency to jack.h (like done here Schroedingers-Cat@9aa82f0) fixes the crash for Unity 2019 (but also removes any functionality of this plugin).
The text was updated successfully, but these errors were encountered: