You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear RMaps Team,
I have implemented an static analysis tool for finding bugs in Android apps and
I have found a NullPointerException (NPE) in the following class of your app:
- com.robert.maps.applib.MainActivity
What steps will reproduce the problem?
1. Open the app and stay in the main activity.
2. Tab the menu button.
5. Tab the home button and before the window closes, tab the Exit button in the
menu.
This will create a NPE in the activity. It is worth to mention that there are
other scenarios in which this bug can be seen. For example, if the user repeat
the first 3 steps and receives a phone call, but before the phone call activity
takes the foreground, the user tabs the Exit button. This creates a race
condition between the callbacks onPause and onOptionsItemSelected (onPause is
called before onOptionsItemSelected). Other apps have had this problem as you
can see in bug found in MyTracks [1].
What is the expected output? What do you see instead?
The app crashes. The app must not crash and maintain the same state when the
user comeback to the app.
What version of the product are you using? On what operating system?
0.9.4.1 on a Samsung S4 Mini with Android 4.2.2.
Please provide any additional information below.
RMaps: 0.9.1
Android: 4.4.2
Device: MSM8960 samsung serranoltespr SPH-L520 serranoltespr
java.lang.NullPointerException
at com.robert.maps.applib.MainActivity.onPause(MainActivity.java:633)
at
com.robert.maps.applib.MainActivity.onOptionsItemSelected(MainActivity.java:812)
at android.app.Activity.onMenuItemSelected(Activity.java:2708)
at
com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java
:1110)
at
com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.
java:735)
at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
at
com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:87
4)
at
com.android.internal.view.menu.ListMenuPresenter.onItemClick(ListMenuPresenter.j
ava:177)
at android.widget.AdapterView.performItemClick(AdapterView.java:308)
at android.widget.AbsListView.performItemClick(AbsListView.java:1509)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:3467)
at android.widget.AbsListView$3.run(AbsListView.java:4830)
at android.widget.AbsListView.onDetachedFromWindow(AbsListView.java:3297)
at
com.android.internal.view.menu.ExpandedMenuView.onDetachedFromWindow(ExpandedMen
uView.java:96)
at android.view.View.dispatchDetachedFromWindow(View.java:13557)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2802)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2800)
at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:3352)
at android.view.ViewRootImpl.doDie(ViewRootImpl.java:6217)
at
android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3741)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5602)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
Original issue reported on code.google.com by [email protected] on 20 Aug 2014 at 3:02
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 20 Aug 2014 at 3:02The text was updated successfully, but these errors were encountered: