www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DLL (not static one) + Thread.getThis() = access violation

reply bobef <bobef lessequal.com> writes:
Basically it is what the title says. I encountered  this for second time 
so now I am pretty sure. I tested it with the example from the docs and 
it crashes it too, so it is not my fault. I wrote Walter about this in 
the context of DMDScript, but I guess he is too busy, so I post it here, 
if someone can say something... There is some problem with the threads 
in dynamically linked DLL (dynamically linked dynamic link libraries :) 
)  . I belive threads are the cause of my trouble when I try to create 
DWT control within DLL (I posted yesterday about this in the DWT NG)... 
It is interesting if it is till going to crash if I load from statically 
linked DLL. I.e. exe -> static dll -> dynamic dll -> thread.getthis() 
... I will investigate this later...
Feb 26 2006
parent reply bobef <bobef lessequal.com> writes:
bobef wrote:
  > It is interesting if it is till going to crash if I load from 
statically
 linked DLL. I.e. exe -> static dll -> dynamic dll -> thread.getthis() 
 ... I will investigate this later...
It still crashes... Damn, this is a showstopper!
Feb 26 2006
parent bobef <bobef lessequal.com> writes:
Seems the problem is there only if gc_init() is not called, i.e. if the 
module uses caller's GC. Looks like gc_init() is doing something which 
should be done in gc.setGChandle() also...
Feb 27 2006