07.02.2018 14:17, Mark Rotteveel пишет:
On 7-2-2018 12:36, Vlad Khorsun via Firebird-devel wrote:
07.02.2018 13:26, Mark Rotteveel wrote:
On 7-2-2018 11:55, Mark Rotteveel wrote:
Someone reported a crash on shutdown of Firebird 2.5.8 Embedded in a C# application on stack overflow:
https://stackoverflow.com/questions/48644878/appcrash-in-fbintl-dll-if-using-embedded-mode-in-my-c-app.
I can reproduce it with the provided example application.
I tried to reproduce this by recreating the example using Jaybird, but there it works OK. Does anyone have an idea what the
cause might be, and if this would be something in Firebird Embedded itself, or with the ADO.net provider?
I found the cause, the connection pool was active in Firebird ADO.net, and the connections weren't closed at the time the engine
was unloaded.
Shouldn't the engine be able to cope with this?
Yes, and fb_shutdown handle it. But it can't handle it correctly when process
exits and Windows already unloaded some dlls and kill all other threads.
But what causes the observed difference between the example table that only has an integer id column (and doesn't trigger the AV),
and the one that also has a varchar column and an expression index (lower(title))?
Varchar column and string function (lower) usage means that intl library
could be loaded and
used by the engine. Later, when process exits without explicit call of
fb_shutdown with open
connection to the database, there could be a case when fbintl.dll is already
unloaded by the
OS while fb_shutdown tries to correctly free resources (and call something in
fbintl.dll).
Note, the order of unload of DLL's by the OS is not defined.
Regards,
Vlad
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel