Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

[Bug]: Error putting the app in the background #1208

Closed
2 tasks done
ghost opened this issue Aug 12, 2023 · 4 comments
Closed
2 tasks done

[Bug]: Error putting the app in the background #1208

ghost opened this issue Aug 12, 2023 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@ghost
Copy link

ghost commented Aug 12, 2023

What happened?

I just put the application in the background and when I returned to it it showed me the error

v2.5.3-beta

What's the expected behavior?

it won't close the app

What version of AndroidIDE you're using?

v2.5.2 (debug builds)

Relevant log output

AndroidIDE crash report
Manufacturer: samsung
Device: SM-G781V
ABI: arm64-v8a
SDK version: 33
App version: v2.5.3-beta (253)

 Stacktrace: 
java.lang.ClassCastException: android.os.BinderProxy cannot be cast to com.itsaky.androidide.services.builder.GradleServiceBinder
	at com.itsaky.androidide.services.builder.GradleBuildServiceConnnection.onServiceConnected(Unknown Source:5)
	at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:2348)
	at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2381)
	at android.os.Handler.handleCallback(Handler.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:226)
	at android.os.Looper.loop(Looper.java:313)
	at android.app.ActivityThread.main(ActivityThread.java:8757)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

Duplicate issues

  • This issue has not been reported yet.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@ghost ghost added the bug Something isn't working label Aug 12, 2023
@itsaky
Copy link
Member

itsaky commented Aug 14, 2023

For some reason, the GradleBuildService might be running in a different process, that's why the error. I'll look into the issue and fix it soon.

@itsaky itsaky added this to the v2.6.0-beta milestone Sep 6, 2023
@itsaky
Copy link
Member

itsaky commented Sep 6, 2023

Hey @esalessandrxx,

I tried to reproduce this issue, but failed. Can you provide instructions for the same?

But here is what I think about the issue :
You closed the IDE and reopened it again quickly. An application's process is not immediately terminated by the Android system and as the buildServiceConnection in ProjectHandlerActivity is stored as a static variable, it might have been reused from the previous application process. I added a commit which might fix the issue.

@ghost
Copy link
Author

ghost commented Sep 8, 2023

Hey @esalessandrxx,

I tried to reproduce this issue, but failed. Can you provide instructions for the same?

But here is what I think about the issue : You closed the IDE and reopened it again quickly. An application's process is not immediately terminated by the Android system and as the buildServiceConnection in ProjectHandlerActivity is stored as a static variable, it might have been reused from the previous application process. I added a commit which might fix the issue.

I've been using the commit for two days, during that time period it hasn't happened again.

but now I'm having problems with autocompletion. Example:

before i start writing my code
example1

while i write my code
example2

@itsaky
Copy link
Member

itsaky commented Sep 8, 2023

I've been using the commit for two days, during that time period it hasn't happened again.

Okay. Reopen this issue if you encounter it again.

but now I'm having problems with autocompletion.

Create a new issue with a detailed explanation and steps to reproduce the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant