Love-native-android - Development

A project to port LÖVE to Android handhelds
Moe
Party member
Posts: 115
Joined: Thu Dec 22, 2011 10:20 pm

Love-native-android - Development

Post by Moe »

Hi,
let's start a new thread with development updates (for those who do not read the git log - I would not if I were not one of the maintainers :awesome: ). Please put any discussion into a different thread but do not hesitate to ask about unclear posts . And sorry for double, triple etc. posts, but I think a "new post" symbol is nicer to read than looking for "last edited" within posts.
So let's start:
fixed this annoying mutex error; added missing texture parameters for framebuffers
fixed a memory leak
Can somebody please verify that start up problems at the first start are solved (back and start a (new) game crashes always, no need to report, I am working on this point)?
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Love-native-android - Development

Post by T-Bone »

Moe wrote:Hi,
let's start a new thread with development updates (for those who do not read the git log - I would not if I were not one of the maintainers :awesome: ). Please put any discussion into a different thread but do not hesitate to ask about unclear posts . And sorry for double, triple etc. posts, but I think a "new post" symbol is nicer to read than looking for "last edited" within posts.
So let's start:
fixed this annoying mutex error; added missing texture parameters for framebuffers
fixed a memory leak
Can somebody please verify that start up problems at the first start are solved (back and start a (new) game crashes always, no need to report, I am working on this point)?
I downloaded the latest source from the github just now, built it, and it crashes every time I start up a .love file, even the first time. Not just böack screen, entire app dies.
User avatar
kalle2990
Party member
Posts: 245
Joined: Sat Sep 12, 2009 1:17 pm
Location: Sweden

Re: Love-native-android - Development

Post by kalle2990 »

T-Bone wrote: I downloaded the latest source from the github just now, built it, and it crashes every time I start up a .love file, even the first time. Not just böack screen, entire app dies.
Do you happen to have some logcat output available?
Moe
Party member
Posts: 115
Joined: Thu Dec 22, 2011 10:20 pm

Re: Love-native-android - Development

Post by Moe »

Yes, best thing would be a logcat output from console, the one from Eclipse does not always print the stack trace... (call "adb logcat" in a console)
I did some more testing: The deinit method does not work properly and this leads to all the crashes on the second start (object memories are already freed and so on). The first start (or if I kill love apps by ddms before) works always fine on a Tegra2 device on Android 3.2 and a OMAP 3410 device with Android 2.1.
Maybe it would also help to know hardware/software configuration of your device (processor or device name is fine + Android version).
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Love-native-android - Development

Post by T-Bone »

Moe wrote:Yes, best thing would be a logcat output from console, the one from Eclipse does not always print the stack trace... (call "adb logcat" in a console)
I did some more testing: The deinit method does not work properly and this leads to all the crashes on the second start (object memories are already freed and so on). The first start (or if I kill love apps by ddms before) works always fine on a Tegra2 device on Android 3.2 and a OMAP 3410 device with Android 2.1.
Maybe it would also help to know hardware/software configuration of your device (processor or device name is fine + Android version).
I have a HTC Desire with Android 2.3 (CM7.1), processor is Snapdragon S1 (QSD8250).

I have no idea how to get logcat from my device.
Moe
Party member
Posts: 115
Joined: Thu Dec 22, 2011 10:20 pm

Re: Love-native-android - Development

Post by Moe »

Open a console and type:
Linux:

Code: Select all

cd [ANDROID_SDK_PATH]/platform-tools
./adb logcat
Windows:

Code: Select all

cd [ANDROID_SDK_PATH]/platform-tools
adb logcat
replace ANDROID_SDK_PATH by the path of your SDK installation.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Love-native-android - Development

Post by T-Bone »

Moe wrote:Open a console and type:
Linux:

Code: Select all

cd [ANDROID_SDK_PATH]/platform-tools
./adb logcat
Windows:

Code: Select all

cd [ANDROID_SDK_PATH]/platform-tools
adb logcat
replace ANDROID_SDK_PATH by the path of your SDK installation.
But surely I must connect my phone to my computer somehow? USB? And what settings do I need on my phone?
Moe
Party member
Posts: 115
Joined: Thu Dec 22, 2011 10:20 pm

Re: Love-native-android - Development

Post by Moe »

The same settings as for deploying from Eclipse should be fine.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Love-native-android - Development

Post by T-Bone »

Moe wrote:The same settings as for deploying from Eclipse should be fine.
I have never done that. So far, what I've done is merely exporting apk files and sending them to my phone. I will try to get logcat running and see if it works.

Totally works. Here's my logcat

Code: Select all

