Either I'm confused or the gc is

Ali Çehreli acehreli at yahoo.com
Fri Oct 23 00:03:46 UTC 2020


On 10/22/20 2:28 PM, donallen wrote:

 > I've already provided valgrind output that shows the gc referencing an
 > uninitialized variable.

I had similar problems. Luckily, all my problems were issues with my code.

* In one case, the program was linked with dmd but I was loading a 
shared library (written again in D) but I was calling dlopen(). Instead, 
I had to call Runtime.loadLibrary.

* In another case, my D library was being loaded by Python. I had 
forgotten to initialize the D runtime. I had to call Runtime.initialize.

* In yet another case, I was calling myObject.close() in destructors, 
forgetting that myObject was already finalized by the GC.

 > Please understand -- I don't have infinite time to spend on this

It's some more work but are you aware of Dustmite, which may be able to 
magically reduce your issue to a minimal case?

 
https://dlang.org/blog/2020/04/13/dustmite-the-general-purpose-data-reduction-tool/

Ali



More information about the Digitalmars-d mailing list