runtime crashes with "rt/sections_elf_shared.d(688) _handleToDSO not in sync with _loadedDSOs"
Arjan
arjan at ask.me.to
Tue Nov 21 08:22:12 UTC 2023
On Monday, 20 November 2023 at 23:03:43 UTC, Jaap Geurts wrote:
> On Thursday, 16 November 2023 at 17:59:56 UTC, Arjan wrote:
>> On Wednesday, 15 November 2023 at 22:41:19 UTC, Jaap Geurts
>>
>> I do not understand what you want to achieve, but maybe
>
> I want to load a plugin into QML. This works with the help of
> dqml. It crashes upon exit of the QML app but I must have a
> clean exit. What I think happens is the following:
>
> The best solution for me would be that the D runtime would
> still report an error, but not call `abort()`.
>
>> (ab)using the
>> [`atexit`](https://en.cppreference.com/w/cpp/utility/program/atexit)from the D shared
[..]
>
> I tried this, but doesn't work either, because when I register
> my function I'm late to the party and my function gets called
> after D's runtime exit handler has been called.
The order of calling registered function by `atexit` should be in
LIFO, IIRC, that would imply the D's runtime exit handler is
registered later? Or not using the `atexit` at all?
Still there would be the TLS thread issue to solve..
Isn't the [module
destructor](https://dlang.org/spec/module.html#staticorder)
`static ~this` or `shared static ~this` called in the correct
thread and correct order?
> My code example above is a good explanation of what happens in
> my setup. It crashes with the exact same error message.
I see. Will play around with it if time permits..
More information about the Digitalmars-d
mailing list