Jump to content
MikeMon

IBX is Crashing Application on Windows XP / Server 2003

Recommended Posts

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

What is the version of fbclient.dll? Could it be, that it does not support Windows XP anymore?

Share this post


Link to post
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

Take a look at the Windows application log.

Share this post


Link to post

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
10 minutes ago, tgbs said:

Take a look at the Windows application log.

Nothing helpful. Kernel exception.

Share this post


Link to post
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
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
2 hours ago, MikeMon said:

Nothing helpful. Kernel exception.

What does the error message say, exactly? 

Share this post


Link to post
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
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

 

image.thumb.png.c6915042fd5912d92d46db638c9d47ee.png

Share this post


Link to post
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
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
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 by Remy Lebeau

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×