Page MenuHomeGitPull.it

Revoking location permission at system setting crashes app on version 1.14
Closed, ResolvedPublic

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 !!

Revisions and Commits

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-2025 Valerio Bozzolan, crash report contributors
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// This should be less than 50 to avoid "Request-URI Too Long" when creating the task using
25// a super-long GET URL...
26//$logcat_max_lines = 20;
27$logcat_max_lines = 30;
28
29// base of your Phabricator
30define( 'BASE_URI', 'https://gitpull.it/maniphest/task/edit/form/3/?' );
31
32// received data
33$data_raw = $_POST['data'] ?? null;
34
35$data_clean_text = null;
36$task_args = null;
37if( $data_raw ) {
38
39 $data = @json_decode( $data_raw );
40
41 if( $data ) {
42
43 $data_raw = json_encode( $data, JSON_PRETTY_PRINT );
44
45 $app_version_name = $data->APP_VERSION_NAME ?? null;
46
47 // Take only some lines of logcat.
48 $logcat_reduced = null;
49 $logcat = $data->LOGCAT ?? null;
50 if ($logcat) {
51 $lines = explode("\n", $logcat);
52 $last_lines = [];
53 for ($i = 0; $i < $logcat_max_lines && $lines; $i++) {
54 $last_lines[] = array_pop($lines);
55 }
56 $last_lines = array_reverse($last_lines);
57 $logcat_reduced = implode("\n", $last_lines);
58 }
59
60 // some useful informations
61 $data_clean = [
62 'Version code' => $data->APP_VERSION_CODE ?? null,
63 'Version name' => $app_version_name,
64 'Android version' => $data->ANDROID_VERSION ?? null,
65 'Phone' => $data->PHONE_MODEL ?? null,
66 'Brand' => $data->BRAND ?? null,
67 'Stack' => $data->STACK_TRACE ?? null,
68 "logcat (last $logcat_max_lines lines)" => $logcat_reduced,
69 ];
70
71 // build an human phrase
72 $data_clean_parts = [];
73 foreach( $data_clean as $k => $v ) {
74 $data_clean_parts[] = "$k:\n$v";
75 }
76 $data_clean_text = implode( "\n\n", $data_clean_parts );
77 $data_clean_text = trim($data_clean_text);
78
79 // build query string
80 $task_args = [
81 'title' => "Fix crash caused by ... on version $app_version_name",
82 'description' => implode( "\n", [
83 "Dear Developers of the amazing Free/Libre and Open Source app #libre_busto,",
84 "Please triage my crash:",
85 '',
86 '```',
87 $data_clean_text,
88 '```',
89 '',
90 '',
91 "Thank you! :)",
92 '',
93 '',
94 "> Generated with https://lab.reyboz.it/libre-busto/crash-report/ (P15)",
95 ] ),
96 ];
97
98 } else {
99 $data_raw = 'invalid';
100 }
101
102}
103
104?>
105<html>
106<head>
107 <title>Libre BusTO - crash report dump</title>
108</head>
109<body>
110
111 <h1>Libre BusTO - crash report dump</h1>
112
113 <form method="post">
114 <?php if( $data_clean_text ): ?>
115 <h2>Generated Crash report</h2>
116 <?php if( $task_args ): ?>
117 <p>
118 <a href="<?= htmlspecialchars( BASE_URI . http_build_query( $task_args ) )?>" target="_blank">Create New Task in Phorge</a>
119 </p>
120 <?php endif ?>
121 <p>Preview of Task Content:<br />
122 <textarea readonly><?= htmlentities( $data_clean_text ) ?></textarea>
123 </p>
124 <?php endif ?>
125
126 <h2>Generate New Crash Report</h2>
127
128 <p>Paste here your JSON crash report:</p>
129
130 <p><textarea name="data"><?= htmlentities( $data_raw ) ?></textarea></p>
131
132 <p><button type="submit">OK</button></p>
133 </form>
134
135 <hr />
136
137 <p><a href="https://gitpull.it/tag/libre_busto/">Workboard</a></p>
138
139 <hr />
140
141 <p><a href="https://gitpull.it/P15" target="_blank">Source code and license</a></p>
142
143</body>
144</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.Jul 20 2021, 10:03

This is probably fixed by now. Can you check if the issue is still present with the latest version? @wowhhh

Hello, I test it again on the latest version. This crash has been fixed.
I review the commits and I think this bug has been fixed in 6d35b0c0367e.

Very useful apps. Thanks for your reply!