How to stop GLScene GLSceneViewer component crashing Delphi 10.3 IDE? - delphi

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;
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);
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.
Thanks again for your help.

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.

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.
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.

Related

Delphi XE6 crashes while installing bpl

I have a project developed in delphi, that intends to install some components. These components are nothing but just inherited children of Firedac, and some other.
When I open the project in Delphi XE6, it opens fine. But, when I try to install the .bpl project by right clicking on project and selecting install option, the IDE crashes everytime.
The target platform is 32 bit.
Each time, when XE6 crashes and gets shut down, there is a error in event log. The screenshots for event logs are attached.
Also, I have tried with allowing the bds.exe app in firewall profiles.
It used to crash earlier also, but after trying for some time, it used to work. Now it does not. I have also tried with old code base for .bpl project but that does not help.
Any help on this is really appreciated.
The likely explanation is that there is a defect in the initialization or registration code of the bpl. The error code 0xC0000005 is the NTSTATUS code for an access violation.
Whilst the error is raised from the Delphi runtime module rtl200.bpl it is your package that is the likely culprit. Probably it has called the runtime library passing invalid data.
You will need to debug your package to solve this. Start by stripping code out of it progressively until the error disappears at that point you know that the error is caused by the code you just removed. Refine the process until you have a strong lead, and then follow that lead.

Delphi XE8 and Fatal Error F2039

