Skip to content

Fix: libhwui.so "null pointer dereference" SIGSEGV (Android) - #1657

Merged
devemux86 merged 1 commit into
mapsforge:masterfrom
Sublimis:drawlines-insteadof-path-1
Feb 21, 2025
Merged

devemux86 merged 1 commit into
mapsforge:masterfrom
Sublimis:drawlines-insteadof-path-1

Conversation

@Sublimis

Copy link
Copy Markdown
Contributor

Another "not a new feature". We've been using it in Urban Biker for a while now.
Take it or leave it 😁

* This fixes: libhwui.so "null pointer dereference" SIGSEGV (Android)
* The only drawback seems to be that line joins of a few paths may not be rounded.
* Defaults to {@code true} for Android API levels 32 and below.
*/
public static boolean ANDROID_LIBHWUI_FIX = Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sublimis Why this particular Android version?

On which Android versions have you seen this problem happen?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Older obviously. Some change happened between Android 12 and 13 that most probably fixes the bug. Nonetheless, there may also be performance benefits, as drawing a bunch of lines is faster than using a path from our earlier experience.

@devemux86 devemux86 added this to the 0.24.0 milestone Feb 21, 2025
@devemux86
devemux86 merged commit 9773a80 into mapsforge:master Feb 21, 2025
@devemux86

Copy link
Copy Markdown
Collaborator

@Sublimis Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants