07.02.2018 12: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?

  fb_shutdown should be called explicitly before fbembed.dll is unloaded. Yes, 
it is
called by fbembed.dll itself on DLL unload but it is not fully safe unless 
library is
unloaded explictly (by FreeLibrary call, not because of process exit).

  Additional problem in case on stackoverflow is not closed database connection
when fbembed.dll is unloaded. It could be a reason why you can't reproduce the
crash. Note, on "clean" exit (with no databases open), fb_shutdown have much 
less
work to do.

Hope it helps,
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

Reply via email to