BlackBerry Webworks 应用程序崩溃并显示空白警报框 - 如何调试?
我创建了一个 BlackBerry Webworks 应用程序,该应用程序由多个页面组成,每个页面都从本地 SQLite 数据库加载数据。
该应用程序工作正常,直到我在一定数量的页面之间导航,此时应用程序显示一个空白警报框并挂在页面之间显示的加载屏幕上。
这是使用 Bold 9700 模拟器的情况,但也会发生在设备本身上。我尝试过禁用缓存以及增加缓存的大小,但均无济于事。控制台什么也没显示,模拟器上的事件日志也不显示。
以前有人遇到过这种行为吗?更重要的是,如何从模拟器中获取有用的调试信息,以便找到罪魁祸首?
非常感谢!
编辑:我已经在 Blackberry 推荐的 html5_init.js 库中找到了这个库,该库用于将 HTML5 转换为 OS5 的 Google Gears 调用。有什么想法吗?
进一步编辑:我已删除 html5_init.js 的所有痕迹,而是直接使用 Google Gears API。这解决了问题,但需要我将所有数据库代码加倍。 Google Gears 要求您对所有结果集调用clear(),以便它们不会导致内存泄漏,但 html5_init 不提供该功能。也许这就是原因?
I've created a BlackBerry webworks application that consists of multiple pages each loading data from a local SQLite database.
The application works fine until I've navigated between a certain number of pages, at which time the application shows a blank alert box and hangs on the loading screen that shows between pages.
This is using the Bold 9700 simulator but also occurs on the device itself. I've tried disabling caching, as well as increasing the size of the cache, both to no avail. The console shows nothing, neither does the event log on the simulator.
Has anyone come across this behaviour before? More importantly, how do I get any useful debug information out of the simulator so I can track down the culprit?
Many thanks!
Edit: I've tracked this down the the html5_init.js library that Blackberry recommend for translating HTML5 to Google Gears calls for OS5. Any ideas?
Further Edit: I've removed all traces of html5_init.js and instead I'm using the Google Gears API directly. This resolves the problem but requires that I double up all my database code. Google Gears requires that you call clear() on all ResultSets so that they don't cause a memory leak but html5_init doesn't offer that functionality. Maybe that could be the cause?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论