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

frequent crashes #990

Open
gilcu3 opened this issue Aug 17, 2024 · 6 comments
Open

frequent crashes #990

gilcu3 opened this issue Aug 17, 2024 · 6 comments
Assignees
Labels

Comments

@gilcu3
Copy link

gilcu3 commented Aug 17, 2024

I am getting random frequent crashes while using the app. I am using the fdroid version on the latest Lineage OS (Android 15)

FATAL EXCEPTION: AsyncTask #12
Process: it.feio.android.omninotes.foss, PID: 10823
java.lang.RuntimeException: An error occurred while executing doInBackground()
	at android.os.AsyncTask$4.done(AsyncTask.java:415)
	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
	at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
	at java.util.concurrent.FutureTask.run(FutureTask.java:269)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
	at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.SecurityException: Caller it.feio.android.omninotes.foss needs to hold android.permission.SCHEDULE_EXACT_ALARM or android.permission.USE_EXACT_ALARM to set exact alarms.
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3183)
	at android.os.Parcel.createException(Parcel.java:3167)
	at android.os.Parcel.readException(Parcel.java:3150)
	at android.os.Parcel.readException(Parcel.java:3092)
	at android.app.IAlarmManager$Stub$Proxy.set(IAlarmManager.java:319)
	at android.app.AlarmManager.setImpl(AlarmManager.java:1084)
	at android.app.AlarmManager.setImpl(AlarmManager.java:1044)
	at android.app.AlarmManager.setExact(AlarmManager.java:808)
	at it.feio.android.omninotes.utils.ReminderHelper.addReminder(ReminderHelper.java:62)
	at it.feio.android.omninotes.utils.ReminderHelper.addReminder(ReminderHelper.java:51)
	at it.feio.android.omninotes.async.AlarmRestoreOnRebootService.onHandleWork(AlarmRestoreOnRebootService.java:60)
	at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:396)
	at androidx.core.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:387)
	at android.os.AsyncTask$3.call(AsyncTask.java:394)
	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
	... 3 more
Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.alarm.AlarmManagerService$4.set(AlarmManagerService.java:2964)
	at android.app.IAlarmManager$Stub.onTransact(IAlarmManager.java:189)
	at android.os.Binder.execTransactInternal(Binder.java:1500)
	at android.os.Binder.execTransact(Binder.java:1444)
@pratistha-05
Copy link

pratistha-05 commented Aug 21, 2024

@gilcu3 are these crashes happening in android 14? seems like alarm permission is no longer granted by default in android 14. I think runtime check should be added

@gilcu3
Copy link
Author

gilcu3 commented Aug 21, 2024

Indeed, it is android 14 :)

@federicoiosue
Copy link
Owner

@pratistha-05 great, you already worked on runtime permissions also.

@pratistha-05
Copy link

@gilcu3 can you tell me where exactly this issue is happening, so that i can replicate it

@gilcu3
Copy link
Author

gilcu3 commented Sep 15, 2024

I think it was nowhere specific. I had the alarm permission off, and some notes with alarms set to the future. While reading other notes or creating new ones it would crash randomly.

@eren8204
Copy link

eren8204 commented Oct 3, 2024

@gilcu3 should i start working on it

federicoiosue added a commit that referenced this issue Oct 4, 2024
fix for #990: runtime permission for alarm services in android 12+ devices
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants