[OpenSCAD] Crash on Windows 7 when run from PHP shell_exec()

Ian ian at dangerousprototypes.com
Wed Apr 29 04:32:24 EDT 2015


I'm using OpenSCAD to export a preview of 3dmodel files for our new 
forum. It is run using shell_exec(), exec(), etc. On my primary 
development computer it (x32 and x64, latest stable, tested) works great 
once every few minutes, but always puts up a crash report on second/next 
runs until I let it sit. Even when it crashes I still get the .png 
export properly. I tried killing the script just after executing 
openscad.com but it still crashes.

Here's the message:
Problem signature:
   Problem Event Name:    APPCRASH
   Application Name:    openscad.com
   Application Version:
   Application Timestamp:    5536adde
   Fault Module Name:    KERNELBASE.dll
   Fault Module Version:    6.1.7601.17651
   Fault Module Timestamp:    4e211319
   Exception Code:    c0000005
   Exception Offset:    0000d4d5
   OS Version:    6.1.7601.
   Locale ID:    1033
   Additional Information 1:    0a9e
   Additional Information 2:    0a9e372d3b4ad19135b953a78882e789
   Additional Information 3:    0a9e
   Additional Information 4:    0a9e372d3b4ad19135b953a78882e789

Here's the command line run and the output php gets from running the 
c:/progra~2/OpenSCAD/openscad.com -o 
D:/xampp/htdocs/dangercore/temp_upload/w1/render.png -D"model=\"C
:/Users/ian/AppData/Local/Temp/EDF4.tmp/test.STL\"" --projection=o 

Compiling design (CSG Products normalization)...
Normalized CSG tree has 1 elements
OpenGL Program Validation results:
Validation successful.

stl2png.scad is simply:
model = "default.stl";
import(file = model);

I just came home to try it on a different rig, and it never crashes as 
all! I will just ignore it for now as the server runs the linux version 
of openscad and doesn't seem to have any problems either.

To summarize:
1. Running from php exec() works perfectly one time, then next runs all 
create a crash report box. Leave it for 5-10 minutes and it runs fine again
2. Image still created successfully, it just seems like a crash upon exit
3. Running same command from command line or .bat file works every time
4. Crashes on work computer (x32 and x64), works fine on home computer 
and linux server
5. There seem to be no zombie processes active when it crashes

Honestly it is just a minor annoyance on one computer and is likely due 
to the configuration of that box. However, if anyone sees anything 
obvious I'd appreciate a suggestion.

Thank you and best regards,


More information about the Discuss mailing list