castle-engine / castle-model-viewer

Viewer for many 3D and 2D model formats: glTF, X3D, VRML, Collada, 3DS, MD3, Wavefront OBJ, STL, Spine JSON, sprite sheets in Cocos2D and Starling XML formats
https://castle-engine.io/castle-model-viewer
90 stars 19 forks source link

Anchor causes access violation in View3dScene #16

Closed billy-castle closed 5 years ago

billy-castle commented 5 years ago

When I use an Anchor to switch from one VRML (or X3D) file to another, View3DScene reports an "access violation", although you can continue to browse the new file. My experimentation finds that this occurs only if there is a script in the 2nd file of type "castlescript". Because if I overtype the script type with "javascript", although this would keep the script from working, it does get rid of the access violation.

To help you recreate the bug, I have attached two small vrml files redcube.txt and bluecube.txt. Change the extension of both to .wrl then open redcube.wrl in View3DScene. Click on the red cube, which will transfer you to bluecube.wrl. A do-nothing castlescript was included in bluecube.wrl, which causes the access violation. Try replacing "castlescript:" with "javascript:", and see if this eliminates this fault.

bluecube.txt redcube.txt

michaliskambi commented 5 years ago

Thank you for reporting! Fixed (by a commit to Castle Game Engine).

http://michalis.ii.uni.wroc.pl/view3dscene-snapshots/ should have a new view3dscene version for testing in ~15 minutes.

billy-castle commented 5 years ago

I'll be checking. At last check (1:49pm PDT Seattle) I saw a list of updates made today, but I'm still waiting for the macOS version.

michaliskambi commented 5 years ago

Ah, sorry -- I forgot you're interested in macOS version. Our Jenkins doesn't automatically make macOS version.

I'll try to make a macOS version during this weekend, I'll let you know.

michaliskambi commented 5 years ago

I just uploaded the latest view3dscene build for macOS, which includes a fix for this issue, to http://michalis.ii.uni.wroc.pl/view3dscene-snapshots/macosx/ :) Enjoy!