Null Pointer Exception

74 views
Skip to first unread message

Wang Jun

unread,
Oct 16, 2016, 11:09:48 AM10/16/16
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Desktop OS: OS X Captain
Device: Andorid

Hi Shai,

Everything was normal before, I just changed a little in the theme recently, added a image, then after builded in Codename One, the app can not run in the Android device and show "Null Pointer Exception".

Can you help me check it?

Thank you!

Wang Jun

Shai Almog

unread,
Oct 16, 2016, 9:21:56 PM10/16/16
to CodenameOne Discussions
Hi,
I can guess that the image is null but it would be helpful if you can get the stack of the exception from the Log or DDMS with a cable.

Wang Jun

unread,
Oct 18, 2016, 12:33:21 PM10/18/16
to CodenameOne Discussions
Hi Shai,

Please help to check the logs, many thanks!

10-19 00:29:03.397 14777-14787/? I/AD-PLUGIN-SystemAdController: requestSplashScreen
10-19 00:29:03.397 14777-14787/? I/AD-PLUGIN-SystemAdController: offline package com.fortnum.rica
10-19 00:29:03.397 14777-14787/? I/AD-PLUGIN-SystemAdController: requestSplash, package:com.fortnum.rica, intent:Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.fortnum.rica/.RICAStub bnds=[550,275][686,411] (has extras) }, showing:false
10-19 00:29:03.397 14777-14787/? I/AD-PLUGIN-SplashConfigCache: packageName:com.fortnum.rica, showInterval:600000
10-19 00:29:03.407 14777-14787/? I/AD-PLUGIN-SystemAdController: isAppSplash intent:Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.fortnum.rica/.RICAStub bnds=[550,275][686,411] (has extras) } aInfo:ActivityInfo{429c2e80 com.fortnum.rica.RICAStub} showType
10-19 00:29:03.407 14777-14787/? I/AD-PLUGIN-SystemAdController: slogan is not ready, package:com.fortnum.rica, url:null
10-19 00:29:03.407 14777-14787/? I/AD-PLUGIN-SystemAdController: requestSplashScreen duration:10, package:com.fortnum.rica
10-19 00:29:03.407 1040-1050/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.fortnum.rica/.RICAStub bnds=[550,275][686,411] (has extras)} from pid 1171
10-19 00:29:03.417 1439-1509/? D/WtProcessController: onAMCreateTask callback
10-19 00:29:03.417 1439-1509/? D/WtProcessController: onAMCreateActivity callback
10-19 00:29:03.437 1439-1509/? D/WtProcessController: onAMPauseActivity callback
10-19 00:29:03.447 1171-2223/? D/ScreenElementRoot: pause
10-19 00:29:03.447 1171-2223/? I/NotifierManager: onUnregister: miui.maml.NotifierManager$MultiBroadcastNotifier@43664090
10-19 00:29:03.447 1171-2223/? I/RenderThread: RenderThread paused, waiting for signal
10-19 00:29:03.467 1439-1509/? D/WtProcessController: onAMProcStart callback
10-19 00:29:03.467 1040-1471/? I/ActivityManager: Start proc com.fortnum.rica for activity com.fortnum.rica/.RICAStub: pid=15236 uid=10143 gids={50143, 3003, 1028, 1015, 3002, 3001}
10-19 00:29:03.507 1439-1509/? D/WtProcessController: onAMRestartActivity callback
10-19 00:29:03.507 1439-1509/? D/WtProcessController: set foreground process size 1 pid:15236pacakgeName:com.fortnum.rica
10-19 00:29:03.507 1439-1509/? W/WtProcessStrategy: {WhetstonePackageInfo#PacakgeName:com.fortnum.rica uiMemoryThresold:0 nonUiMemoryThresold:0 Flag:1073747008,0x40001440 [,TRIMHEAPS,SOFT_RESET,FLAG_DEAL_SCHEDULE] Type:0[] }not support ZRAM
10-19 00:29:03.507 1040-1582/? I/Timeline: Timeline: App_transition_ready time:42152008
10-19 00:29:03.547 15236-15236/? D/dalvikvm: GetMethodID: not returning static method Landroid/os/Process;.getTotalMemory ()J
10-19 00:29:03.547 15236-15236/? D/dalvikvm: GetMethodID: not returning static method Landroid/os/Process;.getFreeMemory ()J
10-19 00:29:03.587 15236-15236/? I/dalvikvm: Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.e.a
10-19 00:29:03.587 15236-15236/? W/dalvikvm: VFY: unable to resolve virtual method 444: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
10-19 00:29:03.587 15236-15236/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x000b
10-19 00:29:03.607 15236-15236/? W/ResourceType: No package identifier when getting value for resource number 0x00000000
10-19 00:29:03.607 15236-15236/? W/ResourceType: No package identifier when getting value for resource number 0x00000000
10-19 00:29:03.647 15236-15253/? W/System.err: java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.a(Resources.java:1100)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.e(Resources.java:1073)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.b(Resources.java:1055)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.c(Resources.java:965)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.d(Resources.java:304)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.b(Resources.java:267)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.<init>(Resources.java:187)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.b(Resources.java:738)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.a(Resources.java:700)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.c(Resources.java:664)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.fortnum.rica.h.a(RICA.java:129)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.fortnum.rica.RICAStub.run(RICAStub.java:101)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.m.l(Display.java:1151)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.m.i(Display.java:968)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.ac.run(RunnableWrapper.java:120)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.impl.b$1.run(CodenameOneThread.java:60)
10-19 00:29:03.647 15236-15253/? W/System.err:     at java.lang.Thread.run(Thread.java:841)
10-19 00:29:03.647 15236-15253/? W/System.err: java.io.IOException: length=0; index=0
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.b(Resources.java:753)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.a(Resources.java:700)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.i.c.c(Resources.java:664)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.fortnum.rica.h.a(RICA.java:129)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.fortnum.rica.RICAStub.run(RICAStub.java:101)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.m.l(Display.java:1151)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.m.i(Display.java:968)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.m.ac.run(RunnableWrapper.java:120)
10-19 00:29:03.647 15236-15253/? W/System.err:     at com.codename1.impl.b$1.run(CodenameOneThread.java:60)
10-19 00:29:03.647 15236-15253/? W/System.err:     at java.lang.Thread.run(Thread.java:841)
10-19 00:29:03.657 15236-15236/? I/Adreno-EGL: <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LNX.LA.3.5.2.2.2_RB1.04.04.04.154.004_msm8226_LNX.LA.3.5.2.2.2_RB1__release_AU ()
                                               OpenGL ES Shader Compiler Version: E031.24.00.15
                                               Build Date: 08/06/14 Wed
                                               Local Branch: mybranch4057433
                                               Remote Branch: quic/LNX.LA.3.5.2.2.2_rb1
                                               Local Patches: NONE
                                               Reconstruct Branch: AU_LINUX_ANDROID_LNX.LA.3.5.2.2.2_RB1.04.04.04.154.004 +  NOTHING
10-19 00:29:03.677 15236-15253/? W/ResourceType: No package identifier when getting value for resource number 0x00000000
10-19 00:29:03.687 15236-15253/? W/System.err: java.lang.NullPointerException
10-19 00:29:03.687 15236-15253/? W/System.err:     at com.fortnum.rica.h.a(RICA.java:428)
10-19 00:29:03.687 15236-15253/? W/System.err:     at com.fortnum.rica.h.a(RICA.java:81)
10-19 00:29:03.687 15236-15253/? W/System.err:     at com.fortnum.rica.h$31.run(RICA.java:240)
10-19 00:29:03.687 15236-15253/? W/System.err:     at com.codename1.m.m.l(Display.java:1151)
10-19 00:29:03.687 15236-15253/? W/System.err:     at com.codename1.m.m.i(Display.java:968)
10-19 00:29:03.687 15236-15253/? W/System.err:     at com.codename1.m.ac.run(RunnableWrapper.java:120)
10-19 00:29:03.687 15236-15253/? W/System.err:     at com.codename1.impl.b$1.run(CodenameOneThread.java:60)
10-19 00:29:03.687 15236-15253/? W/System.err:     at java.lang.Thread.run(Thread.java:841)
10-19 00:29:03.697 15236-15253/? W/ResourceType: No package identifier when getting value for resource number 0x00000000
10-19 00:29:03.697 15236-15253/? I/System.out: showKeyboard false
10-19 00:29:03.697 15236-15236/? D/OpenGLRenderer: Enabling debug mode 0
10-19 00:29:03.717 15236-15253/? D/Codename One: sizechanged: 720 1230 com.codename1.impl.android.l@423d3738
10-19 00:29:03.757 1040-1067/? I/ActivityManager: Displayed com.fortnum.rica/.RICAStub: +307ms
10-19 00:29:03.757 15236-15236/? I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@423833a8 time:42152259
10-19 00:29:03.767 14777-14788/? I/AD-PLUGIN-SystemAdController: activityIdle:ActivityInfo{42966b60 com.fortnum.rica.RICAStub} mPendingSwitchingActivityInfo:null
10-19 00:29:03.897 1040-1067/? I/Timeline: Timeline: Activity_windows_visible id: ActivityRecord{42ed0320 u0 com.fortnum.rica/.RICAStub t144} time:42152391

Shai Almog

unread,
Oct 18, 2016, 10:16:41 PM10/18/16
to CodenameOne Discussions
Hi,
it looks like you have a resource file where you have a multi-image in which you deleted all the resolutions but the image remained.
I didn't think the UI allows that.

Wang Jun

unread,
Oct 18, 2016, 10:20:18 PM10/18/16
to codenameone...@googlegroups.com
Hi Shai,

Thank you so much!

I think there is something wrong in theme.res. 

Best Regards
Wang Jun
 

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/iF-jbar4plg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/9e033f9e-8844-4e5c-bc52-edcfa681fbd7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Regards

Wang Jun
E-mail : foxne...@gmail.com

Shai Almog

unread,
Oct 19, 2016, 10:01:55 PM10/19/16
to CodenameOne Discussions
Hi,
were you able to find the problematic image?

Wang Jun

unread,
Oct 19, 2016, 10:58:51 PM10/19/16
to codenameone...@googlegroups.com
Hi Shari,
Yes, I remove all the images and add one by one, then it ok now . Thank you !


On Thursday, 20 October 2016, Shai Almog <shai....@gmail.com> wrote:
Hi,
were you able to find the problematic image?

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/iF-jbar4plg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.

For more options, visit https://groups.google.com/d/optout.

Wang Jun

unread,
Oct 19, 2016, 10:59:42 PM10/19/16
to codenameone...@googlegroups.com
Hi Shai,
Yes, I remove all the images and add one by one, then it ok now . Thank you !

On Thursday, 20 October 2016, Wang Jun <foxne...@gmail.com> wrote:
Hi Shari,
Yes, I remove all the images and add one by one, then it ok now . Thank you !

On Thursday, 20 October 2016, Shai Almog <shai....@gmail.com> wrote:
Hi,
were you able to find the problematic image?

--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/iF-jbar4plg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discussions+unsubscr...@googlegroups.com.


--
Regards

Wang Jun
E-mail : foxne...@gmail.com

Reply all
Reply to author
Forward
0 new messages