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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes on emulator with API level 23 #2124

Closed
surakin opened this issue Dec 28, 2023 · 1 comment 路 Fixed by #2128
Closed

App crashes on emulator with API level 23 #2124

surakin opened this issue Dec 28, 2023 · 1 comment 路 Fixed by #2128
Assignees
Labels
O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@surakin
Copy link
Contributor

surakin commented Dec 28, 2023

Steps to reproduce

I was trying to test PR #2122 on API level 23 but I crash every time I open any room

File res/drawable-xxhdpi-v4/ic_plus.png seems to be missing 馃

This did not happen with API level 25. (Or 30 like I was using originally)

2023-12-28 20:34:29.028  4397-4397  AndroidRuntime          io.element.android.x.debug           E  FATAL EXCEPTION: main
                                                                                                    Process: io.element.android.x.debug, PID: 4397
                                                                                                    android.content.res.Resources$NotFoundException: File res/drawable-xxhdpi-v4/ic_plus.png from xml type xml resource ID #0x7f08016a
                                                                                                    	at android.content.res.Resources.loadXmlResourceParser(Resources.java:2821)
                                                                                                    	at android.content.res.Resources.loadXmlResourceParser(Resources.java:2776)
                                                                                                    	at android.content.res.Resources.getXml(Resources.java:1214)
                                                                                                    	at androidx.compose.ui.res.VectorResources_androidKt.vectorResource(VectorResources.android.kt:70)
                                                                                                    	at androidx.compose.ui.res.VectorResources_androidKt.vectorResource(VectorResources.android.kt:54)
                                                                                                    	at io.element.android.libraries.designsystem.theme.components.IconKt.Icon-ww6aTOc(Icon.kt:119)
                                                                                                    	at io.element.android.libraries.textcomposer.components.ComposableSingletons$ComposerOptionsButtonKt$lambda-1$1.invoke(ComposerOptionsButton.kt:42)
                                                                                                    	at io.element.android.libraries.textcomposer.components.ComposableSingletons$ComposerOptionsButtonKt$lambda-1$1.invoke(ComposerOptionsButton.kt:41)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                    	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:248)
                                                                                                    	at androidx.compose.material3.IconButtonKt.IconButton(IconButton.kt:102)
                                                                                                    	at io.element.android.libraries.designsystem.theme.components.IconButtonKt.IconButton(IconButton.kt:49)
                                                                                                    	at io.element.android.libraries.textcomposer.components.ComposerOptionsButtonKt.ComposerOptionsButton(ComposerOptionsButton.kt:37)
                                                                                                    	at io.element.android.libraries.textcomposer.TextComposerKt$TextComposer$composerOptionsButton$1$1.invoke(TextComposer.kt:141)
                                                                                                    	at io.element.android.libraries.textcomposer.TextComposerKt$TextComposer$composerOptionsButton$1$1.invoke(TextComposer.kt:140)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                    	at io.element.android.libraries.textcomposer.TextComposerKt.StandardLayout(TextComposer.kt:324)
                                                                                                    	at io.element.android.libraries.textcomposer.TextComposerKt.TextComposer-zg6CI5Q(TextComposer.kt:253)
                                                                                                    	at io.element.android.features.messages.impl.messagecomposer.MessageComposerViewKt.MessageComposerView(MessageComposerView.kt:99)
                                                                                                    	at io.element.android.features.messages.impl.MessagesViewKt.MessagesViewComposerBottomSheetContents(MessagesView.kt:432)
                                                                                                    	at io.element.android.features.messages.impl.MessagesViewKt.access$MessagesViewComposerBottomSheetContents(MessagesView.kt:1)
                                                                                                    	at io.element.android.features.messages.impl.MessagesViewKt$MessagesViewContent$1$6.invoke(MessagesView.kt:395)
                                                                                                    	at io.element.android.features.messages.impl.MessagesViewKt$MessagesViewContent$1$6.invoke(MessagesView.kt:394)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:118)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                    	at io.element.android.features.messages.impl.ExpandableBottomSheetScaffoldKt$ExpandableBottomSheetScaffold$2$1$sheetContentSub$1.invoke(ExpandableBottomSheetScaffold.kt:119)
                                                                                                    	at io.element.android.features.messages.impl.ExpandableBottomSheetScaffoldKt$ExpandableBottomSheetScaffold$2$1$sheetContentSub$1.invoke(ExpandableBottomSheetScaffold.kt:119)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                    	at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:984)
                                                                                                    	at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$subcompose$3$1$1.invoke(SubcomposeLayout.kt:476)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
                                                                                                    	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
                                                                                                    	at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable

Outcome

What did you expect?

Room should open normally

What happened instead?

App crashes every time

Your phone model

Emulator

Operating system version

Android 6.0 Marshmallow

Application version and app store

Element X version 0.4.2 (develop branch)

Homeserver

matrix.org

Will you send logs?

No

Are you willing to provide a PR?

No

@surakin surakin added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Dec 28, 2023
@jmartinesp jmartinesp added S-Critical Prevents work, causes data loss and/or has no workaround O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience labels Dec 29, 2023
@jmartinesp jmartinesp self-assigned this Dec 29, 2023
@jmartinesp
Copy link
Contributor

Thanks for the report! It seems like we're using ImageVector.vectorResource(id) and on API 23 Android is trying to fetch a rasterised png image instead, and crashing. This is super weird, because as far as I know, these rasterised pngs should only be used in APIs <21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants