Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Crash when opening #63

Open
tykees opened this issue Mar 17, 2018 · 8 comments
Open

App Crash when opening #63

tykees opened this issue Mar 17, 2018 · 8 comments

Comments

@tykees
Copy link

tykees commented Mar 17, 2018

Expected behavior

Clicking on the app icon on phone i should be able to open and navigate within the application

Actual behavior

When i clicked to open, the app crashed

How to reproduce

  1. Download Reservator

  2. Launch

  • Device used: Tecno L9 plus

  • Android Version: 7.0

App version: 5.1.1

Note: I tried 3 screen recorder but could not work on recording the bug

Recording Of The Bug

https://www.youtube.com/watch?v=9YHVqzmzWUE



Posted on Utopian.io - Rewarding Open Source Contributors

@tiltti
Copy link

tiltti commented Mar 26, 2018

Can confirm this on Lenovo Tab 7" tablet, which also crash upon start with Android version 7.0 and latest app version from Google Play on 26th of March. Haven't checked any logs yet.

@saynomoo
Copy link

saynomoo commented Aug 6, 2019

I can also confirm this crash happening on app launch. Logs from logcat (Lenovo Tab with android 8.1.0):

2019-08-06 15:41:15.714 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.715 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.712 7635-7635/? W/roid.reservator: type=1400 audit(0.0:904): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.721 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.719 7635-7635/? W/roid.reservator: type=1400 audit(0.0:906): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.722 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.725 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.722 7635-7635/? W/roid.reservator: type=1400 audit(0.0:908): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.725 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.722 7635-7635/? W/roid.reservator: type=1400 audit(0.0:909): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.809 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.809 7635-7635/? W/roid.reservator: type=1400 audit(0.0:910): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.810 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.809 7635-7635/? W/roid.reservator: type=1400 audit(0.0:913): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.828 7635-7635/? D/WindowClient: Add to mViews: DecorView@231a82[LoginActivity], this = android.view.WindowManagerGlobal@3921593
2019-08-06 15:41:15.833 7635-7635/? D/ViewRootImpl[LoginActivity]: hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
2019-08-06 15:41:15.838 7635-7635/? V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = ViewRoot{a7829d0 com.futurice.android.reservator/com.futurice.android.reservator.LoginActivity,ident = 0}, this = DecorView@231a82[LoginActivity]
2019-08-06 15:41:15.885 7635-7635/? W/roid.reservator: type=1400 audit(0.0:914): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.887 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.887 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.885 7635-7635/? W/roid.reservator: type=1400 audit(0.0:915): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.889 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.901 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.899 7635-7635/? W/roid.reservator: type=1400 audit(0.0:918): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.901 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.899 7635-7635/? W/roid.reservator: type=1400 audit(0.0:919): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.907 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.905 7635-7635/? W/roid.reservator: type=1400 audit(0.0:920): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.908 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.914 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.912 7635-7635/? W/roid.reservator: type=1400 audit(0.0:922): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.915 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.912 7635-7635/? W/roid.reservator: type=1400 audit(0.0:923): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.933 7635-7635/? V/PhoneWindow: DecorView setVisiblity: visibility = 4, Parent = null, this = DecorView@40b8b8a[]
2019-08-06 15:41:15.934 7635-7635/? D/WindowClient: Add to mViews: DecorView@40b8b8a[WizardActivity], this = android.view.WindowManagerGlobal@3921593
2019-08-06 15:41:15.935 7635-7635/? D/ViewRootImpl[WizardActivity]: hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
2019-08-06 15:41:15.939 7635-7635/? V/PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = ViewRoot{92871 com.futurice.android.reservator/com.futurice.android.reservator.WizardActivity,ident = 1}, this = DecorView@40b8b8a[WizardActivity]
2019-08-06 15:41:15.965 7635-7635/? W/roid.reservator: type=1400 audit(0.0:924): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.966 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.966 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.965 7635-7635/? W/roid.reservator: type=1400 audit(0.0:925): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.987 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:15.985 7635-7635/? W/roid.reservator: type=1400 audit(0.0:926): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:15.987 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:16.002 7635-7635/? W/roid.reservator: type=1400 audit(0.0:928): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:16.003 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:16.003 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:16.002 7635-7635/? W/roid.reservator: type=1400 audit(0.0:929): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:16.005 7635-7635/? W/roid.reservator: type=1400 audit(0.0:930): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:16.007 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:16.007 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:16.005 7635-7635/? W/roid.reservator: type=1400 audit(0.0:931): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:16.012 7635-7635/? W/roid.reservator: type=1400 audit(0.0:932): avc: denied { read } for name="u:object_r:vs_prop:s0" dev="tmpfs" ino=10251 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vs_prop:s0 tclass=file permissive=0
2019-08-06 15:41:16.015 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:16.016 7635-7635/? E/libc: Access denied finding property "vs.wt_current_version"
2019-08-06 15:41:16.078 7635-7635/? D/AndroidRuntime: Shutting down VM
    
    
    --------- beginning of crash
