firebird
firebird copied to clipboard
Using fbclient.dll in an application to connect localhost database followed by create an hostless database raised Shared memory error
I have a strange case here. The case happen to both Firebird 3.0 and 4.0.
Here are the steps:
- In Windows, install x64 firebird from setup file.
- Make sure the firebird service is running and listen to port 3050.
- I use firebird OO API like
fb_get_master_interface: IMasterto test - Connect to
localhost:employeeand close the connection. - Without closing the application, using
IMaster.getDispatcher.createDatabaseto create an embedded database using hostless URI and an error shall prompt:
MappingIpc: Cannot initialize the shared memory region
Shared memory area is probably already created by another engine instance in another Windows session
By reversing the steps:
- In application, using
IMaster.getDispatcher.createDatabaseto create an embedded database using hostless URI - Without closing application, connect to
localhost:employeeandit prompt same error:
MappingIpc: Cannot initialize the shared memory region
Shared memory area is probably already created by another engine instance in another Windows session
Using same fbclient.dll and access localhost:employee (open and close) followed by create an hostless database raise the exception.
It is fixed in master branch (see d0e33f11) but decision to backport fix into v4 is not confirmed yet as it could create some incompatibilities when 4.0.2 and 4.0.3 (with fix) run at the same time
Any chance to include the fix into Firebird 4.0 release?
Backported into v4, try next snapshot build