Search code examples
delphiglscene

How to stop GLScene GLSceneViewer component crashing Delphi 10.3 IDE?


I'm updating an existing GLScene app to Delphi 10.3. I've got latest GLScene installed (from https://sourceforge.net/projects/glscene/) but TGLSceneViewer component is causing an error.

Even on a new project when I drop a TGLSceneViewer on a form I get Loadlibrary failed with error 126;

enter image description here

Pressing 'OK' and Delphi crashes out back to Windows desktop; it kills the IDE without any dialog or error. (As you can see, already placed TGLScene component GLScene1 doesn't error.)

I've used ProcessMonitor to try to find the problem (as directed by responses to LoadLibrary 126 errors);

enter image description here

So the error appears to be missing 'd.DLL'. That must be an invalid dll name so is there some installation issue?

Has anyone come across this problem? Thanks!

UPDATE:

So I've dug through the GLScene source to try to find references that might be related to 'd.DLL'.

In the screenshot below ('Messages' section) there are references to constructed dll names (CUDARTDLLNAMES[I] + '.dll' and CUFFTDLLNAMES[I] + '.dll') in CUDA_Runtime.pas and CUDA.FourierTransform.pas. It is possible these could create the name 'd.DLL' except that 'DLL' is not capitalised in the code?! I'm just scratching around here for a solution.

Also interesting that file 'Imports.Newton.pas' refers to four dll files that are not included in the install externals folder; newton32d.dll, newton32s.dll, newton64d.dll and newton64s.dll

Again, I don't know if that's relevant as far as TGLSceneViewer successfully loading in Design mode.

enter image description here

Thanks again for your help.


Solution

  • So after a lot of trying to identify what 'd.DLL' was I narrowed it down to 'PhysXwrap32.dll' because by renaming that to 'd.dll' I then got a different (access violation) error, i.e. things had moved on a bit! In fact the 'earth.exe' demo program ran to some degree (no texture) after placing d.dll in the exe folder and ignoring the access violation error on startup.

    Anyway, it was clearly messed up so I tried some other GLScene installs. All the versions installed fully in Delphi 10.3 IDE with packages registered and components available but still I was getting Loadlibrary error 126 when dropping TGLSceneViewer on a form.

    Eventually I found and installed 'GLScene_v1.8_for_RX_10.3_Rio.7z' and finally didn't get that 126 error! I got another error instead, Loadlibrary error 87. This is normally related to graphics driver issues. So following various posts about that I disabled the onboard Intel 630 graphics and made sure the AMD drivers were up to date.

    enter image description here

    After a restart finally I can use TGLSceneViewer!

    So I've got GLScene v1.8 installed and working on Delphi 10.3. Maybe the graphics card conflict is also related to the problems with GLScene v2 but it was showing a different error (Loadlibrary 126 instead of 87). I'll try it sometime when I've nothing else to do, haha.

    Thanks for your help and interest.