Titanium JIRA Archive
Appcelerator Community (AC)

[AC-197] NullPointerException when calling second method in a custom module

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionCannot Reproduce
Resolution Date2015-07-06T02:05:00.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsStudio
Labelsandroid
Reporterweixing sun
AssigneeRadamantis Torres-Lechuga
Created2015-07-04T01:50:50.000+0000
Updated2015-07-06T02:05:00.000+0000

Description

Hi Experts, I am quite new to Titanium and Appcelerator, is studying a map rendering module: sc.mapsforge: https://github.com/snowciety/sc.mapsforge It is going smoothly when I was creating createMapsforgeView(), mapView object is not null: {color:#14892c}Ti.API.info('mapView= ' + JSON.stringify(mapView)); [INFO] : mapView={"bubbleParent":true,"enabled":true,"visible":true,"backgroundRepeat":false,"zoomLevel":0,"children":[],"rect":{"height":0,"y":0,"x":0,"width":0},"apiName":"Ti.Proxy","size":{"height":0,"y":0,"width":0,"x":0},"keepScreenOn":false,"centerLatlng":null,"scalebar":true,"minZoom":12,"maxZoom":18,"debug":true}{color} But I cannot make a second call to methods like mapview.setCenterLatlng(), setZoomLevel() I am still not familiar with this kind of error, what is the root cause? from module or from SDK internal ? Here is my log from appcelerator studio console: ---------------------------------- Start application log ----------------------------------------------------- [INFO] : TiApplication: (main) [0,0] checkpoint, app created. [INFO] : TiApplication: (main) [207,207] Titanium 4.0.0 (2015/05/18 15:42 9239ff9) [INFO] : TiApplication: (main) [58,265] Titanium Javascript runtime: v8 [INFO] : Project built successfully in 1m 10s 636ms [INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null [WARN] : V8Object: (KrollRuntimeThread) [165,165] Runtime disposed, cannot set property 'userAgent' [INFO] : I/dalvikvm-heap: Grow heap (frag case) to 11.129MB for 1536016-byte allocation [INFO] : I/dalvikvm-heap: Grow heap (frag case) to 13.734MB for 2731536-byte allocation [INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = app.map.TestActivity@42878838 {color:#f6c342}[WARN] : W/System.err: java.lang.NullPointerException [WARN] : W/System.err: at sc.mapsforge.MapsforgeViewProxy.createCircle(MapsforgeViewProxy.java:454) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:177) [WARN] : W/System.err: at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:299) [WARN] : W/System.err: at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:203) [WARN] : W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95) [WARN] : W/System.err: at android.os.Looper.loop(Looper.java:137) [WARN] : W/System.err: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112){color} [INFO] : I/Adreno200-EGL: : EGL 1.4 QUALCOMM Build: Iabe52cfaeae4c5fab1acacfe6f056ba15fa93274 {color:#d04437}[ERROR] : TiExceptionHandler: (main) [172,181] ----- Titanium Javascript Runtime Error ----- [ERROR] : TiExceptionHandler: (main) [0,181] - In app.js:90,9 [ERROR] : TiExceptionHandler: (main) [0,181] - Message: Uncaught Error: Java Exception occurred [ERROR] : TiExceptionHandler: (main) [0,181] - Source: mapView.createCircle({ [ERROR] : V8Exception: Exception occurred at app.js:90: Uncaught Error: Java Exception occurred [INFO] : dalvikvm: Could not find method android.view.ViewGroup.onNestedScrollAccepted, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onNestedScrollAccepted{color} [WARN] : dalvikvm: VFY: unable to resolve virtual method 11932: Landroid/view/ViewGroup;.onNestedScrollAccepted (Landroid/view/View;Landroid/view/View;I)V [INFO] : dalvikvm: Could not find method android.view.ViewGroup.onStopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onStopNestedScroll [WARN] : dalvikvm: VFY: unable to resolve virtual method 11938: Landroid/view/ViewGroup;.onStopNestedScroll (Landroid/view/View;)V [INFO] : dalvikvm: Could not find method android.support.v7.internal.widget.ActionBarOverlayLayout.stopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.setHideOnContentScrollEnabled [WARN] : dalvikvm: VFY: unable to resolve virtual method 9503: Landroid/support/v7/internal/widget/ActionBarOverlayLayout;.stopNestedScroll ()V [WARN] : dalvikvm: VFY: unable to resolve virtual method 525: Landroid/content/res/TypedArray;.getChangingConfigurations ()I [WARN] : dalvikvm: VFY: unable to resolve virtual method 547: Landroid/content/res/TypedArray;.getType (I)I [INFO] : dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations [INFO] : dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType [INFO] : I/dalvikvm-heap: Grow heap (frag case) to 27.827MB for 16001296-byte allocation [INFO] : I/dalvikvm-heap: Grow heap (frag case) to 43.055MB for 16001296-byte allocation

Attachments

FileDateSize
mapsforge.log2015-07-04T01:33:04.000+000021610
sc.mapsforge-android-0.3.zip2015-07-04T01:34:47.000+0000341261

Comments

  1. weixing sun 2015-07-04

    Sorry friends, I have fixed this issue by changing my classpath in android building script would you please close it?

JSON Source