[fpc-pascal] Nil referancing doesn't raise exceptions in thread context under Linux...

M. Utku Karataş m.utku.k at gmail.com
Sun May 20 20:37:10 CEST 2007


Hi everyone,

I am using version 2.1.1 on Linux and calling this procedure in a thread:

procedure TestNullRef;
var p: ^integer;
begin
    p := nil;
    try
        p^ := 13; // now this should raise exc!
        ShowMessage(IntToStr(p^));
    except
        ShowMessage('TestNullRef: ' +
Exception(ExceptObject).Message); // should reach!
    end;
end;

The problem is that caller thread just hangs up and the exception
handler doesn't get called. When I call this procedure in my main
thread everything is just fine.

Is there anything that renders exc. handling useless under threads?
Any explanations?

Regards,
Utku.



More information about the fpc-pascal mailing list