Hi support team, I've found the problem and a solution 😊
Just to clarify if anybody other has the same problem: - I have a process performing firebird database updates - currently it uses FireBird 2 Embedded only - now this process has to make the database become a firebird 3 database during update - for that it makes a backup using FB2, switch to FB3 and do the restore using FB3 (both embedded) - the fbclient.dll as well as the UDF are unloaded properly before switching to Firebird 3 folder - but I recognized that after switch to FB3 the ib_util.dll is loaded twice in my process (one from FB2, the other from FB3) - this must have been the reason that the call to ib_util_malloc inside the UDF failed and forced the process to exit - I completed the FB2->FB3 switch by a call to FreeLibrary which successfully unloads the FB2-ib_util.dll - the handle for the FreeLibrary-call is determined via CreateToolHelp32SnapShot(TH32CS_SNAPMODULE, 0) The reason because I get the same error in ibExpert seems to be that this process also has two ib_utils.dll's loaded: one from an internal used FB2 Embedded frolder, the other from the configured FB3 embedded folder. Probably it makes sense to change the fbclient.dll in a way that it recognizes such a situation and use the correct ib_util.dll (e.g. having the same version as fbClient.dll or residing in the same folder...). Thanks for your support. Best regards Michael -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Gesendet: Montag, 23. Juli 2018 11:31 An: [email protected] Betreff: Re: [firebird-support] FireBird 3.0.3 embedded is crashing when using an UDF function which returns a CSTRING Email Security Warning: The following message was sent from an external e-mail address. Exercise caution when opening attachments, clicking links, or exchanging information. 23.07.2018 8:54, 'Jelich, Michael' [email protected] [firebird-support] wrote: > Yes, it does. The dpr code is as follows: > > begin > System.IsMultiThread := true; > Randomize; > end. Did you check that this code is really executed? I'm sure about execution of initialization sections in libraries, but not about the main code block. -- WBR, SD. ------------------------------------ ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://secure-web.cisco.com/1__7nNHf8LlX6aaTHLjA-CuVTV-TJcSVc9UVdiqUUyAr45tdFcfbKIA6G_TVvm3tr91uWBqiPjYQqqs0_XHTHZG3QlieUrb-E10L8MeoEiqRduOeusNoDR2k7LYF6V7FjakOt1ovV0xa4qJDBmBtWplwxASQxYWM6TUdnIoVZLN4kLePEREa_rndbkGGwun5hnLFA6Re--tBqNoPsAmL8msbsL4bTdWI6D2eEZA1BuhJq-hK1wnrmjDj35ir3k8WAaEMu2WL1d79uk5J6g3IW-b-kvCnEmPy_GdlVbDJchicIRpGlqHjx_GYZBrUUlLu_uxM6eQSYkHPbxpNr3EbmUg/http%3A%2F%2Fwww.firebirdsql.org and click the Documentation item on the main (top) menu. Try FAQ and other links from the left-side menu there. Also search the knowledgebases at http://secure-web.cisco.com/1E4Ad0lXCaNMKXExsH9bfEwXR9NdrJFwixKPvBNOA8AGmCRIzt8dJkhADXvNO2_YUioSg7msZKokAYaV4FNI4l-AjH49LD5L7KLlwRWOe-Y8vK5hzvGIGhaW4bSbq0_lgiKuf4TVWph_ITJVWwrRw4mbgbfXX2-EQPKdS90TlOXJrYXEZa9KMrihAqgyTQeXZs5Ro3biBD6T0K-0C_qQHcuTcAZApt-1cbr18DjipPl5UtZZuP3vR_2AFAw90A6BLLuO2RoW-LIwJT3Js6Q4xp0ZjiOMFsJaG-IscoAqa5AvwBGz8Qw1_2wL4sU6fzPF6LMvFwcPgc3bAF7UTrNMdzw/http%3A%2F%2Fwww.ibphoenix.com%2Fresources%2Fdocuments%2F ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ------------------------------------ Yahoo Groups Links
