Add "inherited Create" in the constructor to reserve memory for your class member fields like dbgr
That is not correct. The memory allocation is done
before the code of the constructor is executed and thus also before any
inherited Create is executed. It depends on how the constructor is called: the outermost constructor is called in a way that
NewInstance will be called, while nested calls to
Create will be just like normal method calls.
thanks Bart ,
Yes that's totally correct ,
the main problem is initialising the dbgr variable since it's doesnt seems to be created , dbgr :=TProcessUTF8.Create(nil); // THIS CAUSES A SIGSEGV (memory violation)!!!
You misunderstood
Bart: your error is that you use
DbgEngine.Create() which is
wrong, cause in that case there will be no memory allocated for
DbgEngine thus your initialization of
dbgr fails. You
must use
DbgEngine := TGDBDebugger.Create and then the initialization of
dbgr will work as well.