Re: [Lazarus] GetProcAddress weird problem
On Wed, Apr 20, 2011 at 11:20:52AM -0300, Leonardo M. Ram? wrote: Hi, I'm facing a weird issue with GetProcAddress in a Lazarus program I have a method that calls GetProcAddress to get a pointer to a function in a shared library. The method can be called many times without problem. Multiple dyn loading of the same lib through loadlibrary maybe? -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] GetProcAddress weird problem
On Thursday 21 of April 2011 13:21:17 Marco van de Voort wrote: On Wed, Apr 20, 2011 at 11:20:52AM -0300, Leonardo M. Ram? wrote: Hi, I'm facing a weird issue with GetProcAddress in a Lazarus program I have a method that calls GetProcAddress to get a pointer to a function in a shared library. The method can be called many times without problem. Multiple dyn loading of the same lib through loadlibrary maybe? Or library already loaded, but from another app and not from LD_LIBRARY_PATH. I had same problem with xulrunner and sqlite. libsqlite-3 is in /usr/lib and in /usr/lib/xulrunner and with different versions (xulrunner one was 3-4 minor versions down). If I started firefox , and then app which loads libsqlite - crash. Removing libsqlite-3 from /usr/lib/xulrunner and adding symlink to /usr/lib/libsqlite-3 fixed my problem. But I'm wondering now is it fpc problem ,since other apps takes /usr/lib/libsqlite-3 and works ok (even have test C code which dynamically loads libsqlite-3 in same manner as fpc do, but that C example works and fpc one not ... don't ask me for this example project...I don't know where it is ). zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] GetProcAddress weird problem
Hi, I'm facing a weird issue with GetProcAddress in a Lazarus program I have a method that calls GetProcAddress to get a pointer to a function in a shared library. The method can be called many times without problem. If I try to create another method, with exactly the same content of the former, when the program executes the line with GetProcAddress, an SIGSEGV is raised. If I debug this line, I get a different pointer address than in the original method. Does anyone knows why this happens?. Free Pascal Compiler version 2.5.1 [2011/04/10] for x86_64 Lazarus 0.9.31 - r30261M -- Leonardo M. Ramé Medical IT - Griensu S.A. Av. Colón 636 - Piso 8 Of. A X5000EPT -- Córdoba Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19 Cel.: +54(351)156629292 -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] GetProcAddress weird problem
On Wednesday 20 of April 2011 16:20:52 Leonardo M. Ramé wrote: Hi, I'm facing a weird issue with GetProcAddress in a Lazarus program I have a method that calls GetProcAddress to get a pointer to a function in a shared library. The method can be called many times without problem. If I try to create another method, with exactly the same content of the former, when the program executes the line with GetProcAddress, an SIGSEGV is raised. If I debug this line, I get a different pointer address than in the original method. Does anyone knows why this happens?. My crystal ball is off atm, so please write at least piece of code so we can try to understand what could be your problem. zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] GetProcAddress weird problem
On 2011-04-20 16:26:59 +0200, zeljko wrote: On Wednesday 20 of April 2011 16:20:52 Leonardo M. Ramé wrote: Hi, I'm facing a weird issue with GetProcAddress in a Lazarus program I have a method that calls GetProcAddress to get a pointer to a function in a shared library. The method can be called many times without problem. If I try to create another method, with exactly the same content of the former, when the program executes the line with GetProcAddress, an SIGSEGV is raised. If I debug this line, I get a different pointer address than in the original method. Does anyone knows why this happens?. My crystal ball is off atm, so please write at least piece of code so we can try to understand what could be your problem. zeljko -- Nevermind, both methods weren't exactly equal. -- Leonardo M. Ramé http://leonardorame.blogspot.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus