加载特定模型后Forge Viewer崩溃 [英] Forge viewer crashes after loading specific model

查看:232
本文介绍了加载特定模型后Forge Viewer崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用伪造查看器来加载较大的模型,但是使用几秒钟(3-5)后,查看器似乎崩溃了。 (具有典型的Aw snap!页面。)。



我在使用其他型号时没有遇到问题,但这在Windows 10,Chrome上的特定型号上会发生。



我已经在OS X中测试了加载,但是它似乎可以运行,尽管速度有些慢。



我目前最好的猜测是由于Chrome中的内存溢出导致了这种情况的发生,但这还不能确定,因为查看器在我尝试记录堆使用之前崩溃了。



我可以用于有效加载模型的任何选项吗?
另外,是否有允许内存跟踪的调试模式?



如果您需要模型urn,请告诉我。



谢谢!

解决方案

为查看器修改内存环境(例如iPhone),请使用此处的内存限制值更改选项参数:



(请参阅默认内存管理部分)



在内存选项卡中,您可以看到许多与分页内存有关的参数,以便进行渲染和联网-加载许多网格(网格包(pf)zip,按最接近或最大的网格ABB排序,忽略屏幕上像素太少的网格等)。



另一个激活Viewer的低内存模式的快速方法是通过激活移动调试来欺骗您的桌面chrome浏览器,使其认为它是移动设备。您可以使用它来测试与移动相关的内存问题。
请遵循以下指南: Chrome调试-移动模式



希望这会有所帮助!


I have been trying to use the forge viewer to load somewhat large model, but it seems like that the viewer crashes after few seconds (3 - 5) of usage. (with typical Aw snap! page).

I've had no trouble with other models, but this happens on this specific model on Windows 10, Chrome.

I've tested loading in OS X, but it seem to work although it is somewhat slow.

My current best guess is that this is happening due to memory overflow in Chrome, but this is not yet certain, because the viewer crashes before I try to log the heap usage.

Is there any option that I can use for efficient model loading? Also, is there a debug mode that allows memory tracking?

If you need the model urn, please let me know.

Thanks!

解决方案

To modify the memory environment for the viewer (like iPhone), change the options parameters with memory limit values found here:

(refer to Default Memory Management section) https://developer.autodesk.com/en/docs/viewer/v2/overview/changelog/2.17/

In particular, you can force memory management like this: var config3d = { memory: { limit: 400, // in MB debug: { force: true } } }; var viewer = new av.Viewer3D(container, config3d); viewer.loadModel( modelUrl, {}, onSuccess, onError );

For debugging memory, try the following:

var memInfo = viewer.getMemoryInfo(); console.log(memInfo.limit); // == 400 MB console.log(memInfo.effectiveLimit); // >= 400 MB console.log(memInfo.loaded);

Lastly, you can open the memory manager panel extension, from the Chrome debug console, with this command...

NOP_VIEWER.loadExtension("Autodesk.Viewing.MemoryManager")

Click on the memory-chip icon, to bring up the panel (see screenshot below)...

In the memory tab, you can see many parameters relating to paged memory in order to render and network-load many meshes (mesh packs (pf) zip, sort by closest or largest mesh AABB, ignore meshes that are too few pixels on the screen, etc).

Another quick way to activate the Viewer's low-memory mode, is to trick your desktop chrome browser into thinking it's a mobile device, by activating mobile debugging. You can use this to test out mobile related memory issues. Follow this guide: Chrome debug - Mobile mode

Hope this helps!

这篇关于加载特定模型后Forge Viewer崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