With XE8 update 1, Win 7 64 bit and a single component added to an otherwise empty folder I get:
error: [dcc32 Fatal Error] F2039 could not create output file .\Win32\Debug\MountTest.
The test will compile and run fine the first time but XE8 has to be shut down and restarted to compile again. The component is a gauge from Mitov Software.
The component vendor say's that this is a known bug with no fix. If so its a showstopper and project end'r for me. Is it really the end of the line for Delphi?
I hope some one can pull this rabbit out of a hat somehow.
This is what I have done to isolate the problem.
Started with a failing application (will not compile a 2ed time)
Remove all external units used
Remove al references to those units
Remove all references in the 'Uses' clause
Comment code until it compiles
It should compile every time you hit run (no problem).Now add a blank form to the project. Don't do anything to the form just add it. Add it to your uses clause.
Its should compile every time you hit Run.
Now open the blank form and simply touch it so that it needs to be recompiled.
When you run the application its back to failing when you run it a second time.
Notice that happens when you simply add a form and 'touch' it. No code needed.
This problem is not something wrong with my code - it can't be. Its a bug in the UI - must be.
Coincidentally, I just fought with this issue yesterday testing some components I ported to XE8. The output file in my case is the project executable.
After spending several hours trying to figure out what was going on (including efforts to reconfigure my AV software, disabling it entirely, moving the project to a different location, etc.), I was able to solve the problem by disabling Castalia. If I run the IDE without Castalia, the problem does not occur. If I enable Castalia again, it starts happening again.
You can find instructions for disabling/enabling Castalia in How can I disable Castalia in XE8?
I'm removing the above content because the issue has reappeared (with Castalia disabled). Further investigation shows a couple of things:
The problem seems to be related to any sort of exception being raised in the debugger (even those that are handled in the code). Clicking either Break or Continue in the debugger exception dialog works as always. However, the next attempt to compile or build the application fails with the F2039 error. Deleting the executable in Windows Explorer allows compilation and running once, and then the error recurs.
Restarting the IDE fixes the issue, until the next debugger exception occurs.
Neither taskkill or a batch file with del worked in either a pre- or post-build event.
There is an open QC entry for it at Embarcadero which indicates that it was reported in XE7, XE7.1, and XE8, and is currently an open internal ticket. I can't find a way to add the information in the two points above to that open ticket in the new JIRA-based Quality Portal. Perhaps someone who has access and can do so will on my behalf (or at least add a link to this post).
It's not linked to a specific project. The original answer (as mentioned above) was related to a test app while porting some components to XE8 from an earlier version. When the problem reappeared for me, it was in a brand new project, totally unrelated, that does not use any non-standard components.
(I previously had access to EMBT QC, and had a few open tickets. The accounts appear to have not migrated to the new QP, and I can't locate any tickets there under my account.)
Found It.
I decided to start from scratch on my development system and uncovered the problem.
I installed Windows 10 on a virgin disk
Installed XE8 update 1
Installed MITIOV Instruments for XE 8 and tested them. All working find
Installed AsyncPro - Still working
Installed the JEDI Jcl - Fails
Remove JEDI Jcl - now works
Trash JEDI completly - Everything works fine
Something in the JEDI Jcl version 3.48 is causing the problem. I can code around the JEDI components I was using without to much trouble but its a shame.
How about automatically kill your "hang-up" application before build?
I also had this problem on Win 7 Pro 64 bit with XE8.
Removing JCL fixed the problem. If I was a betting man, I would look closer at the JCL Debug IDE extension.
Guy's..
There is no reason to upgrade to Delphi 10.1, because all previous versions are equipped with an older version of the Android SDK.
Now, how to solve this annoying issue:
Just find the map where the Android SDK is located.
See: Tools/Options/Delphi Options/SDK Manager/Android Location
Now run the ..\sdk\tools\android.bat as Admin
This will show the Andoid SDK Manager.
Next is to update to the newest Android SDK and SDK Tools.
If all completed, you don't have to upgrade to Delphi 10.1 or whatever "advised".
Restart Delphi and problem:= solved!
btw:
It took some effort to find out what's happening here, because the Eclipse compiler suffered the same issue as Delphi. Finally all was related to bugs in earlier versions of the Android SDK causing adb.exe to keep a filehandle held hostage.

Delphi 7 IDE freezes trying to open a specific project

I'm getting pretty desperate here. I've looked at this question which seems to have a similar question to me:
Delphi IDE is not visible
Unfortunately it appears to only apply to newer versions of Delphi, and I am using Delphi 7 which doesn't have the discussed .dproj file extensions.
Basically my project will not open up in Delphi. My colleague has gotten the latest source from Perforce and it works for him, but doing the same thing does not work for me on my machine. I have installed one plugin about 2 weeks ago, which didn't seem to cause this error. Regardless, I've uninstalled it but still no fix.
I am able to open other projects.
Edit for clarity The IDE hangs when the startup window tries to load on screen. I've tried adding the parameter -np to the shortcut target to stop loading the last loaded project. But then going to the dpr file from inside Delphi causes the program to hang when the unit I was last in tries loading.
Is there anything I can do to fix this issue? I'm trying to avoid a full re-install as this is a complicated procedure in our organisation.

Delphi XE2: EResNotFound exception "Resource "<mainform>" not found" raised on some target machines but not on others

I've been banging my head against this for the past two days and can't seem to make any progress...
Pretty much from one moment to the next, Delphi XE2 won't properly compile one of my projects any more. That is, it actually compiles without errors but at runtime I get resource not found errors for what is essentially the main "form" (it's actually a data module in this case). I have already reverted to older versions of the project from source control that I know were definitely working alright but to no avail. Judging by that it seems it must be something inside Delphi/the IDE itself rather than in the project source. However, I have also not been able to reproduce the issue with a simple test project nor with any other real-life projects... It only happens with this one.
Another strange thing is that when I look at the produced binary with XN Resource Explorer everything looks as it should: The form resource mentioned in the error message is actually there and intact...
At some point I was suspecting this might be caused by a bug in one of the experts I have installed in my IDE (e.g. Uwe's platform and OI experts and VersionInsightPlus, Andreas' IDEFixPack and DDevExtensions, GExperts) but even after disabling all these the problem persisted.
Unfortunately, I am unable to track down exactly when this started to happen as I had been working for some time without actually running the binary, fixing compiler warnings and errors for the x64-target, adjusting build events for updated third-party tools (localization and license protection) and such things...
Has anyone else ever seen anything like this happen? Any more ideas on how to pin this down?
Some more details about the project:
It is an addin for Outlook built using the Add-In-Express framework (i.e. a COM-DLL).
The "main form" is a TDataModule-descendant - we also inserted our own ancestor-class into the hierarchy, i.e. the "addin module" is not directly inheriting from TadxCOMAddInModule - the resources of the custom ancestor forms also appear to be present and intact in the output binary when checking with a resource viewer.
Built without runtime packages for the Win32 and Win64 platforms.
Let me know if you think I missed to mention any other potentially relevant details.
Update:
I have now transferred the sources in question onto a different machine. Interestingly, the DLL I compiled there did not exhibit the problem - on that machine that is... when I transfered it back to the original machine and I tried to call it, the error was back (to stress this: this was the exact same DLL producing a EResNotFound on one machine but not on the other. Of course, once I had discovered this, I also performed the reverse test and lo and behold, the DLL compiled on the original machine works without errors on the other machine...
Seems this might not be a Delphi problem after all... but what is it then?
Differences between the two machines:
Machine 1 (the one were the problem occurs): Windows 7 Ultimate English 64bit with Delphi XE2 Update 4
Machine 2: Windows 7 Professional German 32bit with Delphi XE2 Update 3
On a third machine that is almost identical to the first except that it doesn't have Delphi on it, DLLs produced by both machines work flawlessly.
I am a bit surprised to see your question here. :)
We faced a number of serious issues with recent Update 4 for Delphi XE2. Though we have never run into or been reported of the "resource not found" error, I think this update might be one of the causes. Have you installed it?
One more thing that comes to my mind is images that you use for your Office controls (command bar and ribbon). Probably they got broken somehow, the run-time code cannot load them and reports this error.
Anyway, as you understand, these are just my guesses, if you need our assistance with your office add-in please contact Add-in Express support service, we will try to help.
Update: Seems I was a bit too quick, drawing conclusions. Apparently the Sisulizer solution is also supposed to perform a fallback to the main resource block. I have now taken this issue to the product forum and will report back here, once this is resolved.
Alright, mystery solved at last:
I had turned off the option to "Copy all resources" in Sisulizer in an attempt to reduce the size of the produced resource DLLs and then had forgotten about it...
I hadn't fully realized the implications of the standard Delphi resource DLL approach to localization on which Sisulizer "piggybacks" - especially that it was an all-or-nothing deal: Our previous translation solution implemented a fallback-mechanism that would read any resources not found in the external resource DLL from the host binary instead. This does not appear to be the case with Sisulizer - at least not out of the box... thus, any resource that's not contained in the localized resource DLL does not exist as far as the application is concerned.
I also didn't realize that the mere existence of a file with the same base name as the main binary and an extension matching the current system's default locale (such as .EN or .DE) would automatically cause the VCL to load it...
The machines that did not exhibit the error either still had the older, larger (=complete) resource DLLs on them, or no resource DLLs at all.

Why does the Delphi XE2 IDE crash in msimg32.dll?

After installation of the Update 3 for Delphi XE2 I get the following error and the IDE does not want to start.
I tried installing the standard Delphi XE2 with Update 1 and the problem persists. Do you have any idea what is causing this?
It looks like the file got corrupted somehow. I just checked my Win 7 64-bit Pro, and there are two copies of msimg32.dll found, 1 each in System32 and SysWOW64, both dated 7/13/2009 and version 6.1.7600.16385. So it appears they haven't been updated recently.
The actual error message you're getting is related to access denied, and the second one is DLL initialization failed, which is probably a result of the first one; the IDE isn't loading because the DLL can't be loaded.
My only suggestions are: 1) open a support case with Embarcadero (as an installation related problem, the support is free), or 2) reinstall Delphi from scratch, run it once to create registry entries, and then reinstall Update 3. I don't think anyone here is going to be much help; I'm not finding anything in searches related to Update 3 and this dll, so it seems to be just you having the issue.
Just delete msimg32.dll in delphi_install_dir\Embarcadero\RAD Studio\9.0\bin folder.
This file shouldn't be there if you are doing everything correctly.

Resources