Its on an HTC Aria, running 2.2 (API 8)
https://en.wikipedia.org/wiki/HTC_Aria
The aria is an armv6 device that supports opengles 2
If you open up the latest Android Studio (im working on windows 7), then import the HelloGL2 sample, then simply try to run it on the above device, it will fail as soon as it tries to make a call into the native library.
Here is the log:
01-06 11:14:08.467 12771-12813/com.android.gl2jni D/dalvikvm: Trying to load lib /data/data/com.android.gl2jni/lib/libgl2jni.so 0x44c165d0
01-06 11:14:08.467 12771-12813/com.android.gl2jni I/dalvikvm: Unable to dlopen(/data/data/com.android.gl2jni/lib/libgl2jni.so): Cannot load library: link_image[1995]: failed to link libgl2jni.so
01-06 11:14:08.477 12771-12813/com.android.gl2jni W/dalvikvm: Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lcom/android/gl2jni/GL2JNILib;.<clinit>
01-06 11:14:08.497 12771-12813/com.android.gl2jni W/dalvikvm: threadid=8: thread exiting with uncaught exception (group=0x40028a00)
01-06 11:14:08.517 95-121/? I/ActivityManager: Displayed activity com.android.gl2jni/.GL2JNIActivity: 9823 ms (total 2027818 ms)
01-06 11:14:08.567 12771-12813/com.android.gl2jni E/AndroidRuntime: FATAL EXCEPTION: GLThread 9
java.lang.ExceptionInInitializerError
at com.android.gl2jni.GL2JNIView$Renderer.onSurfaceChanged(GL2JNIView.java:332)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1327)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
Caused by: java.lang.UnsatisfiedLinkError: Library gl2jni not found
at java.lang.Runtime.loadLibrary(Runtime.java:461)
at java.lang.System.loadLibrary(System.java:557)
at com.android.gl2jni.GL2JNILib.<clinit>(GL2JNILib.java:24)
at com.android.gl2jni.GL2JNIView$Renderer.onSurfaceChanged(GL2JNIView.java:332)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1327)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
01-06 11:14:08.607 95-164/? W/ActivityManager: Force finishing activity com.android.gl2jni/.GL2JNIActivity
This sample works on the 3 other devices i've tried (Galaxy s5, Galaxy J1, Nexus s)
The line: 'Unable to dlopen(/data/data/com.android.gl2jni/lib/libgl2jni.so): Cannot load library: link_image[1995]: failed to link libgl2jni.so' is probably key. I tried loading the library explicitly using system.loadlibrary, but the same problem happens on that call.
I think it might be something to do with the processor being armv6?
The sample is configured to do 'armeabi' though.
I have developed a game using Libgdx. It stops randomly by giving Fatal signal 11(SIGSEGV) error. Sometimes it force closes and sometimes force closes and then automatically restarts. The logs printed during force close are:-
A/libc(3475): Fatal signal 11 (SIGSEGV) at 0x00000008 (code=1), thread 3534 (Thread-343)
I also keep on getting some logs during my game play from time to time.
04-27 09:04:18.750: D/dalvikvm(3475): Issue registerizing the trace in the backend.
04-27 09:04:18.750: I/dalvikvm(3475): Ignoring other issues and retrying without backend registerization
04-27 09:04:18.750: D/dalvikvm(3475): JIT_INFO: Retrying trace Lcom/badlogic/gdx/graphics/g2d/BitmapFontCache;translate, offset 40
04-27 09:12:39.410: D/dalvikvm(3475): JIT_INFO: Issues while compiling trace Ljava/util/Arrays;fill, offset 7
04-27 09:12:39.410: D/dalvikvm(3475): The trace provoked a spill.
04-27 09:12:39.410: I/dalvikvm(3475): Trying less registerization from 1 to 0
04-27 09:12:39.410: D/dalvikvm(3475): JIT_INFO: Retrying trace Ljava/util/Arrays;fill, offset 7
04-27 09:14:08.930: I/dalvikvm(3475): JIT_INFO: Overwriting association of v6:ecx with xmm0
04-27 09:18:30.610: D/dalvikvm(3475): JIT_INFO: Issues while compiling trace Ljava/util/Arrays;fill, offset 5
04-27 09:18:30.610: D/dalvikvm(3475): The trace provoked a spill.
04-27 09:18:30.610: I/dalvikvm(3475): Trying less registerization from 1 to 0
Please help me I am stuck and not able to find the cause of issue.
This issue is pretty perplexing and my eyes can only take so much of looking at a Kindle device before burning with rage, so I'd like your help, generous Internet folk!
I'm working on an app that is built on Sencha Touch 2.3.1 and Cordova 3.5.1. I have this app working on really any other Android device I've tested on except for the newest Fire HD devices from Amazon, and in my case, a Fire HD 6.
When I build the APK, sign it, zipalign it, etc. and then post it online for download to the device, I'm seeing an issue of a grey screen ONLY WHEN STARTING IN PORTRAIT. Here is the screenshot:
When I start in Landscape mode, I get this screenshot:
The crazier part is that when I start the app in portrait (grey screen), rotate to landscape (no change), and then rotate back to portrait, close the app, and reopen it, the correct portrait screen is shown, here:
In contrast to the signed APK, when I build the app for testing in Eclipse and deploy to the device, the app works as expected. The only difference I can discern between the Eclipse version and the signed APK is the way that the Cordova jar file is included in the project. Here is the log file from the Fire HD 6 when I build from Eclipse:
10-15 13:36:00.715: I/Activity(16158): No ActvityExender defined. Proceed with default activity behavior.
10-15 13:36:00.719: I/CordovaLog(16158): Changing log level to DEBUG(3)
10-15 13:36:00.722: D/Whitelist(16158): Unlimited access to network resources
10-15 13:36:00.723: D/CordovaActivity(16158): CordovaActivity.onCreate()
10-15 13:36:00.726: D/CordovaActivity(16158): Setting integer properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml
10-15 13:36:00.726: D/CordovaActivity(16158): Setting integer properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml
10-15 13:36:00.750: W/BindingManager(16158): Cannot setInForeground() - never saw a connection for the pid: 16158
10-15 13:36:00.771: D/CordovaWebView(16158): CordovaWebView is running on device made by: Amazon
10-15 13:36:00.775: D/JsMessageQueue(16158): Set native->JS mode to 2
10-15 13:36:00.776: D/CordovaActivity(16158): CordovaActivity.init()
10-15 13:36:00.860: D/CordovaWebView(16158): >>> loadUrl(file:///android_asset/www/index.html)
10-15 13:36:00.860: D/PluginManager(16158): init()
10-15 13:36:00.874: D/CordovaWebView(16158): >>> loadUrlNow()
10-15 13:36:00.875: W/BindingManager(16158): Cannot setInForeground() - never saw a connection for the pid: 0
10-15 13:36:00.875: W/BindingManager(16158): Cannot setInForeground() - never saw a connection for the pid: 16158
10-15 13:36:00.877: I/CordovaLog(16158): Changing log level to DEBUG(3)
10-15 13:36:00.881: D/Whitelist(16158): Unlimited access to network resources
10-15 13:36:00.881: D/CordovaActivity(16158): Resuming the App
10-15 13:36:00.881: D/CordovaActivity(16158): CB-3064: The errorUrl is null
10-15 13:36:00.989: D/SoftKeyboardDetect(16158): Ignore this event
10-15 13:36:01.037: D/SoftKeyboardDetect(16158): Ignore this event
10-15 13:36:01.059: D/SoftKeyboardDetect(16158): Ignore this event
10-15 13:36:01.067: D/CordovaWebViewClient(16158): onPageStarted(file:///android_asset/www/index.html)
10-15 13:36:01.067: D/CordovaActivity(16158): onMessage(onPageStarted,file:///android_asset/www/index.html)
10-15 13:36:01.390: D/SoftKeyboardDetect(16158): Ignore this event
10-15 13:36:02.039: D/CordovaActivity(16158): onMessage(spinner,stop)
10-15 13:36:02.043: D/CordovaNetworkManager(16158): Connection Type: wifi
10-15 13:36:02.068: E/chromium(16158): [ERROR:gl_context.cc(53)] Not implemented reached in virtual void gfx::GLContext::SetUnbindFboOnMakeCurrent()
10-15 13:36:02.068: I/chromium(16158): [INFO:async_pixel_transfer_manager_android.cc(60)] Async pixel transfers not supported
10-15 13:36:02.083: D/CordovaNetworkManager(16158): Connection Type: wifi
10-15 13:36:02.083: D/CordovaActivity(16158): onMessage(networkconnection,wifi)
10-15 13:36:02.100: D/CordovaWebViewClient(16158): onPageFinished(file:///android_asset/www/index.html)
10-15 13:36:02.100: D/CordovaActivity(16158): onMessage(onPageFinished,file:///android_asset/www/index.html)
10-15 13:36:02.324: D/CordovaLog(16158): file:///android_asset/www/app.js: Line 1 : a launch right here: file:///android_asset/www/index.html
10-15 13:36:02.324: I/chromium(16158): [INFO:CONSOLE(1)] "a launch right here: file:///android_asset/www/index.html", source: file:///android_asset/www/app.js (1)
10-15 13:36:02.345: D/CordovaLog(16158): file:///android_asset/www/app.js: Line 1 : index: gotFS
10-15 13:36:02.345: I/chromium(16158): [INFO:CONSOLE(1)] "index: gotFS", source: file:///android_asset/www/app.js (1)
10-15 13:36:02.347: D/CordovaLog(16158): file:///android_asset/www/app.js: Line 1 : here is the root: cdvfile://localhost/persistent/
10-15 13:36:02.347: I/chromium(16158): [INFO:CONSOLE(1)] "here is the root: cdvfile://localhost/persistent/", source: file:///android_asset/www/app.js (1)
10-15 13:36:04.256: I/App(16158): WARNING: Back Button Default Behavior will be overridden. The backbutton event will be fired!
10-15 13:36:04.293: W/System.err(16158): org.apache.cordova.file.FileExistsException: create/exclusive fails
10-15 13:36:04.294: W/System.err(16158): at org.apache.cordova.file.LocalFilesystem.getFileForLocalURL(LocalFilesystem.java:176)
10-15 13:36:04.294: W/System.err(16158): at org.apache.cordova.file.FileUtils.getFile(FileUtils.java:698)
10-15 13:36:04.294: W/System.err(16158): at org.apache.cordova.file.FileUtils.access$5(FileUtils.java:691)
10-15 13:36:04.294: W/System.err(16158): at org.apache.cordova.file.FileUtils$16.run(FileUtils.java:349)
10-15 13:36:04.294: W/System.err(16158): at org.apache.cordova.file.FileUtils$23.run(FileUtils.java:477)
10-15 13:36:04.294: W/System.err(16158): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
10-15 13:36:04.294: W/System.err(16158): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
10-15 13:36:04.294: W/System.err(16158): at java.lang.Thread.run(Thread.java:841)
10-15 13:36:04.296: W/System.err(16158): org.apache.cordova.file.FileExistsException: create/exclusive fails
10-15 13:36:04.296: W/System.err(16158): at org.apache.cordova.file.LocalFilesystem.getFileForLocalURL(LocalFilesystem.java:176)
10-15 13:36:04.296: W/System.err(16158): at org.apache.cordova.file.FileUtils.getFile(FileUtils.java:698)
10-15 13:36:04.297: W/System.err(16158): at org.apache.cordova.file.FileUtils.access$5(FileUtils.java:691)
10-15 13:36:04.297: W/System.err(16158): at org.apache.cordova.file.FileUtils$16.run(FileUtils.java:349)
10-15 13:36:04.297: W/System.err(16158): at org.apache.cordova.file.FileUtils$23.run(FileUtils.java:477)
10-15 13:36:04.297: W/System.err(16158): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
10-15 13:36:04.297: W/System.err(16158): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
10-15 13:36:04.297: W/System.err(16158): at java.lang.Thread.run(Thread.java:841)
10-15 13:36:04.719: D/CordovaLog(16158): file:///android_asset/www/app.js: Line 1 : 12
10-15 13:36:04.719: I/chromium(16158): [INFO:CONSOLE(1)] "12", source: file:///android_asset/www/app.js (1)
10-15 13:36:04.720: D/CordovaLog(16158): file:///android_asset/www/app.js: Line 1 : 12
10-15 13:36:04.720: I/chromium(16158): [INFO:CONSOLE(1)] "12", source: file:///android_asset/www/app.js (1)
10-15 13:36:04.743: D/TEST(16158): cdvfile://localhost/persistent/com.------.------/data/downloadQueue.json: 12
10-15 13:36:04.863: D/CordovaLog(16158): file:///android_asset/www/plugins/com.smartmobilesoftware.inappbilling/www/inappbilling.js: Line 6 : InAppBilling[js]: setup ok
10-15 13:36:04.863: I/chromium(16158): [INFO:CONSOLE(6)] "InAppBilling[js]: setup ok", source: file:///android_asset/www/plugins/com.smartmobilesoftware.inappbilling/www/inappbilling.js (6)
10-15 13:36:05.118: D/CordovaActivity(16158): onMessage(splashscreen,hide)
10-15 13:36:05.149: D/FileTransfer(16158): download http://www.------.com/fx/json/publication.php?v=1.0.25&authid=------&groupid=------------ to cdvfile://localhost/persistent//com.------.------/-----------.json
10-15 13:36:05.150: D/FileTransfer(16158): Download file:http://www.------.com/fx/json/publication.php?v=1.0.25&authid=------&groupid=-------------
10-15 13:36:05.237: D/FileTransfer(16158): download http://www.------.com/fx/json/catalog.php?v=1.0.25&authid=------ to cdvfile://localhost/persistent//com.-----.------/data/catalog.json
10-15 13:36:05.242: D/FileTransfer(16158): Download file:http://www.------.com/fx/json/catalog.php?v=1.0.25&authid=------
10-15 13:36:05.784: D/FileTransfer(16158): Saved file: cdvfile://localhost/persistent//com.------.------/data/catalog.json
10-15 13:36:05.819: D/FileTransfer(16158): Saved file: cdvfile://localhost/persistent//com.------.------/------------.json
Unfortunately, even after trying a quick Google search, I don't know a way of grabbing logs from the Fire HD 6 when the signed APK runs. Does anyone have any idea about finding those logs on the device?
Here is the logcat from the sideloaded APK:
D/CordovaActivity(32519): onMessage(exit,null)
I/ActivityManager( 535): START u0 {xxxx} from pid 1208
I/Activity(32519): No ActvityExender defined. Proceed with default activity behavior.
I/CordovaLog(32519): Changing log level to DEBUG(3)
D/Whitelist(32519): Unlimited access to network resources
D/CordovaActivity(32519): CordovaActivity.onCreate()
D/CordovaActivity(32519): Setting integer properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml
D/CordovaActivity(32519): Setting integer properties in CordovaActivity will be deprecated in 3.0 on July 2013, please use config.xml
W/BindingManager(32519): Cannot setInForeground() - never saw a connection for the pid: 32519
D/AmazonTransitionManager( 535): openingActivityName = com.branded.-----.BrandedActivity, animationType = ZOOM
D/CordovaWebView(32519): CordovaWebView is running on device made by: Amazon
D/JsMessageQueue(32519): Set native->JS mode to 2
D/CordovaActivity(32519): CordovaActivity.init()
D/CordovaWebView(32519): loadUrlIntoView(file:///android_asset/www/index.html, 12000)
D/CordovaActivity(32519): onMessage(splashscreen,show)
D/CordovaWebView(32519): >>> loadUrl(file:///android_asset/www/index.html)
D/PluginManager(32519): init()
D/CordovaWebView(32519): >>> loadUrlNow()
W/BindingManager(32519): Cannot setInForeground() - never saw a connection for the pid: 0
W/BindingManager(32519): Cannot setInForeground() - never saw a connection for the pid: 32519
I/CordovaLog(32519): Changing log level to DEBUG(3)
D/Whitelist(32519): Unlimited access to network resources
D/CordovaActivity(32519): Resuming the App
D/CordovaActivity(32519): CB-3064: The errorUrl is null
D/SoftKeyboardDetect(32519): Ignore this event
I/ActivityManager( 535): Displayed com.branded.-----/.BrandedActivity: +142ms
D/SoftKeyboardDetect(32519): Ignore this event
D/CordovaActivity(32519): onMessage(onPageStarted,file:///android_asset/www/index.html)
D/SoftKeyboardDetect(32519): Ignore this event
I/ActivityManager( 535): Process android.process.acore (pid 28595) has died.
I/ActivityManager( 535): Process com.ivona.tts.oem (pid 31488) has died.
D/CordovaWebViewClient(32519): onPageFinished(file:///android_asset/www/index.html)
D/CordovaActivity(32519): onMessage(onPageFinished,file:///android_asset/www/index.html)
D/CordovaActivity(32519): onMessage(spinner,stop)
D/CordovaNetworkManager(32519): Connection Type: wifi
E/chromium(32519): [ERROR:gl_context.cc(53)] Not implemented reached in virtual void gfx::GLContext::SetUnbindFboOnMakeCurrent()
I/chromium(32519): [INFO:async_pixel_transfer_manager_android.cc(60)] Async pixel transfers not supported
D/CordovaNetworkManager(32519): Connection Type: wifi
D/CordovaActivity(32519): onMessage(networkconnection,wifi)
I/ActivityManager( 535): Process com.smartcom.attwifi (pid 27770) has died.
W/ActivityManager( 535): Scheduling restart of crashed service com.smartcom.attwifi/com.smartcom.libwispr.MainWifiService in 1000ms
D/CordovaLog(32519): file:///android_asset/www/app.js: Line 1 : a launch right here: file:///android_asset/www/index.html
I/chromium(32519): [INFO:CONSOLE(1)] "a launch right here: file:///android_asset/www/index.html", source: file:///android_asset/www/app.js (1)
W/PackageManager( 535): Launching com.smartcom.attwifi (32109) with AMZ_APP_GID
I/ActivityManager( 535): Start proc com.smartcom.attwifi for service com.smartcom.attwifi/com.smartcom.libwispr.MainWifiService: pid=32727 uid=32109 gids={72109, 3003, 9001}
I/wpa_supplicant(31391): wlan0: CTRL-EVENT-SCAN-STARTED
D/CordovaActivity(32519): onMessage(spinner,stop)
Finally, does anyone have any idea why I'm seeing this bug? Or any ideas if building the Cordova jar differently would introduce this bug? Or why the Fire HDs are the only devices that have the issue? Or if this is a Sencha Touch/Cordova issue on Fire HDs? Or does anyone have any ideas for troubleshooting - I've run out of 'try this next' scenarios?
Thanks for reading and any help you provide, I do appreciate it!
It turns out that the key to a fix was the rotation piece I mentioned. I added a couple of these lines during the launch function of the Sencha Touch project's app.js:
Ext.Viewport.fireEvent('orientationchange');
Here is the app.js launch function after I added them:
launch: function() {
Ext.Viewport.bodyElement.on('resize', Ext.emptyFn, this, { buffer: 1});
Ext.Viewport.fireEvent('orientationchange');
console.log('a launch right here: '+window.location);
if (window.device.platform) {
try{
window.requestFileSystem(
LocalFileSystem.PERSISTENT,
0,
function(fSys) {
console.log('index: gotFS');
window.fsRoot = fSys.root;
console.log('here is the root: '+window.fsRoot.toURL());
// Create the main viewport
setTimeout(function(){
Ext.Viewport.add( Ext.create('-------.view.Main') );
Ext.Viewport.fireEvent('orientationchange');
}, 100);
},
function(err) {
console.log("FileSystem Failure: " + err.code);
}
);
}catch(e){
//Any other error
alert('Could not open filesystem, errorcode: ' + e);
}
}else {
window.Dlog('no device platform found');
setTimeout(function(){
Ext.Viewport.add( Ext.create('-------.view.Main') );
}, 100);
}
},
I am trying to make a simple renderer with OpenGL2.0, made up only of a main activity, surface view, and renderer file. Whenever I run it on an avd, the screen turns black and says the program has encountered a problem. Here is the logcat
08-04 03:55:59.722: D/libEGL(6287): Emulator without GPU support detected. Fallback to software renderer.
08-04 03:55:59.821: I/Choreographer(6287): Skipped 292 frames! The application may be doing too much work on its main thread.
08-04 03:56:00.042: D/libEGL(6287): loaded /system/lib/egl/libGLES_android.so
08-04 03:56:00.801: D/gralloc_goldfish(6287): Emulator without GPU emulation detected.
08-04 03:56:00.835: W/dalvikvm(6287): threadid=11: thread exiting with uncaught exception (group=0x40a71930)
08-04 03:56:00.881: E/AndroidRuntime(6287): FATAL EXCEPTION: GLThread 102
08-04 03:56:00.881: E/AndroidRuntime(6287): java.lang.IllegalArgumentException: No configs match configSpec
08-04 03:56:00.881: E/AndroidRuntime(6287): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:863)
08-04 03:56:00.881: E/AndroidRuntime(6287): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1024)
08-04 03:56:00.881: E/AndroidRuntime(6287): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1401)
08-04 03:56:00.881: E/AndroidRuntime(6287): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
08-04 03:56:02.155: I/Choreographer(6287): Skipped 121 frames! The application may be doing too much work on its main thread.
08-04 03:56:07.941: I/Process(6287): Sending signal. PID: 6287 SIG: 9
Can the problem be recognized from this or should I provide code as well?
I'm newbie.
Trying to run HelloWorld example comming with cocos2dx (cocos2d-2.0-rc2-x-2.0.1),
Android SDK 20.0.1, Android NDK r8, on 64bit Linux machine (openSuse 12.1).
When running emulation from Eclipse got following exception:
W/dalvikvm( 644): threadid=13: thread exiting with uncaught exception (group=0x40a13300)
E/AndroidRuntime( 644): FATAL EXCEPTION: GLThread 77
E/AndroidRuntime( 644): java.lang.IllegalArgumentException: No configs match configSpec
E/AndroidRuntime( 644): at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:863)
E/AndroidRuntime( 644): at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1024)
E/AndroidRuntime( 644): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1401)
E/AndroidRuntime( 644): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
D/gralloc_goldfish( 644): Emulator without GPU emulation detected.
Any ideas?
for 2.0, you need to run on a device because the Emulator does not support OpenGL 2.0
for those are interested in how to get OpenGL 2.0 runs on Emulator, here is the link http://www.cocos2d-x.org/boards/6/topics/12563