Forum > Linux
EAccessViolation on OpenSuse 11.2
(1/1)
pumuqui:
I have a console application which is compiling and running fine on OpenSuse 10.2. When I try to run the same application on OpenSuse 11.2 I get the following error:
An unhandled exception occurred at $00007F4021A562A0 :
EAccessViolation : Access violation
$00007F4021A562A0
$00000000005482C0
$000000000044C921
I then installed FPC 2.2.5 and Lazarus 0.9.26.3 beta on OpenSuse 11.2 to compile my application directly on this server, with the result that it compiles ok but returns the same error.
I am quite new to Lazarus and FPC and would apreciate any hints how to solve this problem.
As additional components I'm using Indy, if this is of any interest. My impression is that there must be some problem in any initialization section, but I'm not sure on this.
pumuqui:
I found out myself. In a ported unit from Delphi I used the following code to set IsMultiThread to true:
--- Code: ---constructor TIBDummyThread.Create;
begin
inherited Create(True);
FreeOnTerminate := True;
Resume;
end;
procedure TIBDummyThread.Execute;
begin
exit;
end;
initialization
{ from http://mantis.freepascal.org/view.php?id=7228
FPC uses a different handling of threadvars to be multiplatform,
so simply setting ismultithread mixes up the handling of threadvars.
Start a dummy thread which exits immediatly to work around this instead of setting ismultithread directly.
}
//IsMultiThread := True;
ibDummyThread := TIBDummyThread.Create;
--- End code ---
This worked for OpenSuse 10.2, but now I had to comment out the last line to get it working again. No idea why, though.
Navigation
[0] Message Index