invalid database handle (no active connection)

185 views
Skip to first unread message

Elmar Haneke

unread,
Mar 22, 2024, 12:57:25 PM3/22/24
to firebird-support

I do have a Problem on MacOS/M1 using FB5.0.1.1369 in embedded mode:

isc_create_database creates database file and returns success, but after that isc_start_transaction does complain on an invalid database handle.

Any idea what might cause that problem?

The value stored in database handle variable is simply "1" - presumably an index to internal table.

Elmar

Dimitry Sibiryakov

unread,
Mar 22, 2024, 1:00:28 PM3/22/24
to firebird...@googlegroups.com
Elmar Haneke wrote 22.03.2024 17:57:
> Any idea what might cause that problem?

A bug. Did you try to use debugger to trace execution to the point where
handle is checked inside of isc_start_transaction()?

--
WBR, SD.

Elmar Haneke

unread,
Apr 26, 2024, 12:40:48 PM4/26/24
to firebird...@googlegroups.com


Am 22.03.24 um 18:00 schrieb 'Dimitry Sibiryakov' via firebird-support:
Elmar Haneke wrote 22.03.2024 17:57:
Any idea what might cause that problem?

  A bug. Did you try to use debugger to trace execution to the point where handle is checked inside of isc_start_transaction()?

I did non manage to run my application in Debugger on MacOS. The Problem seems to happen on ARM platform only AMD64 seems to be OK.


Dimitry Sibiryakov

unread,
Apr 26, 2024, 3:03:20 PM4/26/24
to firebird...@googlegroups.com
Elmar Haneke wrote 26.04.2024 18:40:
> I did non manage to run my application in Debugger on MacOS. The Problem seems
> to happen on ARM platform only AMD64 seems to be OK.

In this case it might be a bitness issue. If your size of isc_db_handle
doesn't match what Firbird client library expects part of the handle value may
be filled with garbage ending up in invalid handle error.

--
WBR, SD.

Reply all
Reply to author
Forward
0 new messages