Kuix J2ME to Android

127 views
Skip to first unread message

kamarezzo

unread,
Jan 31, 2012, 8:35:47 AM1/31/12
to microemulator-support
Hi,
I’m trying to port the demo App (Kaprice) of the the Framework Kuix,
wich is a JavaME UI framwork that enables high end application
development ( http://www.kalmeo.org/projects/kaprice). After running
the apk in the emulator, i get the NullPointerException, saying the
the Graphics object of the GameCanvas is null and after loading there
is nothing to see on the Screen (Black screen) . The demo works fine
on the most devices an emulators as J2ME app.
Is there a problem with the GameCanvas on microemulator ? when is the
Graphics object initialized an ready?
Is that a threading problem with Kuix-Task-Worker?

Please help us solving this problem because we are building very
important projects with this framework and we will save a lot of time
if that works gut on Android!

The logcat looks like this:

.
.
.
D/AndroidCanvasUI( 496): set content view:
org.microemu.android.device.ui.AndroidCanvasUI$CanvasView@41050618

V/PhoneStatusBar( 132): setLightsOn(true)

D/dalvikvm( 496): GC_FOR_ALLOC freed 164K, 5% free 6567K/6855K,
paused 76ms

D/gralloc_goldfish( 496): Emulator without GPU emulation detected.

I/ActivityManager( 80): Displayed
org.microemu.android.org.kalmeo.apps.kaprice.Kaprice/
org.microemu.android.MicroEmulator: +1s830ms

D/dalvikvm( 496): GC_CONCURRENT freed 127K, 5% free 6879K/7175K,
paused 6ms+6ms

D/dalvikvm( 496): GC_EXPLICIT freed 161K, 4% free 6896K/7175K, paused
6ms+7ms

W/InputManagerService( 80): Starting input on non-focused client
com.android.internal.view.IInputMethodClient$Stub$Proxy@411f2468
(uid=10009 pid=173)

D/dalvikvm( 496): GC_EXPLICIT freed 289K, 6% free 6941K/7367K, paused
6ms+7ms

V/MicroEmulator( 496): java.lang.NullPointerException

V/MicroEmulator( 496):

V/MicroEmulator( 496): n at
org.kalmeo.kuix.core.KuixCanvas.forceRepaint(KuixCanvas.java:668)

V/MicroEmulator( 496):

V/MicroEmulator( 496): ) at org.kalmeo.kuix.core.KuixCanvas.access
$1200(KuixCanvas.java:52)

V/MicroEmulator( 496):

V/MicroEmulator( 496): ) at org.kalmeo.kuix.core.KuixCanvas
$2.run(KuixCanvas.java:332)

V/MicroEmulator( 496):

V/MicroEmulator( 496): ) at
org.kalmeo.util.worker.Worker.run(Worker.java:164)

V/MicroEmulator( 496):

V/MicroEmulator( 496): ) at java.lang.Thread.run(Thread.java:856)

V/MicroEmulator( 496):

D/dalvikvm( 496): GC_EXPLICIT freed 17K, 6% free 6950K/7367K, paused
9ms+8ms

W/NetworkManagementSocketTagger( 80): setKernelCountSet(10009, 0)
failed with errno -2

D/dalvikvm( 496): GC_EXPLICIT freed 4K, 6% free 6954K/7367K, paused
8ms+6ms


Thanks a lot for every kind of help!!!!

Bayo Puddicombe

unread,
Apr 17, 2013, 7:35:55 AM4/17/13
to microemula...@googlegroups.com, kama...@googlemail.com
I'm also having this problem with the MicroEmulator, it appears that the android library is trying to use a J2me graphics object directly;

Here's the Android LogCat output;
 
04-17 12:17:30.335: E/AndroidRuntime(18707): FATAL EXCEPTION: Thread-517
04-17 12:17:30.335: E/AndroidRuntime(18707): java.lang.NullPointerException
04-17 12:17:30.335: E/AndroidRuntime(18707): at org.microemu.android.device.AndroidDisplayGraphics.getClipWidth(AndroidDisplayGraphics.java:246)
04-17 12:17:30.335: E/AndroidRuntime(18707): at com.pledge51.danfo.ChopUpCanvas.<init>(ChopUpCanvas.java:107)
04-17 12:17:30.335: E/AndroidRuntime(18707): at com.pledge51.danfo.DanfoMIDlet.startApp(DanfoMIDlet.java:24)
04-17 12:17:30.335: E/AndroidRuntime(18707): at javax.microedition.midlet.MIDlet$MIDletAccessor.startApp(MIDlet.java:50)
04-17 12:17:30.335: E/AndroidRuntime(18707): at org.microemu.android.MicroEmulator$3.run(MicroEmulator.java:211)
04-17 12:17:30.335: E/AndroidRuntime(18707): at java.lang.Thread.run(Thread.java:856)

Going back to my source file, the offending line (i.e. ChopUpCanvas.java:107) is reproduced below;

displayWidth = g.getClipWidth();

Anybody have any ideas on how to fix this?
Reply all
Reply to author
Forward
0 new messages