Skip to content
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

Improve error reporting when library function cannot be loaded #64

Open
luithefirst opened this issue Jul 7, 2020 · 1 comment
Open

Comments

@luithefirst
Copy link
Member

luithefirst commented Jul 7, 2020

I received a Hilite log with the following error:

 0:   initializing OpenGL runtime ................................................................
 0:     WARNING: System.Exception: could not get native function (maybe some opengl-driver problem?)
   at Aardvark.Base.UnmanagedFunctions.wrap@78-2.Invoke(Object[] _arg1) in C:\- Data\aardvark-base\src\Aardvark.Base.FSharp\Reflection\UnmanagedFunctions.fs:line 78
   at <StartupCode$FSharp-Core>.$Reflect.Invoke@814-4.Invoke(T1 inp)
   at <StartupCode$Aardvark-Application-WinForms-GL>.$Application.-ctor@46-17.Invoke(IDisposable _arg1) in C:\Users\Schorsch\Development\aardvark.rendering\src\Application\Aardvark.Application.WinForms.GL\Application.fs:line 55
   at Microsoft.FSharp.Core.Operators.Using[T,TResult](T resource, FSharpFunc`2 action)
   at HiliteRender.HiliteCore..ctor(Settings settings, String shaderCachePath, ISplashScreen splash) in C:\GitLab-Runner\builds\ykmHiqGX\0\lds\Hilite.Render\src\Project HILITE\HiliteRender\HiliteCore.cs:line 147
   at HiliteApp.Viewer..ctor(ISplashScreen splash) in C:\GitLab-Runner\builds\ykmHiqGX\0\lds\Hilite.Render\src\Project HILITE\HiliteApp\Viewer.cs:line 442
   at HiliteViewer.Program.Init(String[] args) in C:\GitLab-Runner\builds\ykmHiqGX\0\lds\Hilite.Render\src\Project HILITE\HiliteViewer\Program.cs:line 116
 0:   initializing OpenGL runtimeInitialization finished ................................. 6.279 s
 0:   WARNING: Hilite not initialized properly!

It was generated with Aardvark.Rendering 4.8.11. At the moment there is no need to change this old version, but as the current master still uses the same code and error handling the error reporting should be improved and at least include the function name. As UnmanagedFunctions.wrap only gets a function pointer, this needs to be handled earlier, maybe in getProcAddress, but I assume some functions are allowed to fail and maybe do not need to log an error. Please review for possible improvements.

@luithefirst
Copy link
Member Author

luithefirst commented Apr 19, 2022

Module Unsafe

only seems to be used during the initialization -> remove/replace call during init? remove module?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant