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

Termux Crashes Launcher 3 #991

Closed
zakerytclarke opened this issue Jan 24, 2019 · 19 comments
Closed

Termux Crashes Launcher 3 #991

zakerytclarke opened this issue Jan 24, 2019 · 19 comments

Comments

@zakerytclarke
Copy link

Problem description
The most recent update of termux has caused Lenovo Yoga Book Launcher 3 to continually crash until Termux is uninstalled.

Steps to reproduce
Install Termux v 0.66 on Lenovo Yoga Book Launcher 3.

Expected behavior
Immediately after install a notification will say "Launcher 3 has stopped working" and will continue to crash and be unuseable.

Additional information
Model: Lenovo YB1-X90F

@Grimler91
Copy link
Member

You could try clearing the cache as suggested for example here: https://stackoverflow.com/questions/36372370/unfortunately-launcher3-has-stopped-working-error-in-android-studio

Note that this seems to happen with other apps as well: https://forums.lenovo.com/t5/Android-Yoga-Series-Tablets/Unfortunately-Launcher3-has-stopped-on-Lenovo-Yoga-Tab-3-Pro/td-p/3962333 so might not be termux related

A logcat might tell us more about the problem.

@zakerytclarke
Copy link
Author

I tried clearing the cache and it didn't work. I agree that there is probably a problem with launcher 3, but it seems like an odd bug. I simply downgraded to the previous release of termux and erything is back to normal.

@Grimler91
Copy link
Member

If you have twrp installed then you could try wiping cache from there as well.

We can't do anything about this. A logcat would tell us what the problem is, but it's probably not caused by termux-app 0.66

@ghost
Copy link

ghost commented Jan 24, 2019

Launcher 3 bugs are not Termux bugs !

The only change that could cause this is a chaning of icon type (maybe 4b52cfb or 7056945 if I not missed something). But since this new icon type is officially supported by Android, we probably won't change it.

@ghost ghost closed this as completed Jan 24, 2019
@vpelletier
Copy link

vpelletier commented Feb 21, 2019

I could reproduce this issue on a Lenovo YT3-X90X (Tab3 Pro), which is long-unsupported by Lenovo and hence will not receive any new android version (6.0.1).

To reproduce:

  • open f-droid
  • install termux (0.66 is latest as of this writing)
  • immediately upon install dialog exit (back to f-droid), launcher3 crashes and shows the modal window, and the device becomes essentially unusable (any not-already-opened app becomes unreachable)

If termux is knowingly incompatible with that version of launcher3, shouldn't it explicitly mention it in the package, which would then prevent f-droid from upgrading it and rendering the device essentially unusable (not a brick, but a device where no app can be started without debugging seems very broken to me) ?

EDIT: downgrading to 0.65 is enough to not trigger the issue.

@swiss-knight
Copy link

I can reproduce this issue on my side after having installed Termux on a Lenovo Phab 2 Phone based on Android 6.0.1.
I installed Termux from the play store, not from sources.

@vpelletier
Copy link

vpelletier commented Feb 21, 2019

...and re-reading this report, I may be misunderstanding an important thing: is launcher3 and android thing, or a lenovo thing ?

@ghost
Copy link

ghost commented Feb 21, 2019

is launcher3 and android thing, or a lenovo thing ?

If preinstalled and undeletable, then it both lenovo's and Android's thing.

But anyway, if third-party application is able to crash system thing, then this is a flaw of system thing and theoretically can be even considered as DoS vulnerability since system launcher became unusable.

OS/Vendor-related bugs won't be fixed from our side.

@vpelletier
Copy link

I of course do not expect Termux to fix a completely foreign and proprietary peice of software, and I do not think I asked otherwise.

But there seem to be a large quantity of android applications out there which do not trigger this crippling bug.

Does android supporting vector graphics mandate them ? Is there a way to ship both, in a way that archaic and unsupported software like launcher3 would find the one they are happy with instead of falling over themselves ?

@Grimler91
Copy link
Member

@vpelletier There also seem to be a fair amount of android applications that do trigger this bug, not only termux (see my previous comment).

Feel free to investigate and propose a pull request. Since none of the core developers seem to experience the issue I think it is unlikely that anyone of us will spend time looking for a workaround

@ghost
Copy link

ghost commented Feb 21, 2019

@Grimler91 I guess launcher just can't handle the our new icon - this is the only change between v0.65 and v0.66 that can trigger such behaviour.

Likely it is because of 7056945.

If someone wants to test, I can build Termux app with reverted 7056945.

But anyway, crashing launcher with vector icon is something.... nonsense.

@ghost
Copy link

ghost commented Feb 21, 2019

Okay, I reverted icon changes: app-debug.apk.gz (gunzip before use + make sure that plugins are not installed).

@vpelletier
Copy link

Feel free to investigate and propose a pull request.