I/ActivityManager(  166): Start proc net.schattenkind.nativelove for activity net.schattenkind.nativelove/.LoveLauncher: pid=8538 uid=10071 gids={3003, 1015}
D/szipinf ( 8538): Initializing inflate state
D/dalvikvm( 8538): GC_EXTERNAL_ALLOC freed 42K, 51% free 2688K/5379K, external 0K/0K, paused 46ms
D/dalvikvm( 8538): GC_EXTERNAL_ALLOC freed 10K, 50% free 2712K/5379K, external 498K/513K, paused 38ms
I/ActivityManager(  166): Displayed net.schattenkind.nativelove/.LoveLauncher: +367ms
D/dalvikvm( 8511): GC_EXPLICIT freed 380K, 46% free 3484K/6343K, external 6967K/7816K, paused 67ms
I/ActivityManager(  166): Starting: Intent { dat=file:///mnt/sdcard/Android/data/com.dropbox.android/files/scratch/lua/loopbox/loopbox.love cmp=net.schattenkind.nativelove/.LoveNative } from pid 8538
D/libEGL  ( 8538): loaded /system/lib/egl/libGLES_android.so
D/libEGL  ( 8538): loaded /system/lib/egl/libEGL_adreno200.so
D/libEGL  ( 8538): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
D/libEGL  ( 8538): loaded /system/lib/egl/libGLESv2_adreno200.so
I/System.out( 8538): java: init
W/dalvikvm( 8538): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lnet/schattenkind/nativelove/LoveJNI;
W/dalvikvm( 8538): threadid=9: thread exiting with uncaught exception (group=0x4018d560)
E/AndroidRuntime( 8538): FATAL EXCEPTION: GLThread 10
E/AndroidRuntime( 8538): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 8538): 	at net.schattenkind.nativelove.LoveRenderView$1.onSurfaceChanged(LoveRenderView.java:31)
E/AndroidRuntime( 8538): 	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1356)
E/AndroidRuntime( 8538): 	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
E/AndroidRuntime( 8538): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load ogg: findLibrary returned null
E/AndroidRuntime( 8538): 	at java.lang.Runtime.loadLibrary(Runtime.java:429)
E/AndroidRuntime( 8538): 	at java.lang.System.loadLibrary(System.java:554)
E/AndroidRuntime( 8538): 	at net.schattenkind.nativelove.LoveJNI.<clinit>(LoveJNI.java:7)
E/AndroidRuntime( 8538): 	... 3 more
W/ActivityManager(  166):   Force finishing activity net.schattenkind.nativelove/.LoveNative
W/ActivityManager(  166):   Force finishing activity net.schattenkind.nativelove/.LoveLauncher
I/ActivityManager(  166): No longer want com.koushikdutta.rommanager (pid 8031): hidden #16
I/dalvikvm( 8538): Rejecting re-init on previously-failed class Lnet/schattenkind/nativelove/LoveJNI; v=0x0
D/AndroidRuntime( 8538): Shutting down VM
W/dalvikvm( 8538): threadid=1: thread exiting with uncaught exception (group=0x4018d560)
I/Process ( 8538): Sending signal. PID: 8538 SIG: 9
I/ActivityManager(  166): Process net.schattenkind.nativelove (pid 8538) has died.
I/WindowManager(  166): WIN DEATH: Window{409e82e8 net.schattenkind.nativelove/net.schattenkind.nativelove.LoveNative paused=false}
I/WindowManager(  166): WIN DEATH: Window{409f9030 SurfaceView paused=false}
W/InputManagerService(  166): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40ac1788
I/power   (  166): *** set_screen_state 0
I/gllauncher( 8511): onReceive() android.intent.action.SCREEN_OFF
D/gllauncher( 8511): screenOff - null
W/ActivityManager(  166): finishReceiver called but active receiver is different
W/ActivityManager(  166): finishReceiver called but no pending broadcasts
D/SurfaceFlinger(  166): About to give-up screen, flinger = 0x95008
D/WifiService(  166): acquireWifiLockLocked: WifiLock{NetworkLocationLocator type=2 binder=android.os.BinderProxy@40b3c928}
D/WifiService(  166): releaseWifiLockLocked: WifiLock{NetworkLocationLocator type=2 binder=android.os.BinderProxy@40b3c928}
D/dalvikvm( 1482): GC_FOR_MALLOC freed 334K, 44% free 3987K/7047K, external 0K/0K, paused 27ms
D/szipinf (  166): Initializing inflate state
D/dalvikvm(  166): GC_EXTERNAL_ALLOC freed 277K, 49% free 7323K/14151K, external 5808K/5985K, paused 84ms
D/dalvikvm(  166): GC_EXTERNAL_ALLOC freed 92K, 49% free 7334K/14151K, external 7494K/7712K, paused 96ms

User avatar
miko
Party member
Posts: 410
Joined: Fri Nov 26, 2010 2:25 pm
Location: PL

Re: Love-native-android - Development

Post by miko »

Moe wrote:Can somebody please verify that start up problems at the first start are solved (back and start a (new) game crashes always, no need to report, I am working on this point)?
I have finally set up my devel image (lubuntu 12.04 in VirtualBox, so might be using newer versions of software) and succesfully compiled and tested the project.
Works for me both on emulator and on HTC Desire. I have orderer a HP TouchPad tablet (yes, the only reason being love-native-android), will install Android 4 on it, so there will be another device to test.

My issues so far:
- I have to click twice to execute a *.love file from SD card (but I understand it is a known issue)
- the fonts are unreadable - I get only white blocks
- the volume button does not work - in iyfct.love I could not lower the music volume - had to exit the application (the music was still playing!), then the volume botton worked. However, to stop the music, I had to kill love
- in order to compile the project succesfully, I had to comment out 3 lines with @Override decorators in LoveRenderView.java (as advised by Eclipse)
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
Locked

Who is online

Users browsing this forum: No registered users and 3 guests