Page MenuHomeGitPull.it

Revoking location permission at system setting crashes app on version 1.14
Open, NormalPublic

Description

Hi, there, I've found an issue in version 1.14, which is downloaded from F-Droid.

Reproduce

  1. enter the app from the home screen and allow the location permission request.
  2. go to system setting and revoke the location permission
  3. go back to the app and it crashes

Here the info:

version code:
31

version name:
1.14

android version:
10

phone:
MIX 2S

brand:
Xiaomi

stack:
java.lang.SecurityException: "gps" location provider requires ACCESS_FINE_LOCATION permission.
	at android.os.Parcel.createException(Parcel.java:2074)
	at android.os.Parcel.readException(Parcel.java:2042)
	at android.os.Parcel.readException(Parcel.java:1990)
	at android.location.ILocationManager$Stub$Proxy.requestLocationUpdates(ILocationManager.java:1151)
	at android.location.LocationManager.requestLocationUpdates(LocationManager.java:1033)
	at android.location.LocationManager.requestLocationUpdates(LocationManager.java:561)
	at it.reyboz.bustorino.ActivityMain$NearbyStopsRequester.run(ActivityMain.java:664)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:224)
	at android.app.ActivityThread.main(ActivityThread.java:7562)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

Here is the video about how I found this crash.

Could you help me review this issue? very thanks !!

Event Timeline

Hi @wowhhh can you please share the crash report instead of this video? You can do it pressing "Yes" on our message dialog.

Thank you so much :)

Hello!
I exported the crash report and pasted it below!
Thank you for your reply!

Thank you I've edited the description with the info extracted from your JSON using

1<?php
2# Android Crash Dump exporter for Phabricator
3# Copyright (C) 2021 Valerio Bozzolan
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU Affero General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU Affero General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program. If not, see <http://www.gnu.org/licenses/>
17
18/**
19 * Quick and dirty Android Crash Dump analyzer
20 *
21 * https://gitpull.it/P15
22 */
23
24// base of your Phabricator
25define( 'BASE_URI', 'https://gitpull.it/maniphest/task/edit/form/3/?' );
26
27// received data
28$data_raw = $_POST['data'] ?? null;
29
30$data_clean_text = null;
31$task_args = null;
32if( $data_raw ) {
33
34 $data = @json_decode( $data_raw );
35
36 if( $data ) {
37
38 $data_raw = json_encode( $data, JSON_PRETTY_PRINT );
39
40 // some useful informations
41 $data_clean = [
42 'version code' => $data->APP_VERSION_CODE ?? null,
43 'version name' => $data->APP_VERSION_NAME ?? null,
44 'android version' => $data->ANDROID_VERSION ?? null,
45 'phone' => $data->PHONE_MODEL ?? null,
46 'brand' => $data->BRAND ?? null,
47 'stack' => $data->STACK_TRACE ?? null,
48 ];
49
50 // build an human phrase
51 $data_clean_parts = [];
52 foreach( $data_clean as $k => $v ) {
53 $data_clean_parts[] = "$k:\n$v";
54 }
55 $data_clean_text = implode( "\n\n", $data_clean_parts );
56
57 // build query string
58 $task_args = [
59 'title' => "Fix crash when...",
60 'description' => implode( "\n", [
61 "Dear Developers,",
62 "Please triage this crash:",
63 '',
64 '```',
65 '',
66 $data_clean_text,
67 "\n",
68 '```',
69 '',
70 '',
71 "Thank you! :)",
72 '',
73 '',
74 "> Generated with https://lab.reyboz.it/libre-busto/crash-report/ (P15)",
75 ] ),
76 ];
77
78 } else {
79 $data_raw = 'invalid';
80 }
81
82}
83
84?>
85<html>
86<head>
87 <title>Libre BusTO - crash report dump</title>
88</head>
89<body>
90
91 <h1>Libre BusTO - crash report dump</h1>
92
93 <form method="post">
94 <?php if( $data_clean_text ): ?>
95
96 <p>Info:</p>
97 <textarea readonly><?= htmlentities( $data_clean_text ) ?></textarea>
98 <?php if( $task_args ): ?>
99 <br />
100 <a href="<?= htmlspecialchars( BASE_URI . http_build_query( $task_args ) )?>" target="_blank">Create Task</a>
101 <?php endif ?>
102 </p>
103
104 <?php endif ?>
105
106 <p>Paste here your JSON crash report:</p>
107
108 <p><textarea name="data"><?= htmlentities( $data_raw ) ?></textarea></p>
109
110 <p><button type="submit">OK</button></p>
111 </form>
112
113 <hr />
114
115 <p><a href="https://gitpull.it/tag/libre_busto/">Workboard</a></p>
116
117 <hr />
118
119 <p><a href="https://gitpull.it/P15" target="_blank">Source code and license</a></p>
120
121</body>
122</html>
.

We will debug soon!

valerio.bozzolan renamed this task from Revoking location permission at system setting crashes app to Revoking location permission at system setting crashes app on version 1.14.Tue, Jul 20, 10:03