2019-08-06 15:41:16.080 7635-7635/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.futurice.android.reservator, PID: 7635
    java.lang.NullPointerException
        at java.text.RuleBasedCollator.compare(RuleBasedCollator.java:355)
        at java.text.Collator.compare(Collator.java:278)
        at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
        at java.util.TimSort.sort(TimSort.java:220)
        at java.util.Arrays.sort(Arrays.java:1498)
        at java.util.ArrayList.sort(ArrayList.java:1470)
        at java.util.Collections.sort(Collections.java:201)
        at com.futurice.android.reservator.model.DataProxy.getRoomNames(DataProxy.java:79)
        at com.futurice.android.reservator.view.wizard.WizardRoomSelectionFragment.loadRooms(WizardRoomSelectionFragment.java:108)
        at com.futurice.android.reservator.view.wizard.WizardRoomSelectionFragment$1.onCheckedChanged(WizardRoomSelectionFragment.java:74)
        at android.widget.CompoundButton.setChecked(CompoundButton.java:171)
        at com.futurice.android.reservator.view.wizard.WizardRoomSelectionFragment.onCreateView(WizardRoomSelectionFragment.java:77)
        at android.support.v4.app.Fragment.performCreateView(Fragment.java:2261)
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1419)
        at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1750)
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1819)
        at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
        at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2590)
        at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2377)
        at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2332)
        at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:2209)
        at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:649)
        at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:145)
        at android.support.v4.view.ViewPager.populate(ViewPager.java:1238)
        at android.support.v4.view.ViewPager.populate(ViewPager.java:1086)
        at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1616)
        at android.view.View.measure(View.java:22238)
        at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715)
        at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
        at android.view.View.measure(View.java:22238)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6682)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
        at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:139)
        at android.view.View.measure(View.java:22238)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6682)
        at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:400)
        at android.view.View.measure(View.java:22238)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6682)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
        at android.view.View.measure(View.java:22238)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6682)
        at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1514)
        at android.widget.LinearLayout.measureVertical(LinearLayout.java:806)
        at android.widget.LinearLayout.onMeasure(LinearLayout.java:685)
        at android.view.View.measure(View.java:22238)
        at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6682)
        at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
        at com.android.internal.policy.DecorView.onMeasure(DecorView.java:725)
        at android.view.View.measure(View.java:22238)
        at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2523)
        at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1550)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1818)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1438)
2019-08-06 15:41:16.080 7635-7635/? E/AndroidRuntime:     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6982)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:916)
        at android.view.Choreographer.doCallbacks(Choreographer.java:728)
        at android.view.Choreographer.doFrame(Choreographer.java:660)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:902)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6523)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)

@saynomoo
Copy link

saynomoo commented Aug 6, 2019

It turns out that there was a calendar with a null name. A null check in DataProxy.getRoomNames seems to get rid of the crash:

            roomNames.add(room.getName());

--->

            String name = room.getName();
            if(name != null) {
                roomNames.add(name);
            }

@unityco
Copy link

unityco commented Nov 29, 2019

It turns out that there was a calendar with a null name. A null check in DataProxy.getRoomNames seems to get rid of the crash:

            roomNames.add(room.getName());

--->

            String name = room.getName();
            if(name != null) {
                roomNames.add(name);
            }

Can you explain to a complete newbie how one might deploy that fix?

@saynomoo
Copy link

Rough steps for newbie to deploy the fix:

  1. Prepare to google stuff out. 😊
  2. Download Android studio
  3. Download or clone this project
  4. Locate the source file containing DataProxy
  5. Change the mentioned lines
  6. Make sure your android device is in developer mode, and apps can be deployed via usb
  7. Attach your device via usb
  8. Press run in android studio
  9. Profit!

@unityco
Copy link

unityco commented Dec 2, 2019

Thank you, saynomoo, that's exactly the direction I needed! (But you forgot the ? step. ;) )

@unityco
Copy link

unityco commented Dec 4, 2019

So I had no luck on the code fix end, BUT I did seem to find a workaround for this on the tablet side. If you replace Google Calendar (which was my built-in calendar app) with another (I used aCalendar 2,) you can then go into aCalendar's settings and delete the "PC Sync" calendar (which I believe was the problem) and then Reservator will launch!

@ptesavol
Copy link

The null value seems to end up to the roomName here:


which means that the key CalendarContract.Calendars.NAME is not defined in some calendars. We have replaced this with CalendarContract.Calendars.DISPLAY_NAME in our Ubikampus fork of Reservator: https://github.com/ubikampus/reservator/blob/e121e0dbc61dfbfa70b984d8d94727bc06f14dc3/app/src/main/java/com/futurice/android/reservator/model/platformcalendar/PlatformCalendarDataProxy.java#L364 but according to the issues open in our fork, this key might not be defined in all calendars either. I think the safest fix here would be to add null checking in PlatformCalendarDataProxy and to use "UNNAMED" or similar as calendar name if CalendarContract returns null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants