double free or corruption error when using parallel foreach

Minas Mina minas_mina1990 at hotmail.co.uk
Thu Dec 27 11:55:00 PST 2012


I want to make my raytracer run in parallel to speed things up.

I have this code:

http://pastebin.com/a2Aw1LnX

And I get this:

Rendering...
*** glibc detected *** 
/home/minas/Projects/D/raytracing/raytracing/bin/Release/raytracing: 
double free or corruption (fasttop): 0x0000000001681710 ***
*** glibc detected *** 
/home/minas/Projects/D/raytracing/raytracing/bin/Release/raytracing: 
double free or corruption (fasttop): 0x0000000001681710 ***
bash: line 1: 27493 Aborted                 (core dumped) 
/home/minas/Projects/D/raytracing/raytracing/bin/Release/raytracing

Why does this happen?

Note that scene is of type Scene, which is a struct.


More information about the Digitalmars-d-learn mailing list