vsinghp / jsc3d

Automatically exported from code.google.com/p/jsc3d
0 stars 0 forks source link

ipad Safari/Chrome crash on loading STL > 3 MByte #50

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. load the STL using (within a Sencha Touch Application, viewerXubComponent is 
a Sencha Container): 
...
viewerSubComponent.setHtml('<canvas id=\"stlCv\" style=\"border: 1px solid;\" 
width=\"890\" height=\"650\" ></canvas>');
    var canvas = Ext.get('stlCv');
    var viewer = new JSC3D.Viewer(canvas.dom);
    viewer.setParameter('ModelColor',       '#CAA618');
    viewer.setParameter('BackgroundColor1', '#E5D7BA');
    viewer.setParameter('BackgroundColor2', '#383840');
    viewer.setParameter('RenderMode',       'flat');
    viewer.setParameter('Renderer',       'webgl');
    viewer.setParameter('Definition',       'standard');
    viewer.init();
    viewer.update();
    var stl_loader = new JSC3D.StlLoader();
    stl_loader.onload = function(scene) {
        viewer.replaceScene(scene);
    };
    stl_loader.loadFromUrl(documentPath);
...

2. Files till around 3 MByte work well 
3.

What is the expected output? What do you see instead?
view of the STL

What version of the product are you using? On what operating system?
iOS 7.0.4, Safari(current with the version of iOS) and Chrome (Version 
31.0.1650.18)
jsc3d.js, jsc3d.touch.js and jsc3d.webgl.js download from today

Please provide any additional information below.

Original issue reported on code.google.com by hgzwicke...@gmail.com on 4 Dec 2013 at 2:27

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for this report! I'll see it as soon as possible.

Does the problem recur in software rendering mode? Turn to software rendering 
mode by removing this line:

  viewer.setParameter('Renderer',       'webgl');

or replacing it with:

  viewer.setParameter('Renderer',       '');

Original comment by Humu2...@gmail.com on 4 Dec 2013 at 4:50

GoogleCodeExporter commented 8 years ago
Hi, yes the same with both above settings. I changed my code a bit to load the 
STL  on init/update. I have now the progress bar that goes to +- 100%, stays 
there for around 5 seconds and the Safari/Chrome crash

Original comment by hgzwicke...@gmail.com on 4 Dec 2013 at 5:05

GoogleCodeExporter commented 8 years ago
just to make sure: the stl example I attached works fine on the Mac with the 
iPad application

Original comment by hgzwicke...@gmail.com on 4 Dec 2013 at 5:10

GoogleCodeExporter commented 8 years ago
I see. It must be the same with this issue: 
http://code.google.com/p/jsc3d/issues/detail?id=47 which is relevant to some 
defect in the latest Webkit or V8 JavaScript engine.

This is because at this moment both Safari and Chrome cannot support WebGL at 
all on iOS platforms (see this document for more details: 
http://caniuse.com/webgl). So even you assign the 'Renderer' parameter to hint 
the viewer to use WebGL, it will still fall back to the default software 
rendering mode, in which the browsers' internal defect may lead to a random 
crash.

The problem is first reported on Chrome 29. I've already submitted this to the 
chromium team. But it seems they are still working hard on the fixup.

We will have to pray they could repair it soon in future release :-(

Original comment by Humu2...@gmail.com on 4 Dec 2013 at 6:12

GoogleCodeExporter commented 8 years ago
hi, thanks for the quick and detailled reply

Original comment by hgzwicke...@gmail.com on 4 Dec 2013 at 6:17