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

Some longform notes (or longform DVM feeds) crashed Amethyst #975

Closed

Conversation

believethehype
Copy link
Contributor

No description provided.

@believethehype believethehype marked this pull request as ready for review July 7, 2024 17:42
@vitorpamplona
Copy link
Owner

Hum... this is weird. Why was it crashing? was the LocalConfiguration.current.locales.get(0) null?

@believethehype
Copy link
Contributor Author

believethehype commented Jul 8, 2024

It gave me java.util.Formatter: UnknownFormatConversionException: Conversion = 'F' in said line when loading lastest longform notes DVM yesterday. This also happend a while ago, until it didn't. I'm not sure but I have the impression it has to do with some longform notes.

@vitorpamplona
Copy link
Owner

Usually, that means you are loading a string from strings.xml with a %1$s that requires a parameter, and the parameter is not being passed or being passed in a weird type.

@believethehype
Copy link
Contributor Author

Yes, i think that is what was happening. An empty or weird type. The explicit .toString() cast avoided the crash when it happened yesterday.

@vitorpamplona
Copy link
Owner

Yeah, but it isn't better to solve which string was used without a param? It could also be that one of the translations removed or misspelled the %1$s, removing the param that otherwise would be there.

@believethehype
Copy link
Contributor Author

Pretty sure it happend on preview_card_image_for (english language)

(Starting Line 88 in LongForm.kt)

if (automaticallyShowUrlPreview) { image?.let { AsyncImage( model = it, contentDescription = stringRes( R.string.preview_card_image_for, it, ), contentScale = ContentScale.FillWidth, modifier = Modifier.fillMaxWidth(), ) } ?: run { DefaultImageHeader(note, accountViewModel) } }

@vitorpamplona
Copy link
Owner

Fixed on 5a60c3a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants