android - 包装的 android-app 在恢复 "no current context"时崩溃

标签 android ios cordova opengl-es resume

我通过 flambe/haxe 获得了一个 webapp 构建,它由 phonegap 构建包装以获得 .ipa 和 .apk。目前唯一剩下的错误是,如果我在应用程序之间切换或按下主页按钮,应用程序会丢失其上下文,从而导致在 android 上出现以下错误:

"W/Adreno200-EGL(31381): <qeglDrvAPI_eglSetBlobCacheFuncsQCOM:5575>: EGL_BAD_PARAMETER"    
"E/libEGL(31381): eglSetBlobCacheFuncsANDROID resulted in an error: 0x300c"      
"E/SurfaceTexture(31381): [unnamed-31381-1] updateTexImage: invalid current EGLContext"    
"E/CanvasTexture(31381): unexpected error: updateTexImage return -38"

最后两行一直重复(即使在几分钟后),直到我手动关闭应用程序,这会导致以下错误消息:
"E/libEGL(21636): call to OpenGL ES API with no current context (logged once per thread)"

完整的错误日志可以在这里查看:http://goo.gl/UkxwfI (投递箱)

一直困扰我的一件事是以下消息,因为所有“相关”问题都打开了该功能,但我找不到任何可以改变它的东西。
“D/webcoreglue(31381):netstack:内存缓存功能已关闭”

另一件事是: D/CordovaActivity(31381):CB-3064:errorUrl 为空
截至http://goo.gl/qZWc4F (github)在 Cordova 恢复似乎有问题。 (只需 strg+f "cb-3064")

我花了一整天的时间来使用谷歌,比如:
EGL_BAD_PARAMETER、qeglDrvAPI_eglSetBlobCacheFuncsQCOM、SurfaceTexture、CanvasTexture、updateTexImage、无效的当前 EGLContext、eglSetBlobCacheFuncsANDROID、错误:0x300c、OpenGL ES API

但没有任何好的提示或有用的信息。

附加信息:

  • tested on Sony Xperia J (ST26i) and android 4.1.2
  • min android SDK 14
  • android:hardwareAccelerated="true" (default since sdk 14)
  • landscape + fullscreen
  • webview used to display the website coming from flambe/haxe
  • used build phonegap / phonegap 3.3 (using 2.8 - 3.3 = same)
  • building it myself via cordova doesnt help (so it should not relate to phonegap build)
  • cordova.inappbrowser only used to open links in external browser, website running in webview
  • website only shows a html5-game (nothing fancy, just something like bejeweld)


使用 Android-Manifest 可能会有一些简单的帮助。我真的不想做原生,因为 webapp 也通过 Phonegap 发送到 iOS。

更新 1

尝试使用 native android 并使用不同的 list 设置来重现错误。但这似乎与 phonegap/cordova 如何处理屏幕上所有内容的绘制有关。

接下来要做的事情将涉及在 phonegap-forums 上发帖并查看 iOS 错误日志。也许我在比较我的结果时发现了一些东西:iOS app crashes on resuming

更新 2

iOS-Errorlog 没有帮助。异常类型 20 和异常代码 8badf00d。堆栈也显示图形错误(如在 android 中)。错误日志见评论中的链接...

最佳答案

通过使用cordova自己构建android和ios来“修复”。恢复/重新启动感觉有点颠簸,但这是接下来要解决的问题。

Phonegap 构建只是不喜欢应用程序的生命周期。

关于android - 包装的 android-app 在恢复 "no current context"时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23295574/

相关文章:

android - ConstraintLayout 防止顶部和底部小部件重叠

android - 错误 -24 Google Play 应用程序 android

android - 具有多个顶级目的地的导航图

ios - 通过 UIFont(...) 或 setTitleTextAttributes 定义标签始终显示小写字符串

iOS 9 didRangeBeacons 调用了更多次。 iOS-8 每秒一次

java - 如何在 Android 中使用 cordova 创建一个基本的应用程序类

android - 音频播放中的错误(261,-1003)android错误

ios - Xcode 5 中的 UIViewController - socket 未显示

java - 配置根项目 android 时出错

node.js child_process 生成忽略等号