[fpc-pascal] Problems with Dynlibs.UnloadLibrary on Linux

Andrew Brunner andrew.t.brunner at gmail.com
Wed Dec 17 02:55:31 CET 2008


On Tue, Dec 16, 2008 at 3:29 PM, Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:

> In what code does it crash? Inside unloadlibrary, or (shortly) afterwards?
> What is the backtrace at the point of the crash?

It blows out right during the DynLibs.UnloadLibrary(FLibHandle)

There is only a read access violation that is raised.  Presumably by
the MM of the SO.

>> Are there a few tricks involved in getting FPC to compile these SOs
>> properly?  The minute I include Classes in my project's uses I can't
>> Unload the library.
>
> Even if you don't call any routines from that unit?
>

Yes,  If I compile with no uses clause the Lib loads and unloads as I
want.  As many times as I want with no issues.  But if I re-build the
SAME Library project with the uses Classes; The Main Application
crashes on the UnloadLibrary call.  I repeat, all I have to do to
reproduce this bug is to use Classes; unit inside a Library under
Ubuntu.

I have smart linking options enabled or else the Compiler can't link
the project during build.



More information about the fpc-pascal mailing list