Need help finding what's wrong!
Monkey Targets Forums/Android/Need help finding what's wrong!
| ||
I need your help. I'm trying to compile this 'reduced' source code to run on Android without bomb-out everytime. After different test I've excluded any problem with the LoadString and related 'string' operations. The problem is (I think) in the creation of the object AtlasItem or in adding it in the Map... I really dont' know. Tested - successfully - on HTML, FLASH and GLFW. The program itself doesnt' do anything really amazing: - read a file with coords - read an image - draw a button from the 'atlas' coords. Any help is very appreciated! Here the 'data' http://www.graphio.net/download/test_atlas.zip |
| ||
Always trim :) |
| ||
mmm... thanks, but does the program run for you? It still bombs out... Trim() or not. |
| ||
It bombed before I did the trim, now it works okay... :/ |
| ||
Tried directly on the phone, same behavior. I'll try to change name/var and make a fresh-install on monkey. edit: using ADB LOGCAT >tmp.txt I get this output file (refers to the emulator!) |
| ||
@degac Just to let you know, therevills modifications work here too (Gingerbread ROM). Have not tried to execute on the emulator (runs too slow here). Wish I knew what was wrong. All the debug info is Greek to me :^P |
| ||
Let's try this: So that we may rule out your phone as the culprit, download *my* build and see if you can execute it on your phone with no problems. http://bit.ly/mi6RcE |
| ||
@Loofadawg: Thanks, your build works fine. Fantastic, so I have something that doesnt' work on my emulator, my phone but works on other hardware: nice, very nice.... And about the error log, the 'interesting part' (I believe) starts here, when it refers to GLThread Now I will try to re-install monkey and see what's happen... Thank you for the help |
| ||
Just installed v38 (trans 1.09): same problem, the samples work fine. |
| ||
This is the 'funny' thing: I decided to try to change my source to run in a slightly different way, so there are no more AtlasItem. ... and this time works. |
| ||
E/AndroidRuntime( 365): FATAL EXCEPTION: GLThread 10 E/AndroidRuntime( 365): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() That doesnt sound good! I guess you have tried deleting your build folder and trying again? Make an example which just loads in the newgui.data.txt and output the loaded data onto the screen. |
| ||
I deleted the folder, I changed the name of the app+app.data, I tested in r37 and r38, I made a version that read only and print out data (and this works). It seems that there is a problem when I manage to use 2 different classes: Atlas and AtlasItem. In my latest version I have only ONE class (Atlas) and it works. I really dont' understand why there should be a problem with OpenGL/Thread and object creation... Hope Mark reads this thread and have a look at this! At tbe moment I changed my code, but this is no good at all as the source should run on every platform without problems... |
| ||
But now your latest version doesnt read from a file, do a test which just loads from newgui.data.txt and output the data onto the screen. |
| ||
Here my latest code with LoadData implemented It works now (on emulator, and on the phone). It misses the reading for group of atlas, but I'm working on it. It uses the same data (.txt and .png) of the previous post. Cheers edit: Ok, it seems there is a problem with Map & co. The only difference between the 2 source code is in the 'AddGroup' method. It bombs out, I didnt' call any graphics command.... |
| ||
Ok, I managed to 'run' my source code on Android - as I want. I changed - again - my code to add 'manually' some items For some reasons I need to do indeed of a loop... Still I dont' understand. |
| ||
Can you post the generated Java which crashes? Which version of the Java JDK are you using? Which version of the Android SDK are you using? |
| ||
Edit: code to big for CODEBOX The source is my last-post (#14, source-code 2) that doesnt' work Java source code here JAVA SDK jdk1.6.0_24 ANT 1.8.2 Android: SDK Tools rev 10 SDK Platform Tools rev 3 SDK Platform Android 2.2 api 8 rev 1 SDK Platform Android 2.1-update 1 api 7 rev 2 |
| ||
Ive just run your Java via Eclipse and it works fine on my phone (which is the same phone as your apart from Im running on Android 2.2.1) :/ Java jdk1.6.0_19 Ant 1.8.2 Android: 2.1-update1 |
| ||
I've tested (changed in the parameter .txt file) with Android-8 as target OS: nothing, same error. I dont' know what could be the problem: it causes both the emulator and the device to bomb out the application (see the GLThread error..) And as I'm not using something exotic (my program uses the 'standard' monkey+mojo modules) I still dont' understand the problem. Consider that the other example and program I've done run without problem. |
| ||
Hey degac, check out DGuy's bug report: http://www.monkeycoder.co.nz/Community/posts.php?topic=768 Have you changed the template AndroidManifest.xml to use a minSDK? |
| ||
Hi, interesting... I will check this solution. Thank you! |
| ||
So did you change the AndroidManifest.xml? |
| ||
Ok, after some test I discovered: 1. in default-properties there's a 'target=android-7', so any VALUE for minSDK is ignored... 2. my source code (see first post) still causes the error (with or without the 'minSdk string'=7) 3. I've tested some Monkey samples: TweenDemo doesnt' run... PS: I've changed my Android-SDK configuration, now it is the following: [setup] Android SDK Tools Revision 10 [setup] Project Target: Android 2.1-update1 [setup] API level: 7 |