discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Crash on Windows 7 when run from PHP shell_exec()

I
Ian
Wed, Apr 29, 2015 8:32 AM

Hello,

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:    0.0.0.0
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.2.1.0.256.48
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
program:
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
D:/xampp/htdocs/dangercore/openscad
/stl2png.scad

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,

ian

Hello, 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: 0.0.0.0 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.2.1.0.256.48 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 program: 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 D:/xampp/htdocs/dangercore/openscad /stl2png.scad 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, ian
MK
Marius Kintel
Wed, Apr 29, 2015 2:24 PM

Hi Ian,

Windows cmd-line stability is indeed not comparable to Linux or Mac, mostly due to us not having any native Windows developers on the team, so we’re dependent on getting help debugging this in the field.

If you could try a few things that might help us get some ideas:

  • Run 'openscad —info’, so we can get a good idea what your installation looks like
  • Test with various types of designs, not only STL imports, to see if the crash is independent of the design or not
  • Test if openscad.exe and openscad.com both give the same results. openscad.com is just a wrapper dealing with stdio as that’s a bit tricky under Windows.
  • Investigate what environmental differences exist between normal cmd-line usage and PHP. Things like CWD, PATH, or other environment variables might trigger bugs
  • Check if there are any traces of the crash in the Windows Event Log.
  • ..and if you’re adventurous: Build from source and see if you can get a stack trace of the crash.

The symptom that it crashes on the second run is a bit odd though..

-Marius

Hi Ian, Windows cmd-line stability is indeed not comparable to Linux or Mac, mostly due to us not having any native Windows developers on the team, so we’re dependent on getting help debugging this in the field. If you could try a few things that might help us get some ideas: * Run 'openscad —info’, so we can get a good idea what your installation looks like * Test with various types of designs, not only STL imports, to see if the crash is independent of the design or not * Test if openscad.exe and openscad.com both give the same results. openscad.com is just a wrapper dealing with stdio as that’s a bit tricky under Windows. * Investigate what environmental differences exist between normal cmd-line usage and PHP. Things like CWD, PATH, or other environment variables might trigger bugs * Check if there are any traces of the crash in the Windows Event Log. * ..and if you’re adventurous: Build from source and see if you can get a stack trace of the crash. The symptom that it crashes on the second run is a bit odd though.. -Marius