gpt4 book ai didi

javascript - 三JS : IE11 crashes on Render();

转载 作者:行者123 更新时间:2023-11-28 08:20:02 25 4
gpt4 key购买 nike

当我使用 WebGL 编程时,Internet Explorer 11 遇到一些奇怪的问题。我在所有浏览器中都运行良好,但突然当我更改 4 个网格的位置时...IE 决定崩溃(在 Debug模式下,不指向代码中的任何特定内容)。

我正在运行 IE 11

GL 版本 - WebGL 0.93

着色语言版本 - WebGL GLSL ES 0.93

我收到以下错误:iexplore.exe 中 0x03F6435B (mshtml.dll) 处出现未处理的异常:0xC0000005:写入位置 0xBF35051C 时出现访问冲突。

(最后 5 个)调用堆栈:

mshtml.dll!CMarkupPointer::RemoveMeFromList(void) Unknown mshtml.dll!CBackgroundInfo::Property<class CBackgroundImage>(int)'::7'::`dynamic atexit destructor for 'fieldDefaultValue''(void) Unknown mshtml.dll!CMarkupPointer::MoveToPointer(class CMarkupPointer const *) Unknown mshtml.dll!CDisplayPointer::MoveToPointer(class CDisplayPointer *) Unknown mshtml.dll!CSelectTracker::DoSelection(class CEditEvent *,int,int *) Unknown

这是创建网格的代码:

function PrepareFlowArrows(l_vDiffuser) {
var m_vExtraLoader = new THREE.JSONLoader();
m_vExtraLoader.load('3D_Control/models/FlowArrow.js', callbackLoadFlowArrows(l_vDiffuser));
}

// Callback function for FlowArrows when loading models
function callbackLoadFlowArrows(l_vDiffuser) {
return function (geometry) {
var l_vRotation = 0;
for (var i = 0; i < 4; i++) {
if (i == 0)
l_vRotation = -1.5707; //-1.5707;
else if (i == 1)
l_vRotation = 3.1414;//3.1414;
else if (i == 2)
l_vRotation = 1.5707;//1.5707;
else
l_vRotation = 0;

var l_vMaterial = new THREE.MeshBasicMaterial(); // SETTINGS COLORS MANUALLY (way more nicer with textures though)
l_vMaterial.color.r = 0;
l_vMaterial.color.g = 255;
l_vMaterial.color.b = 0;

var m_vTempFlowArrowMesh = new THREE.Mesh(geometry, l_vMaterial);
m_vTempFlowArrowMesh.scale.x = m_vTempFlowArrowMesh.scale.y = m_vTempFlowArrowMesh.scale.z *= 25;
m_vTempFlowArrowMesh.position.set(0, 0, 0);
m_vTempFlowArrowMesh.rotation.y = l_vRotation;
l_vDiffuser.AddFlowArrow(m_vTempFlowArrowMesh);
m_vScene.add(m_vTempFlowArrowMesh);
}
}
}

由于某种原因,这段代码在 Render(); 时会导致 IE11 崩溃。被调用并且网格被设置为可见。

this.UpdateFlowArrows = function () {
this.GetBoundingBox();
if (m_vFlowArrows[0] != null) {
m_vFlowArrows[0].position.x = m_vBoundingBox.min.x - 100;
m_vFlowArrows[0].position.y = m_vBoundingBox.min.y + ((m_vBoundingBox.max.y - m_vBoundingBox.min.y) / 2);
m_vFlowArrows[0].position.z = m_vBoundingBox.min.z + ((m_vBoundingBox.max.z - m_vBoundingBox.min.z) / 2);
//m_vFlowArrows[0].rotation.y = -1.5707;
}

if (m_vFlowArrows[1] != null) {
m_vFlowArrows[1].position.x = m_vBoundingBox.min.x + ((m_vBoundingBox.max.x - m_vBoundingBox.min.x) / 2);
m_vFlowArrows[1].position.y = m_vBoundingBox.min.y + ((m_vBoundingBox.max.y - m_vBoundingBox.min.y) / 2);
m_vFlowArrows[1].position.z = m_vBoundingBox.min.z - 100;
//m_vFlowArrows[1].rotation.y = 3.1414;
}

if (m_vFlowArrows[2] != null) {
m_vFlowArrows[2].position.x = m_vBoundingBox.max.x + 100;
m_vFlowArrows[2].position.y = m_vBoundingBox.max.y - ((m_vBoundingBox.max.y - m_vBoundingBox.min.y) / 2);
m_vFlowArrows[2].position.z = m_vBoundingBox.max.z - ((m_vBoundingBox.max.z - m_vBoundingBox.min.z) / 2);
//m_vFlowArrows[0].rotation.y = 1.5707;
}

if (m_vFlowArrows[3] != null) {
m_vFlowArrows[3].position.x = m_vBoundingBox.max.x - ((m_vBoundingBox.max.x - m_vBoundingBox.min.x) / 2);
m_vFlowArrows[3].position.y = m_vBoundingBox.max.y - ((m_vBoundingBox.max.y - m_vBoundingBox.min.y) / 2);
m_vFlowArrows[3].position.z = m_vBoundingBox.max.z + 100;
//m_vFlowArrows[3].rotation.y = 1.5707;
}
}

请注意,此代码在 Chrome、Opera 和 Firefox 中运行良好。我可以以某种方式重写此代码以使 IE 不会崩溃吗?

编辑有趣的是......如果我添加这行

 m_vTempFlowArrowMesh.visible = false;

在回调LoadFlowArrows中...即使它更新了箭头,它也不会再崩溃。

最佳答案

IE 团队无法(由于某些尴尬的原因)重现此错误。

尽管我向他们发送了大约 3x800mb 的故障转储文件以及 IE 客户端的信息文件,但他们仍无法找到问题。

所以......他们关闭了这个问题,因为它在他们眼中不再相关。

GG 微软。

叹息

关于javascript - 三JS : IE11 crashes on Render();,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23101262/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com