Skip to content

Mill application startup issue#1052

Draft
calcitem wants to merge 2 commits into
masterfrom
cursor/mill-application-startup-issue-4d2d
Draft

Mill application startup issue#1052
calcitem wants to merge 2 commits into
masterfrom
cursor/mill-application-startup-issue-4d2d

Conversation

@calcitem
Copy link
Copy Markdown
Owner

📜 Description

Addresses startup failures for the Mill app when installed via Snap on Linux (e.g., Pop!_OS). This includes resolving GTK2/GTK3 module conflicts and ensuring proper X11 thread initialization.

💡 Motivation and Context

Users reported the Mill app failing to launch via Snap, presenting a black screen and console errors related to:

  • GTK+ 2.x and GTK+ 3 module conflicts (libcanberra-gtk-module.so).
  • Xlib not being thread-safe.
  • GLArea and FlKeyboardManager assertions.
    These issues are primarily caused by Snap's environment injecting incompatible GTK2 modules and the lack of early X11 thread initialization in the Flutter Linux runner.

💚 How did you test it?

  • Verified new Snap launch script syntax and behavior to ensure correct cleaning of GTK_MODULES and GTK_PATH.
  • Ran repository's formatting script.
  • Attempted a full Linux Flutter build, but it could not be completed due to missing build dependencies in the cloud environment (e.g., ninja, clang++, gtk+-3.0 dev packages). The changes compile successfully in isolation.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

  • Integrate this fix into the CI/CD pipeline for Snap builds.
  • Consider adding comprehensive automated tests for Snap startup on Linux.
  • Update documentation regarding Snap installation and potential environment variables.
  • Investigate and resolve cloud environment build dependency issues to enable full Linux Flutter build verification.
Open in Web Open in Cursor 

The snapped Linux build could inherit GTK module settings that
load GTK 2 canberra modules into the GTK 3 Flutter process.
This adds a launch wrapper that strips incompatible GTK entries
before startup and initializes X11 threading earlier to avoid
follow-on renderer assertions.

Co-authored-by: Calcitem <calcitem@outlook.com>
@cursor
Copy link
Copy Markdown

cursor Bot commented Mar 12, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Pop!_OS systems with NVIDIA PRIME can fail to create an
OpenGL context inside the confined snap runtime, which aborts
the Flutter engine during startup. Default the snap launcher
to Flutter's software renderer so affected systems can start,
while still allowing explicit renderer overrides.

Co-authored-by: Calcitem <calcitem@outlook.com>
@sonarqubecloud
Copy link
Copy Markdown

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.

2 participants