[fpc-devel] Segmentation fault for Firebird exception inside thread
Stefan
stefan at sss-smart.net
Wed Oct 26 16:59:20 CEST 2011
Ok, today I installed the fixes_2_4 branch of fpc subversion repository on Ubuntu 11.10 64-bits.
Then I compiled the code from my initial post like this:
<code>
stefan at PSERVER:~/Development/ProgramasLazarus/src$ fpc -dUseCThreads -ofbthreadtest fbthreadtest.lpr
Free Pascal Compiler version 2.4.5 [2011/10/26] for x86_64
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling fbthreadtest.lpr
fbthreadtest.lpr(6,2) Note: APPTYPE is not supported by the target OS
fbthreadtest.lpr(33,9) Warning: Symbol "Resume" is deprecated
Linking fbthreadtest
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
90 lines compiled, 0.5 sec
1 warning(s) issued
1 note(s) issued
</code>
Then I called the program:
<code>
stefan at PSERVER:~/Development/ProgramasLazarus/src$./fbthreadtest
select...
...exception
Violación de segmento
</code>
This is the output when in fact a connection to the Firebird database has been established.
When the connection to the database could not be established, for example because the
database does not exist, the program returns nothing.
I've installed Firebird 2.5.1 with the corresponding client library, but I think that the poblem is on
the FreePascal side.
Thanks for all the suggestions so far,
Stefan
El 25/10/2011 14:23, Joost van der Sluis escribió:
> On Tue, 2011-10-25 at 14:10 +0200, Ludo Brands wrote:
>>> I'm using FPC 2.2.5, so perhaps the error is already known,
>>> but I did not find any solution in the web.
>>>
>>> I tested the code on Windows 32 bits and Linux 32 bits too,
>>> but there everything seems ok.
>>>
>> Tried your code on ubuntu 10.04 x86_64 using both libfbclient and libfbembed
>> 2.1, fpc 2.7.1. It doesn't create a SIGSEGV. Just a EIBDataBaseError.
>> Problem seems to have been solved in the mean time.
> Stefan, maybe that the debugger had problems showing the error. Please
> try to run your application outside the debugger. Maybe that in that
> case you'll see an EIBDatabaseError.
>
> Joost.
More information about the fpc-devel
mailing list