question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

free(): invalid pointer - when running on Linux

See original GitHub issue

Trying to run almost any Compose app (including, for instance, the codeviewer sample) results in the JVM crashing with a free(): invalid pointer error. This was observed on a fresh install of Ubuntu 20.04 in a virtual machine, but is presumably true of all Ubuntus and a wide variety of other distributions and hardware configurations. Interestingly, @olonho tested on his physical Ubuntu 20.04 machine and did not encounter this failure, so the percentage of users impacted is not yet known. This appears to be a regression introduced between 0.3.0-build154 and 0.3.0-rc1.

For more details, I know @theapache64 encountered the same error in https://github.com/JetBrains/compose-jb/issues/275#issuecomment-782896658 and posted a full backtrace dump. His dump also includes a shader compile error, which I do not see when running the codeviewer app, so is presumably unrelated.

Questions for @theapache64 : (1) More just curiosity than anything, but also looking for patterns, are you running on a VM or physical hardware? (2) When running the codeviewer sample for instance, but I don’t get nearly the same amount of debug info as you and I don’t seem to be getting a hs_err_pid file. How did you get your full backtrace dump?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:27 (22 by maintainers)

github_iconTop GitHub Comments

2reactions
olonhocommented, Feb 22, 2021

Just

./gradlew -stop
export SKIKO_RENDER_API=SOFTWARE
./gradlew run
1reaction
olonhocommented, Feb 25, 2021

Could you please try with

 dependencies {
     implementation(compose.desktop.currentOs)
+     implementation("org.jetbrains.skiko:skiko-jvm-runtime-linux-x64:0.2.16")
+     implementation("org.jetbrains.skiko:skiko-jvm:0.2.16")
 }

as fix in 0.2.15 incomplete.

Read more comments on GitHub >

github_iconTop Results From Across the Web

C free(): invalid pointer - Stack Overflow
You're attempting to free something that isn't a pointer to a "freeable" memory address. Just because something is an address doesn't mean ...
Read more >
invalid pointer" errors after updating glibc-32bit | Support - SUSE
Applications crash with "free(): invalid pointer" errors after updating glibc-32bit. This document (7017485) is provided subject to the ...
Read more >
ERROR: "*** glibc detected *** dtllst: free(): invalid pointer
To resolve this issue, set the environment variable MALLOC_CHECK_ to 0 in the current Linux session or the . profile for the user...
Read more >
free(): invalid pointer when running QApplication app(argc, argv)
Run your program through valgind to show any memory/pointer problems the code may have.
Read more >
Archecker fails with error message *** glibc detected ... - IBM
This error message indicates a double call of free() with the same argument. It is seen in recent Linux versions of libc and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found