aardvark-concepts
aardvark-concepts copied to clipboard
runtime error
I have managed to get all the demo projects in at least 3 Aardvark repos to build and run. (I think that is all the demos.)
This one is throwing at runtime. Assimp64.dll is in the bin I execute from.
> dotnet WalkThroughSceneGraph.dll
0: initializingaardvark....................................................
0: System Information:
0: OSVersion: Microsoft Windows NT 10.0.18362.0
0: SystemArchitecture: 64-bit
0: Environment.Version: 4.0.30319.42000
0: Unpacking native dependencies .................................. 0.045 s
0: Loading plugins ................................................ 0.081 s
0: initializing SceneGraphCompletenessCheck ....................... 0.149 s
0: initializing ModModule .................................................
0: initializing mod system ...................................... 0.000 s
0: initializing ModModule ......................................... 0.001 s
0: initializing NewAg ............................................. 0.022 s
0: initializing Ag ................................................ 0.000 s
0: initializing PixImageDevil ..................................... 0.023 s
0: initializing aardvark ............................................ 0.379 s
0: initializing OpenGL runtime ..............................................
0: vendor: "NVIDIA Corporation"
0: renderer: "Quadro P4200 with Max-Q Design/PCIe/SSE2"
0: version: OpenGL 4.3.0 / GLSL 4.3
0: initializing OpenGL runtime ...................................... 0.187 s
Unhandled Exception: Assimp.AssimpException: Error loading unmanaged library from path: Assimp64.dll, see inner exception for details.
The specified module could not be found. (Exception from HRESULT: 0x8007007E) ---> System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
--- End of inner exception stack trace ---
at Assimp.Unmanaged.AssimpLibraryWindowsImplementation.NativeLoadLibrary(String path) in D:\Development\assimp-net\src\AssimpNet\Unmanaged\AssimpLibrary.cs:line 1683
at Assimp.Unmanaged.AssimpLibraryImplementation.LoadAssimpLibrary(String path) in D:\Development\assimp-net\src\AssimpNet\Unmanaged\AssimpLibrary.cs:line 1541
at Assimp.Unmanaged.AssimpLibrary.LoadLibrary() in D:\Development\assimp-net\src\AssimpNet\Unmanaged\AssimpLibrary.cs:line 143
at Assimp.Unmanaged.AssimpLibrary.CreatePropertyStore() in D:\Development\assimp-net\src\AssimpNet\Unmanaged\AssimpLibrary.cs:line 505
at Assimp.AssimpContext.CreateConfigs() in D:\Development\assimp-net\src\AssimpNet\AssimpContext.cs:line 1006 at Assimp.AssimpContext.ImportFile(String file, PostProcessSteps postProcessFlags) in D:\Development\assimp-net\src\AssimpNet\AssimpContext.cs:line 285
at Aardvark.SceneGraph.IO.Loader.AssimpModule.loadFrom(String file, PostProcessSteps postProcessingFlags) in C:\Users\Schorsch\Development\aardvark.rendering\src\Aardvark.SceneGraph.IO\IO.fs:line 774
at ExtendingSceneGraphs.run() in C:\Users\jackf\GitRepos\AardvarkWalkThrough\src\WalkThroughSceneGraph\ExtendingSceneGraphs.fs:line 41
at Program.main(String[] argv) in C:\Users\jackf\GitRepos\AardvarkWalkThrough\src\WalkThroughSceneGraph\Program.fs:line 32
This only affected the ExtendingSceneGraphs demo in WalkThroughSceneGraph. Compiling the other possible runtime demos in the project built and ran.
thanks @jackfoxy . normally we use zip files embedded to assemblies with the native dependencies included. scenegraph.io does not follow the standard embedding rule. i will look into this asap.
bests
unfortunately i could not reproduce this issue. i used build.cmd
or just VS run, both seemed to work fine. as i found out Assimp64 is delivered by Unofficial.AssimpNet library, which has the lib packaged in as zip in its resources.
In Aardvark.log (beside the execuable) i see lines like:
0: Unpacking native dependencies for AssimpNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
0: unpacked: D:\Development\walkthrough2\bin\Release\netcoreapp2.0\Assimp64.dll
When looking at the code responsible for preparing dependencies it seems to me that either there is a path problem or, AssimpNET.dll does not appear in the referenced assemblies. Even if AppDomain.CurrentDomain.GetAssemblies()
misses AssimpNET, it loaded later since your exception occurs in assimpNET code.
please post Aardvark.log
(e.g. to pastebin) in order to further investigate.
@haraldsteinlechner I cloned the latest repo and was reminded when I ran build.cmd that it does not build the WalkThroughSceneGraph project "out of the box". Not to WalkThroughSceneGraph/bin or to bin. So the problem may be with how I built the project.
Even building the project in release from Visual Studio 2019 does not create a bin folder. I originally altered the project file to get a bin.
How are you building it to test?
When I sync up with you on how to build the project, I'll attempt this again.
very odd. i do exactly the same. i did a most likely rather useless screen capture: https://youtu.be/IYntyI9rQR0 can you spot a difference? @stefanleng found out that in vscode when moving files around the outputdirectory setting in fsproj files gets lost.
i just tested with powershell, also here it works. i created an issue in aardvark base on how to get rid of those dependency handling problems: https://github.com/aardvark-platform/aardvark.base/issues/36
I just repeated your YouTube (almost exactly, except I ran build from Powershell), and executed from cmd like in video.
There is something different about my system, apparently. I end up with more DLLs in bin\Release\netcoreapp2.0 than you do in the video, including Assimp64.dll
04/10/2018 04:03 PM 3,805,184 Assimp64.dll
07/24/2019 01:15 PM 2,300,928 DevIL.dll
08/31/2019 09:55 AM 107,853 FunctionalFrontend.deps.json
08/31/2019 09:55 AM 31,744 FunctionalFrontend.dll
08/31/2019 09:55 AM 3,508 FunctionalFrontend.pdb
08/31/2019 09:55 AM 236 FunctionalFrontend.runtimeconfig.dev.json
08/31/2019 09:55 AM 154 FunctionalFrontend.runtimeconfig.json
07/24/2019 07:57 PM 3,606,016 GLSLangNative.dll
07/24/2019 07:57 PM 1,289 GLSLangNative.exp
07/24/2019 07:57 PM 500,241 GLSLangNative.iobj
07/24/2019 07:57 PM 143,392 GLSLangNative.ipdb
07/24/2019 07:57 PM 2,672 GLSLangNative.lib
07/24/2019 07:57 PM 5,197,824 GLSLangNative.pdb
08/01/2019 12:49 PM 361,472 glvm.dll
08/01/2019 12:49 PM 4,764 glvm.exp
08/01/2019 12:49 PM 8,180 glvm.lib
08/01/2019 12:49 PM 7,835,648 glvm.pdb
07/24/2019 01:15 PM 62,976 ILU.dll
07/24/2019 01:15 PM 31,744 ILUT.dll
08/31/2019 09:55 AM 23,432 IncrementalSystem-CSharp.deps.json
08/31/2019 09:55 AM 6,656 IncrementalSystem-CSharp.dll
08/31/2019 09:55 AM 860 IncrementalSystem-CSharp.pdb
08/31/2019 09:55 AM 236 IncrementalSystem-CSharp.runtimeconfig.dev.json
08/31/2019 09:55 AM 154 IncrementalSystem-CSharp.runtimeconfig.json
10/04/2017 02:46 AM 302,880 openvr_api.dll
08/31/2019 09:55 AM 42,245 PlainAardvarkRendering-NetCore.deps.json
08/31/2019 09:55 AM 13,312 PlainAardvarkRendering-NetCore.dll
08/31/2019 09:55 AM 928 PlainAardvarkRendering-NetCore.pdb
08/31/2019 09:55 AM 236 PlainAardvarkRendering-NetCore.runtimeconfig.dev.json
08/31/2019 09:55 AM 154 PlainAardvarkRendering-NetCore.runtimeconfig.json
11/27/2018 05:42 PM 14,336 vkvm.dll
11/27/2018 05:42 PM 1,369 vkvm.exp
11/27/2018 05:42 PM 2,644 vkvm.lib
11/27/2018 05:42 PM 552,960 vkvm.pdb
08/31/2019 09:55 AM 51,021 WalkThroughSceneGraph.deps.json
08/31/2019 09:55 AM 52,736 WalkThroughSceneGraph.dll
08/31/2019 09:55 AM 8,420 WalkThroughSceneGraph.pdb
08/31/2019 09:55 AM 236 WalkThroughSceneGraph.runtimeconfig.dev.json
08/31/2019 09:55 AM 154 WalkThroughSceneGraph.runtimeconfig.json
hi @jackfoxy. sorry we totally overlooked this one. what was the final status? Since then, we significantly improved native dependency loading motivated by your troubles ;) In aardvark.docs there is a similar example: https://github.com/aardvark-platform/aardvark.docs/tree/master/src/ModelLoader
i just tried it from root folder \aardvark.docs> dotnet run -c Release -p .\src\ModelLoader\ModelLoader.fsproj
@haraldsteinlechner Aardvark is high on my list of projects to return to, but it won't be this weekend. I will evaluate this when I can find time.
The same error occured with an old version of Aardvark.Scenegraph.IO (4.11). Assimp64.dll was missing its dependencies MSVCP110.dll and MSVCR110.dll. Installing Visual C++ Redistributable for Visual Studio 2012 fixed the problem.