lorensiuswlt / NewQuickAction

Android QuickAction
http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/
Apache License 2.0
583 stars 212 forks source link

NullPointerException #8

Open ligao opened 12 years ago

ligao commented 12 years ago

Hi Lorensius, Thanks for your great work.

I'm still using your July-16 commit and one of my users encountered the following exception. Has this been fixed in the latest release? Thanks!

java.lang.NullPointerException at android.widget.PopupWindow$PopupViewContainer.dispatchKeyEvent(PopupWindow.java:1340) at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2471) at android.view.ViewRoot.deliverKeyEvent(ViewRoot.java:2431) at android.view.ViewRoot.handleMessage(ViewRoot.java:1741) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4627) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636) at dalvik.system.NativeStart.main(Native Method)

petetandon commented 12 years ago

You have any repro steps?

ligao commented 12 years ago

Sorry. I don't. This was reported by an anonymous user and I couldn't reproduce it on my handsets. Searching online I found a few people encountered similar issues. At least one of them looks like also related to QuickAction.

http://stackoverflow.com/questions/6896356/android-error-nullpointerexception-view-dispatch-key-event http://stackoverflow.com/questions/6328050/how-can-i-track-down-the-origin-of-this-exception http://stackoverflow.com/questions/7768728/popupwindow-crash-on-dispatch-event

lorensiuswlt commented 12 years ago

I can't reproduce the error, tested it on Android 2.1-4.0.4 never got the exception

xDragonZ commented 12 years ago

ACRA Crash Report from anonymous too.

java.lang.NullPointerException at android.widget.PopupWindow$PopupViewContainer.dispatchKeyEvent(PopupWindow.java:1428) at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2627) at android.view.ViewRoot.deliverKeyEvent(ViewRoot.java:2592) at android.view.ViewRoot.handleMessage(ViewRoot.java:1881) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3687) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625) at dalvik.system.NativeStart.main(Native Method)


2.3.4

Details (last occurence of error)
OS   Android 2.3.4
App Version  2.1.0
Device   GT-S5830
mobile_net_on    -
MOUNT_UMS_PROMPT     1
MOBILE_DATA  1
SEND_ACTION_APP_ERROR    1
TETHER_DUN_REQUIRED  0
ALLOWED_GEOLOCATION_ORIGINS  http://www.google.co.uk http://www.google.com
DISABLED_SYSTEM_INPUT_METHODS  
LOCK_PATTERN_ENABLED     0
screen_dpi(x:y)  159.37254:160.42105
BACKGROUND_DATA  1
TTS_USE_DEFAULTS     0
BLUETOOTH_ON     0
TTS_DEFAULT_LANG     eng
screen:width     320
ALLOW_MOCK_LOCATION  0
PREFERRED_CDMA_SUBSCRIPTION  1
gps_on   false
DATA_ROAMING     0
DEFAULT_INPUT_METHOD     com.sec.android.inputmethod.axt9/.AxT9IME
BACKUP_TRANSPORT     com.google.android.backup/.BackupTransportService
MOUNT_UMS_AUTOSTART  0
MOUNT_PLAY_NOTIFICATION_SND  1
TTS_DEFAULT_RATE     100
INSTALL_NON_MARKET_APPS  1
ADB_ENABLED  1
ENABLED_ACCESSIBILITY_SERVICES  
appvercode   104
LOCK_PATTERN_VISIBLE     0
MOUNT_UMS_NOTIFY_ENABLED     1
LOCATION_PROVIDERS_ALLOWED   gps
TTS_ENABLED_PLUGINS 
TTS_DEFAULT_COUNTRY  GBR
VOICE_RECOGNITION_SERVICE    com.google.android.voicesearch/.GoogleRecognitionService
NETWORK_PREFERENCE   1
TTS_DEFAULT_SYNTH    com.svox.pico
USB_MASS_STORAGE_ENABLED     1
PREFERRED_NETWORK_MODE   0
LAST_SETUP_SHOWN     eclair_1
WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON  1
screen:height    480
TTS_DEFAULT_VARIANT 
wifi_on  false
user_crash_date  2012-04-04T09:38:24.000+08:00
BACKUP_ENABLED   1
DEVICE_PROVISIONED   1
BACKUP_PROVISIONED   1
LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED    0
ASSISTED_GPS_ENABLED     1
CDMA_CELL_BROADCAST_SMS  1
THROTTLE_RESET_DAY   3```
lorensiuswlt commented 12 years ago

I think this issue might be related with ui thread. Do you perform a process in separated thread within quick action?

xDragonZ commented 12 years ago

I don't think so. I have emailed you my source code to lorenz [at] londatiga [dot] n e t, this might help you.

bartatamas commented 12 years ago

I always get same error reports from my users. For example:

manufacturer: unknown model: rk29sdk android version: 2.3.1 sdk version: 9 locale: pl_PL

java.lang.NullPointerException at android.widget.PopupWindow$PopupViewContainer.dispatchKeyEvent(PopupWindow.java:1428) at android.view.ViewRoot.deliverKeyEventToViewHierarchy(ViewRoot.java:2568) at android.view.ViewRoot.deliverKeyEvent(ViewRoot.java:2533) at android.view.ViewRoot.handleMessage(ViewRoot.java:1874) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:3647) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) at dalvik.system.NativeStart.main(Native Method)