Problem with spinner and Android 4.03

priitp

Member
Licensed User
Longtime User
Have a program like ScrollView Example.
There are several controls, what cause to delete all views from scrollview and then repopulate it.

When testing it under Android 4.03 with emulator the error accours.
It works OK from other (controls) events what cause the same action but fails only on spinner_ItemClick(Position As Int, Value As Object).
Actually it works OK under debuger and does refill the scrollview. It fails only after everything is done after the Sub End.
There is no more code to fullfill after that spinner_ItemClick -> Sub End.

No problems under Android 2.2. Works as should.
Below is what I get from log.

No ideas left:-(
Priit


java.lang.NullPointerException
at android.widget.Spinner$DialogPopup.dismiss(Spinner.java:665)
at android.widget.Spinner$DialogPopup.onClick(Spinner.java:696)
at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:924)
at android.widget.AdapterView.performItemClick(AdapterView.java:292)
at android.widget.AbsListView.performItemClick(AbsListView.java:1058)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:2514)
at android.widget.AbsListView$1.run(AbsListView.java:3168)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
 

priitp

Member
Licensed User
Longtime User
Hi Erel,

The project is here. (Removed)

Please choose "Seaded" from menu and new Activity opens.
On the bottom of new Activity is spinner with text "Valge kiri mustal foonil" or "Must kiri valgel foonil".
The error accours when you change the spinner value.

There are two seekbars what launch similar actions but without error.
They do launch via timed delay using aTimer.
Also the ToggleShowImages launches similar actions and works OK.

I have breakpoint set on line 325 of Seaded.
It seems to work up to this OK but fails after.

I do get error only using Android 4.03 on emulator.

Thanks
Priit
 
Last edited:
Upvote 0
Top