协程'nokia.maps.map.render.p2d.Engine#_renderCo'异常异常中止 [英] Coroutine 'nokia.maps.map.render.p2d.Engine#_renderCo' aborted abnormally with exception

查看:84
本文介绍了协程'nokia.maps.map.render.p2d.Engine#_renderCo'异常异常中止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将HereMaps JavaScript从2.2.4更新到2.5.3,并且该地图已停止在Chrome(版本31.0.1650.57 m)上工作. Firefox和IE可以像以前一样工作.

在控制台上,我多次看到该消息

协程'nokia.maps.map.render.p2d.Engine#_renderCo'因异常base.js:158而异常中止 TypeError:无法读取未定义的属性"body"

有人暗示出什么问题了吗?

谢谢.

解决方案

在不看到您的代码的情况下很难回答您的特定问题,但是我能够产生类似的错误,这可能有助于您查找问题. /p>

如果收到多个错误消息,则可能是JavaScript库本身在定期调用某些内容.从错误的文本来看,该库可能正在运行协程,通常用于在应用程序内进行线程化.

我可能产生的错误是在回调中-如果我在地图上添加了叠加层,并故意尝试访问代码中不存在的属性,我会得到:

Coroutine 'nokia.maps.map.render.p2d.Engine#_renderCo' aborted abnormally with exception base.js:158
TypeError: Cannot read property 'bar' of undefined 

这是因为我添加了一个错字,如下所示:

我将引用从回调中的foo.something.bar更改为foo.does_not_exist.bar.因此,我想您在回调中的某处您正在引用回调中的foo.something.body-例如,它可能在侦听器中.

另一种可能性是,您在创建地图时直接切换到Display.SATELLITE-不再允许:

来自 developer.here.com 上的新闻Feed:

使用2.5.3进行更改

新的渲染引擎需要初始化地图 异步地.如果要更改中心,缩放级别或 API的基本地图类型现在要求应用程序等待 "displayready"事件将被触发.此事件仅触发一次. 请参考开发者指南("基本地图之外的部分申请 )以获得详细信息.

I've updated HereMaps JavaScript from 2.2.4 to 2.5.3 and the map has stopped working on Chrome (version 31.0.1650.57 m). Firefox and IE work as before.

On the console I see the message many times

Coroutine 'nokia.maps.map.render.p2d.Engine#_renderCo' aborted abnormally with exception base.js:158 TypeError: Cannot read property 'body' of undefined

Does anyone have a hint of what might be wrong?

Thanks.

解决方案

It is very difficult to answer your specific problem without seeing your code, but I am able to produce a similar error which may help you track down your issue.

If you are getting multiple error messages, then it is likely that the JavaScript library itself is calling something periodically. From the text of the error it likely that the library is running a Coroutine, which is usually used for threading within the application.

The error I can produce is in a callback - if I add an overlay to the map, and deliberately try to access a non-existent property within my code I can get:

Coroutine 'nokia.maps.map.render.p2d.Engine#_renderCo' aborted abnormally with exception base.js:158
TypeError: Cannot read property 'bar' of undefined 

This was because I added a typo as follows:

I changed the reference from foo.something.bar in the callback to foo.does_not_exist.bar. So I guess somewhere in your callbacks you are referencing foo.something.body in your callback - it could be in a listener for example.

Another possibility, is that you are switching directly to Display.SATELLITE when you are creating the map - this is no longer allowed:

Taken from the News feed on developer.here.com:

Breaking changes with 2.5.3

The new rendering engine requires the map to be initialized asynchronously. If you want to change the center, zoom level or the base map type the API now requires the application to wait for the "displayready" event to be fired. This event is only fired once. Please refer to the developer's guide (section "Beyond the Basic Map Application ") for details.

这篇关于协程'nokia.maps.map.render.p2d.Engine#_renderCo'异常异常中止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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