flathub / flathub/com.mojang.Minecraft

Launcher crashes (std::bad_function_call in liblauncher.so) when clicking "Sign in with Microsoft"

Open
#176 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
38
Forks
13
Avg merge
24m
Merged PRs (30d)
2

Description

## Summary

The official Minecraft Launcher (Flatpak, `com.mojang.Minecraft` v2.1.3) crashes with SIGABRT every time I click **"Sign in with Microsoft"**, immediately after the CEF sign-in window opens. The crash always happens ~4-8 seconds after clicking the button, well before the actual Microsoft login page has a chance to load.

Instead of the sign-in page, the launcher UI shows a garbled/nonsensical error dialog:

```
Error Code: 0x80004005 code: Eroded Badlands. A file that the Windows
Product Activation (WPA) requires is damaged or missing. Please reboot,
verify system permissions, and make sure your operating system is
up-to-date. For more information, go HERE or contact Customer Support
directly.
```

This text is clearly a leftover/generic Windows error template (referencing "Windows Product Activation") that should never appear on Linux, combined with what looks like an uninitialized/garbage string ("Eroded Badlands" - a Minecraft biome name) used as the error "code" placeholder - consistent with memory corruption following the crash below.

## Environment

- OS: Fedora Linux 44 (Workstation Edition)
- Session: GNOME, Wayland
- Flatpak: 1.18.2
- App: `com.mojang.Minecraft` v2.1.3
- Runtime: `org.freedesktop.Platform/x86_64/25.08`
- Fresh install (first launch, no prior `.minecraft` data)

## Steps to reproduce

1. `flatpak install flathub com.mojang.Minecraft`
2. `flatpak run com.mojang.Minecraft`
3. Click "Sign in with Microsoft"
4. Crash occurs within ~5 seconds; error dialog above is shown

## What I've already ruled out

- **Not a GPU/driver issue**: reproduces identically with `LIBGL_ALWAYS_SOFTWARE=1` forcing software rendering.
- **Not a portal/D-Bus availability issue**: `xdg-desktop-portal`, `xdg-desktop-portal-gnome`, and the system D-Bus are all active and working on the host.
- **Partially related but not the cause**: the log shows `OSCrypt tried Libsecret but couldn't initialise` and `Failed to connect to the bus: ... /run/dbus/system_bus_socket`. Granting `flatpak override --user --talk-name=org.freedesktop.secrets com.mojang.Minecraft` makes the Libsecret warning disappear (gnome-keyring's Secret Service is reachable), but **the crash still happens identically afterward** - so this is a separate, secondary issue (the app likely also needs `--talk-name=org.freedesktop.secrets` declared by default in the manifest for keyring-based token storage to work at all under GNOME), not the root cause of the crash itself.
- **Not fixed by pinning an older build**: history shows a commit "Remove shared-modules/libsecret (#167)" but per that PR's own description libsecret is provided by the runtime regardless, so this isn't a regression from that change.

## Crash details

`journalctl` shows the process aborts with an uncaught `std::bad_function_call`:

```
terminate called after throwing an instance of 'std::bad_function_call'
what(): bad_function_call
```

`coredumpctl info` backtrace (thread that aborts) - the crash originates inside **`liblauncher.so`** (Mojang's own native launcher library), not in CEF/Chromium:

```
Stack trace of thread 188:
#0 ... libc.so.6 + 0x9c51c
#1 ... libc.so.6 + 0x422be
#2 ... libc.so.6 + 0x298ed
#3 ... libstdc++.so.6.0.34 + 0xb304b
#4 ... libstdc++.so.6.0.34 + 0xcc38a
#5 ... libstdc++.so.6.0.34 + 0xb2912
#6 ... libstdc++.so.6.0.34 + 0xcbb7b
#7 ... libgcc_s.so.1 + 0x2202a
#8 ... libgcc_s.so.1 + 0x22b4a
#9 ... liblauncher.so + 0x1360a3
#10 ... liblauncher.so + 0x29f2f1
#11 ... liblauncher.so + 0x29f43d
#12 ... liblauncher.so + 0x29e9c2
#13 ... liblauncher.so + 0x1e0b06
#14 RunLauncher (liblauncher.so + 0x1b270e)
#15 ... minecraft-launcher + 0x1ba9e0
#16 ... minecraft-launcher + 0x49ad9
#17 ... minecraft-launcher + 0x34ec9
#18 ... libc.so.6 + 0x2b975
#19 ... libc.so.6 + 0x2ba28
#20 _start (minecraft-launcher + 0x36bda)
```

Frames #9–#14 are all inside `liblauncher.so`, culminating in the exported `RunLauncher` symbol - this points to an unhandled/empty `std::function` callback being invoked somewhere in the native sign-in flow, not a CEF/rendering problem.

## Possibly related existing issues

This looks like the same recurring class of bug reported (with different launcher versions, over several years) in:
- #111 "Can't log in on from fresh install"
- #120 "Launcher crashes upon invocation"
- #143 "application launcher fails to complete" (login hangs/fails ~9 times out of 10)

If useful I have the full `coredumpctl` core file (16 MB, `zstd`-compressed) and can attach or share more of it on request.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the crash with the documented Flatpak install and sign-in steps, then inspect the coredump and journal output around RunLauncher in liblauncher.so. Review related issues #111, #120, and #143 and the Flatpak manifest's keyring permissions. Done would require identifying a fix for the native sign-in crash and verifying that Microsoft sign-in completes without aborting.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.