www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Tracing InvalidMemoryOperationError

reply stunaep <admin pea2nuts.com> writes:
I need to find the source of this InvalidMemoryOperationError. I 
tried loading the project in visuald but it wont break on the 
error.
I also tried adding
extern(C) void onInvalidMemoryOperationError(void*) {
   asm { int 3; }
}
building with
dub build --build=debug --arch=x86_64
and then using gdb, but it says "(no debugging symbols found)" and does this
(gdb) r
Starting program: program.exe
[New Thread 8144.0xf00]
Program received signal SIGTRAP, Trace/breakpoint trap.
0x000000013f7a5f99 in ?? ()
(gdb) where
#0  0x000000013f7a5f99 in ?? ()
Backtrace stopped: previous frame identical to this frame 
(corrupt stack?)
Mar 15 2016
parent =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 03/15/2016 12:27 AM, stunaep wrote:
 I need to find the source of this InvalidMemoryOperationError. I tried
 loading the project in visuald but it wont break on the error.
Just to make sure, you tried to break inside the constructor of InvalidMemoryOperationError, right? Right where it does super( "Invalid memory operation", file, line, next ); In any case, a common reason for that error is when you have an expression (e.g. explicit 'new', some array operations, etc.) that uses the GC inside a destructor. Ali
Mar 15 2016