Right now I am not able to investigate further (traveling). Before leaving, I could get a logcat output showing launcher3 failing on a vector/bitmap conversion error. But I do not have the exact stack trace not error message available to me now. FWIW, I did not have a termux shortcut on the main screen, so just having the app installed (and hence listed in the menu behind the "all apps" button) is enough to get launcher3 to crash, even without opening that menu.

If someone wants to test, I can build Termux app with reverted

Given my currently limited debugging & recovery abilities, I'm reluctant to experiment with proposed fix. I intend to when I'm back in my normal environment. Which should be in around 2 weeks.

But anyway, crashing launcher with vector icon is something.... nonsense.

I cannot agree more.

On a very tangential note, if any developer wants to be able to reproduce the bug first hand, the Lenovo Tab3 Pro is quite a nice tablet (modulo being end-of-life, and a still rather high price tag). Its killer feature for me is the built-in video projector. While it has poor resolution (not advertised anywhere, I think it is around 640x480) and is not extremely bright, I find it very suitable for watching movies in bed, projected on the ceiling. It seems the hardware is UEFI x64, so once usb booting is enabled (by unlocking the bootloader, there is at least one video on running ubuntu on a Tab3 Plus) the hackability should be high. I have not yet brought myself to doing this though, for just VLC + projection it is working well enough. Especially with termux (wol + ssh) to wake the NAS and keep it from suspending while streaming via uPNP.

@vpelletier
Copy link

Here is the original error, with termux 0.66 installed from f-droid, for reference:

03-20 09:37:03.921  3988  4087 E AndroidRuntime: FATAL EXCEPTION: launcher-loader
03-20 09:37:03.921  3988  4087 E AndroidRuntime: Process: com.android.launcher3, PID: 3988
03-20 09:37:03.921  3988  4087 E AndroidRuntime: java.lang.ClassCastException: android.graphics.drawable.VectorDrawable cannot be cast to android.graphics.drawable.BitmapDrawable
03-20 09:37:03.921  3988  4087 E AndroidRuntime:        at com.android.launcher3.compat.LauncherActivityInfoCompatVL.getBadgedIcon(LauncherActivityInfoCompatVL.java:127)
03-20 09:37:03.921  3988  4087 E AndroidRuntime:        at com.android.launcher3.IconCache.updateCacheAndGetContentValues(IconCache.java:383)
03-20 09:37:03.921  3988  4087 E AndroidRuntime:        at com.android.launcher3.IconCache.addIconToDBAndMemCache(IconCache.java:352)
03-20 09:37:03.921  3988  4087 E AndroidRuntime:        at com.android.launcher3.IconCache.updateIconsForPkg(IconCache.java:226)
03-20 09:37:03.921  3988  4087 E AndroidRuntime:        at com.android.launcher3.LauncherModel$PackageUpdatedTask.run(LauncherModel.java:3182)
03-20 09:37:03.921  3988  4087 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:739)
03-20 09:37:03.921  3988  4087 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:95)
03-20 09:37:03.921  3988  4087 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:148)
03-20 09:37:03.921  3988  4087 E AndroidRuntime:        at android.os.HandlerThread.run(HandlerThread.java:61)

Also, I downgrading fails after tapping the "install" button on the android install dialog (window appearing after tapping f-droid's button):

03-20 09:43:12.127  6721  6721 E AppDetailsActivity: install aborted with errorMessage: Failed to install due to an unknown error

there is no visible stack trace between initiating the install from f-droid and that errror. Uninstalling termux 0.66 and installing 0.65 works, but of course destroys whatever was stored in previous install's storage space. One script in my case, but still it would be nice if downgrading worked... But that is likely an entire separate issue.

Now, to proposed fix: I uninstalled 0.65 & plugins (termux-widgets only in my case) and installed proposed apk using adb, and launcher3 is a happy camper.

@ghost
Copy link

ghost commented Mar 20, 2019

@vpelletier Downgrading is not possible when versionCode changed. Exception is for ADB, but only for debuggable APKs.

@shallowbit
Copy link

shallowbit commented Jul 19, 2019

I think this may have to do with the icon format. I'm not sure but this was happening to me whenever i used a specific launcher widget and scrolled to the "T' portion of the menu. It was only happening with the f-droid packaged version of the app though.

That's all the information I have right now. Take a look. I'd love a fix for this.

@vpelletier
Copy link

Is there a reason why this issue was closed without fix, while @xeffyr 's build does resolve it ?

Currently, as 0.65 is not offered by f-droid anymore, it's impossible to install termux on that model via "normal" means (iow, without downloading above package).

@ghost
Copy link

ghost commented Oct 19, 2019

Is there a reason why this issue was closed without fix

We are not going to remove vector application icon. That is why it closed.

#991 (comment)

@shallowbit
Copy link

That is unfortunate. Termux is now essentially unusable to any version android release beyond 6 because of an unwillingness to find a workaround for the icon format? Especially considering that termux is the only way many people with these releases can enjoy gnu utitlites,

@ghost ghost locked and limited conversation to collaborators Dec 3, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants