aren't you guys all getting tons of internal error's as soon as you combine dynamic arrays with static arrays? It seems as if these things are completely seperate things, but their syntax sugests a more closely related connection. I really find it confusing...
So, after reducing, I am very certain that at least one problem comes from generating a png, the code used is here available : https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff/blob/master/png.d seeing as this is pure d, am I right in assuming there should never be any memory leaks when using this? The reduced loop that only generates images is here : TrueColorImage i= new TrueColorImage(width,height); PNG* png; double[][4] curtrans; while(true){ curtrans=generateTransformationMatrix(); for(int y=0;y<height;y++) for(int x=0;x<width;x++) i.data[(y*width+x)*4..y*width+x)*4+4]=colorify(applyTransformation(transformXY(x,y),curtrans)).dup[0..3] ~ 255; // and finally write the data to a png file png = pngFromImage(i); //std.file.write("images/"~toHexString(md5Of(curtrans))~".png", writePng(png)); } if you comment out "png = pngFromImage(i)" the program appears to not blow up over time. I think the ice come from assiging a slice of a dynamic array to a slice of a static array (hence the .dup). (I'll try reducing it with dustmite) 2013/5/12 Benjamin Thaut <[email protected]> > Am 12.05.2013 21:05, schrieb maarten van damme: > >> This is ridiculous. Your solution appears to keep the memory somewhat >> constant around 20mb-28mb untill it suddenly runs out of memory. >> Literally out of nowhere. >> >> I have no idea what's causing everything, so I decided to get rid of the >> window altogether and to try saving the images instead of displaying + >> saving them. Now I run in "Internal error: ..\ztc\cgcs.c 343"... >> >> D is really dissapointing here. Maybe it's the gc having fun, maybe it's >> something else, no way to know for sure. Having to give up on displaying >> it altogether runs into internal error's. >> > > As D is a relative new lagnauge stuff like this can happen. It would be > great if you could reduce the compiler crash to a minimal test case using > dustmite: > https://github.com/**CyberShadow/DustMite<https://github.com/CyberShadow/DustMite> > A description how to use it is aviable in the wiki. If you successfully > reduced the compiler error please fill in a bug report at > http://d.puremagic.com/issues/ > > -- > Kind Regards > Benjamin Thaut >
