Author Topic: EAccessViolation on OpenSuse 11.2  (Read 4976 times)


  • New member
  • *
  • Posts: 7
EAccessViolation on OpenSuse 11.2
« on: November 05, 2010, 02:02:52 pm »
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

I then installed FPC 2.2.5 and Lazarus 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.


  • New member
  • *
  • Posts: 7
Re: EAccessViolation on OpenSuse 11.2
« Reply #1 on: November 05, 2010, 03:33:20 pm »
I found out myself. In a ported unit from Delphi I used the following code to set IsMultiThread to true:

Code: [Select]
constructor TIBDummyThread.Create;
  inherited Create(True);
  FreeOnTerminate := True;

procedure TIBDummyThread.Execute;

  { from
    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;

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.


TinyPortal © 2005-2018