Hersir Posted April 4, 2017 Share Posted April 4, 2017 Hi my app is crashing on initial load (not always), looks like that happens when scene start to load, after error site is reloaded and works further ok. I am trying to get more debug info , but right now I have only this message GL Support: can **NOT** render to 1 texture. Have anyone had similar issues? Works great on desktop. Quote Link to comment Share on other sites More sharing options...
Hersir Posted April 4, 2017 Author Share Posted April 4, 2017 Crash logs say EXC_BAD_ACCESS sigsegv but looks like to could by anything Quote Link to comment Share on other sites More sharing options...
Hersir Posted April 4, 2017 Author Share Posted April 4, 2017 Looks like the crash is caused by big .babylon file, found lot of threads about crashes on iOS safari where big json file is loaded. Crash usually happens directly after file is loaded Quote Link to comment Share on other sites More sharing options...
davrous Posted April 4, 2017 Share Posted April 4, 2017 Hello, Yes, you must pay a lot of attention on mobiles. Memory is constraint and trying to load a model bigger than 50 MB could easily fail as the browser is taking too much memory to load the JSON and parse it in memory. If you can, try to use our incremental system to avoid this problem: http://doc.babylonjs.com/tutorials/using_the_incremental_loading_system but even so, it could still generate crashes. Espilit using this approach: http://www.babylonjs.com/Demos/Espilit works perfectly well on iOS but Hill Valley could sometimes crash for instance http://www.babylonjs.com/Demos/HillValley Note also that big textures could also saturate more quickly the memory on mobile and generate crashes too. David Quote Link to comment Share on other sites More sharing options...
Hersir Posted April 4, 2017 Author Share Posted April 4, 2017 @davrous Thx for input yes my file right now is more than 50mb, I will look at splitting, but will it help if I load separate meshes and build scene at runtime? Also could parsing process be moved to separate thread if possible? Quote Link to comment Share on other sites More sharing options...
davrous Posted April 4, 2017 Share Posted April 4, 2017 Yes, building yourself the scene with separate calls to ImportMesh could help. Separated thread in JavaScript means Web Worker, it could help by avoiding blocking the UI thread but this won't help memory wise which is our main issue there. Plus it's often useless as the communication back to the main thread is often complicated and doesn't offer performance boost. Loading a "big" (for mobile) mesh at once is mainly a memory issue. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.