Android studio suddenly freezes - android

Have submitted the following bug report for Google. May be somebody faced similar problem?
Android studio 2.1.2 for Windows may suddenly stop responding on keyboard or mouse clicks.
Also, when trying clicking windows close button (cross), nothing happens.
Task manager shows, that AS consumes about 30% of CPU. The only way to stop AS is to kill it via task manager.
Just before freezing the following message occurs in AS status bar:
null java.nio.BufferOverflowException at com.android.ddmlib.Debugger.read(Debugger.java:210) at com.android.ddmlib.MonitorThread.processDebuggerData(MonitorThread.java:451) at com.android.ddmlib.MonitorThread.processDebuggerActivity(MonitorThread.java:394) at com.android.ddmlib.MonitorThread.run(MonitorThread.java:259)
This may occurs in any time, even when just editing text.

Related

Qt Application visually freezes after start or return from background

We have a (rather complicated) Qt application, with port to Android. It worked quite OK - until we started trying it on Android Pie.
Sometimes, either after start, or after return from background, application visually freezes - however, logging shows that UI thread is alive, it responds to taps, widgets receive paintEvent()'s and process them. But nothing changes on screen.
Hardware buttons like 'Back' also work - application is able to show 'Are you sure to exit?" message box and it works properly.
Also, you you try to go ot home screen and back to app - most of the time it unfreezes.
Actually, this behavior started on Android 8, but was resolve with a dirty hack - doing hide/show for main widget upon receiving applicationStateChange(Active). But it stopped working on Android 9.
I am completely out of ideas what could we do to produce such behavior, and how to fix that...
After a long and rather tedious debugging we finally narrowed it to a problem in Qt itself.
I've reported a bug: https://bugreports.qt.io/browse/QTBUG-76142
However, I don't know whether it was fixed in newer releases, since we stopped development of Android apps for now.
This is not an actual solution, but shares some ideas. I used QT 6.3 and the same hang/freeze problem occurred in qt android app (arm64-v8a / Qt widgets) after returning from background or after phone auto off when app is opened and after return to phone on. Another consequence is that after sending the app to background, I can't use Google chrome properly (I only tested this app, not other apps). What happened is that it's very slow and scrolling in Chrome doesn't work as usual.
I suppressed this problem with this trick (not a solution): i.e., before sending the QT app to the background, I triggered it to show a message box (from clicking a button) and let message box open. Now the Google Chrome app worked normally. And after dragging the QT app to the front and giving OK to the message box, I was able to use the application as usual. No hang/freeze problem.
Also I read an article from a link (https://lists.qt-project.org/pipermail/interest/2014-November/014218.html) : That is, we can able to modify the QtActivity.java (which can communicate to the QT app) and use the on pause and on resume event. So what I thought is that, If I trigger the app to show Qt message box from this "on pause" event, and automatically close the same in the "on resume" event this hang/freeze can be handled.
But I didn't try above (modify QtActivity.java) because now I switched to QT 6.4 and hang/freeze problem is not present in this version.

Why Android Studio stop button remains active after running tests?

This happens every time I run a test as long as I remember (Android Studio 2+, 3.0, 3.1, 3.2)
.
Sometimes the stop button even shows multiple processes. Also it doesn't matter how many times I click the stop button, it will never work (it does stop the test but the button remains in active state).
It seems to be a bug in Android Studio. I have found that it was reported previously on Google Issue Tracker with ID 64031765 and is not fixed yet.
For some reason my answer was deleted by a moderator without any explanation. It is a bug and there is nothing more to add.

Android emulator stays behind Android Studio after Run 'app'

In Android Studio on Run 'app', the emulator stays behind the Android Studio window, so to get it focused I have to hit Command+Tab.
Is there anyway that emulator window gets focused automatically once the app build/launch process is finished.
Its the default behaviour of Xcode, after the build process finishes, simulator window comes on top of Xcode.
I don't believe there is. I have just gotten into the habit of immediately clicking on the emulator once I hit run. Could submit feedback and ask for this to become a feature though! I'll be doing that.

Android studio: Error: Activity not started, unknown error code 5

Currently developing an Android app for my company.
Everything was fine, till my last debugging session on my test-device (tablet attached to android via adb).
When I try to run or debug my app, the "Run App" log simply shows:
Error: Activity not started, unknown error code 5
There is no further information, no stack trace, no nothing...
I tried to figure out, what I changed since the last time, but nothing seems to fix this.
Has anybody else had this error code 5 before and can help me?
Long story short: Unknown error 5 means (at least in my case), there is a lock (meaning a pinned app) on the device, so no other app can be started.
After a bunch of things I tried, I finally figured this out.
My app uses startLockTask() to pin it (so you can't accidentally press one of the navigation buttons).
The problem was, that this lock seemed to be active, even though the app wasn't running. I only realized that, after I tried to push the home button on my tablet (it already showed the android home screen, so it didn't occur to me, to try that...).
Once I released the lock (pressing both Back and Overview at the same time), I could start the debugging again, with no problem.
Restarting the device fixed the problem

Virtual Android Machine doesn't load anymore

I have no idea what happened. I was using it normally just yesterday, today every time I turn on a VM, it keeps going on with the loading animation (upwards of 10 minutes). The VMs were never slow on my pc (Core i7). In under two minutes, it would completely load with all the applications installed. I don't have any errors because it either ends up crashing completely or the VM loads but is immensely slow` ,such that I would get messages similar to :
Virtual Machine has stopped responding.
EDIT: I tried turning it on again. After 30 minutes the VM loaded with a blank screen. Then when I tried to click on a button in the keypad, it went back to the loading screen.
EDIT: It turned on now but it is slower than anything I have ever experienced before. My AVM was NEVER this slow. I unlocked the phone and this message popped up: "Process system is not responding." I have two options "wait" or "ok". After I clicked Wait, I could interact a bit with it, but then a second message popped up "Unfortunately the launcher has stopped." and I'm back on the main screen.
I found the answer. I accidentally deactivated the high-performance mode on my laptop. I re-activated it and now it seems to be back to normal.

Categories

Resources