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

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

问题描述

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

我在使用其他型号时没有遇到任何问题,但在 Windows 10、Chrome 上的此特定型号上会发生这种情况.

我已经在 OS X 中测试过加载,但它似乎可以工作,尽管它有点慢.

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

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

如果您需要模型骨灰盒,请告诉我.

谢谢!

解决方案

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

(参考默认内存管理部分)

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

激活查看器的低内存模式的另一种快速方法是通过激活移动调试来欺骗您的桌面 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 查看器崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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