MikeMon 12 Posted March 20 I have a problem with my application crashing on Windows XP / Windows Server 2003. It wouldn't even give any exceptions. After troubleshooting, I found out that the issue is caused by IBX. Just adding an IBX unit, e.g., IBSQL, to the uses clause of an empty application causes the crash. I'm not sure after which Delphi upgrade this started, but I think it was after upgrading to 12.1 or 12.2. Has anyone come across this? If yes, any solution or workaround? Share this post Link to post
Virgo 18 Posted March 20 What is the version of fbclient.dll? Could it be, that it does not support Windows XP anymore? Share this post Link to post
MikeMon 12 Posted March 20 Just now, Virgo said: What is the version of fbclient.dll? Could it be, that it does not support Windows XP anymore? I'm not even doing anything with Interbase. Just adding the unit to the uses clause is crashing the application. If I compile the application with Delphi 11.3, everything is working fine. Share this post Link to post
Virgo 18 Posted March 20 I thought, that IBX probably tries to load driver dll on unit initialization. And actually, with IBX driver file is probably gds32.dll. But if it is compiler dependent, then it is probably not dll compatibility thing. But I would still check initialization sections of IBX. Share this post Link to post
MikeMon 12 Posted March 20 10 minutes ago, tgbs said: Take a look at the Windows application log. Nothing helpful. Kernel exception. Share this post Link to post
MikeMon 12 Posted March 20 10 minutes ago, Virgo said: I thought, that IBX probably tries to load driver dll on unit initialization. And actually, with IBX driver file is probably gds32.dll. But if it is compiler dependent, then it is probably not dll compatibility thing. But I would still check initialization sections of IBX. You don’t need to have any drivers to add the unit to the uses clause. Share this post Link to post
Virgo 18 Posted March 20 Just now, MikeMon said: You don’t need to have any drivers to add the unit to the uses clause. No, but adding unit into uses can make program try to load them. And I thought, that unhandled exception in dll possible reason for crash. Share this post Link to post
Remy Lebeau 1535 Posted March 20 2 hours ago, MikeMon said: Nothing helpful. Kernel exception. What does the error message say, exactly? Share this post Link to post
MikeMon 12 Posted Thursday at 06:19 PM 3 hours ago, Remy Lebeau said: What does the error message say, exactly? Faulting applicationXYZ.exe, version 4.0.2.5, faulting module kernel32.dll, version 5.2.3790.5295, fault address 0x0000bf93. Source: Application Error Category: 100 Event ID: 1000 Share this post Link to post
Cristian Peța 111 Posted Friday at 08:13 AM Have you tried to debug or to have a call stack using a toll like madExcept? Share this post Link to post
MikeMon 12 Posted Friday at 09:46 AM 1 hour ago, Cristian Peța said: Have you tried to debug or to have a call stack using a toll like madExcept? Exception Class: EEncodingError Exception Message: Invalid code page Share this post Link to post
Lars Fosdal 1832 Posted Friday at 10:08 AM Leading question - so.... what would you check next, Mike? Share this post Link to post
MikeMon 12 Posted Friday at 10:20 AM Just now, Lars Fosdal said: Leading question - so.... what would you check next, Mike? That's the million dollar question 🙂 I guess the current encoding used in the IBX controls is causing the exception, or maybe the new encoding model in Delphi 12.x. Need to investigate when I have time. Currently, for Windows XP / 2003 Server computers, I'm using the software compiled with Delphi 11.3. Share this post Link to post
Brian Evans 112 Posted Friday at 02:21 PM Can check what API calls are being made and if some are failing shortly before the application gives up the ghost. One tool for that is API Monitor by Rohitab Batra http://www.rohitab.com/apimonitor Share this post Link to post
Vandrovnik 217 Posted Friday at 04:14 PM On 3/20/2025 at 11:26 AM, MikeMon said: I have a problem with my application crashing on Windows XP / Windows Server 2003. It wouldn't even give any exceptions. After troubleshooting, I found out that the issue is caused by IBX. Just adding an IBX unit, e.g., IBSQL, to the uses clause of an empty application causes the crash. I'm not sure after which Delphi upgrade this started, but I think it was after upgrading to 12.1 or 12.2. Has anyone come across this? If yes, any solution or workaround? We had the same problem (Windows XP as virtual machines). Did not succeed finding a solution in Delphi app, so virtual machines upgraded to Windows 7... Share this post Link to post
Remy Lebeau 1535 Posted Friday at 04:27 PM (edited) 6 hours ago, MikeMon said: Exception Class: EEncodingError Exception Message: Invalid code page The TMBCSEncoding constructor calls the Win32 GetCPInfo() API to query information about a specified codepage to initialize the TEncoding.MaxCharSize and TEncoding.IsSingleByte properties. The error means that the specified codepage is likely not installed on the PC. Unfortunately, the call stack and the error message do not indicate which codepage is failing. If you have the source code for IBX, have a look at which codepages the CreateEncodings() function is trying to initialize. Or, maybe the API Monitor can tell you which codepage is being passed to GetCPInfo(). Edited Friday at 04:28 PM by Remy Lebeau Share this post Link to post