Watch, Follow, &
Connect with Us
Public Report
Report From: Kylix/RTL/Pascal    [ Add a report in this area ]  
Report #:  6139   Status: Reported
Runtime error 232
Project:  Kylix Build #:  2
Version:    3.0 Submitted By:   Mirko NextWare
Report Type:  Crash / Data loss / Total failure Date Reported:  10/7/2003 7:54:23 AM
Severity:    Critical / Show Stopper Last Updated: 10/22/2003 4:10:56 AM
Platform:    RedHat Linux Internal Tracking #:  
Resolution: None  Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (2 Total Ratings)
5.00 out of 5
Total Votes: None
Description
Runtime error 232 on multi-thread application with shared library
Steps to Reproduce:
./Project1
Inizio
Carica
Caricata
Ciao: 6271
Scarica
Scaricata
Runtime error 232 at 08057515

//---------------------------------------------------------------------------------------
library Project2;

uses
  Libc,
  SysUtils,
  Classes;

{$R *.res}

procedure Stampa;stdcall;export;
begin
WriteLn('Ciao: ',GetPid);
end;

exports Stampa;

begin
end.

//---------------------------------------------------------------------------------------
program Project1;

{$R *.res}

uses
  SysUtils,
  Unit1 in 'Unit1.pas';

begin
Writeln('Inizio');
TProva.Create(False);
Sleep(500);
Writeln('Fine');
end.

//---------------------------------------------------------------------------------------
unit Unit1;

interface

uses SysUtils,
     Classes;

type
  TProva = class(TThread)
  private
  protected
    procedure Execute; override;
  end;

type TStampa=procedure;stdcall;

implementation

{ TProva }

uses Libc;

procedure TProva.Execute;
var L:LongWord;
     S:TStampa;
begin
Writeln('Carica');
L:=LoadLibrary('libProject2.so');
S:=GetProcAddress(L,'Stampa');
Writeln('Caricata');
  if L>0 then
  begin
   S;
   Writeln('Scarica');
   FreeLibrary(L);
   Writeln('Scaricata');
  end;
end;

end.
Workarounds
None
Attachment
None
Comments

Paul Lambadaris at 10/8/2003 2:47:22 AM -
Can you provide a demo? I have no problems loading shared libraries from threads.

Andrew Fionik at 10/9/2003 10:57:46 PM -
I have multithreaded network server that use both BPLs and SOs. No problem at all. Of course they loaded at application start not explicitly from separate threads.

Server Response from: ETNACODE01