1

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.

2 Answers2

0

It seems you haven't install GLScene properly on your system.

Based on the fact that you seem to be missing required dynamic library I guessing you have skipped 2. step in Instalation instructions for GLSCeene

You should always read the accompanying documentation. This will be especially important when you will be distributing your application to end users since documentation has detailed information about dependencies that needs to be shipped with your application for it to function properly.

SilverWarior
  • 7,372
  • 2
  • 16
  • 22
  • Thanks, but unfortunately not that simple. I did run SetupDLLs.bat as admin during install and can see all the dlls are in folders SYSTEM32 and SYSWOW64. – AnotherFineMess Jul 07 '21 at 10:37
  • Is it possible to find out specifically which of those dlls TGLSceneViewer requires? It seems very odd that the ProcessMonitor error indicates 'd.DLL' (see above). Where would the dll name come from because 'd' cannot be correct. – AnotherFineMess Jul 07 '21 at 10:40
  • Well then I'm at loss here since I don't use GLScene myself. All I can advise you now is try to reinstall GLScene again using instruction provided above. And if that doesn't work I suggest you raise your issue in discussion section of GLScene sourceforge page, to get support from the author itself. – SilverWarior Jul 07 '21 at 13:30
0

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.