Repository navigation
fix(linux): resolve #639 playback crashes and isolate Flutter 3.47 - #798
Merged
Merged
Conversation
…o host toolchain) Replicates .github/actions/build-linux in an Ubuntu 24.04 image. Extra packages vs CI docs (preinstalled on GitHub runners): make (mimalloc via media_kit_libs_linux), llvm (clang IPO probe), g++ (flutter_js hardcodes it). Also bundles libsqlite3 into the AppImage: package:sqlite3 dlopens 'libsqlite3.so', which does not exist on stock Ubuntu (only .so.0) — watch history is silently broken in the official AppImage/deb without it.
…loaded (AimesSoft#639 crash) VAAPI (and VDPAU) frames imported into an NVIDIA EGL context segfault in libnvidia-eglcore during player_texture_populate — the exact crash stack in issue AimesSoft#639 (hybrid AMD+NVIDIA laptop: VAAPI decodes on the iGPU, GL runs on the dGPU; reproduced with VDPAU on a desktop RTX 5060, driver 595.71.05). Keyed on /proc/driver/nvidia/version. Also migrates previously saved decoder orders, since selected_decoders persists the old default.
…ver, AimesSoft#639) next2_engine_render_gl_texture (librust_lib_nipaplay.so) segfaults inside libnvidia-eglcore on the raster thread during playback (gdb-verified on RTX 5060 / 595.71.05, Ubuntu 26.04 Wayland). Even when it does not crash, its per-frame GL rendering corrupts other textures in the shared context (green/blue frame corruption affecting every player kernel). Users can still select Next2 manually; only the default changes.
…creen, AimesSoft#639) The fork replaced upstream's isolated EGL context with 'reuse Flutter's current EGL context to avoid per-frame context switches'. That grabs whatever context is current on the platform thread at construction, while mpv_render_context_render later runs on the raster thread with Flutter's context current. mpv requires create/render on the same context; GL container objects (FBOs/VAOs) are never shared across contexts, so on NVIDIA the Libmpv kernel shows a blue screen / no video while audio and thumbnails work. Reverts linux/video_output.cc and linux/texture_gl.cc to the upstream implementation from third_party/media-kit-upstream (headers unchanged; verified 'H/W rendering with isolated EGL context', video displays).
…ang-bin/fvp#258, AimesSoft#307) player_texture_populate runs mdk::Player::renderVideo() inside Flutter's raster GL context with no state isolation from Skia/Impeller. Adds a GLStateGuard that snapshots the shared state, hands mdk clean defaults and restores everything afterwards. NOTE: unproven on the machine used for AimesSoft#639 diagnosis — the dark/bright symptom there turned out to be the Flutter 3.44 compositor (see PR). Kept because it is harmless and may matter on other setups (AimesSoft#307, wang-bin/fvp#258). mdk-sdk download artifacts are gitignored.
…icker) Flutter 3.44.x's GTK compositor (fl_compositor_opengl.cc) causes a dark/bright alternating flicker during video playback on Linux that stops whenever additional UI layers/windows repaint (single-layer glBlitFramebuffer fast path vs shader+blend composite; frames handed to GTK's paint context with only glFlush, no fence). The compositor rework that fixes it landed after the 3.44 branch cut and is not in stable 3.44.8; 3.47.0-0.3.pre is the first beta containing it. desktop_multi_window is adapted to 3.47's renamed internal windowing API (preferredSize/preferredConstraints -> size/constraints, 'decorated' removed) — this is why the branch no longer compiles on 3.44.x.
MCDFsteve
marked this pull request as ready for review
July 31, 2026 13:32
MCDFsteve
approved these changes
Jul 31, 2026
MCDFsteve
left a comment
Collaborator
There was a problem hiding this comment.
已合入最新 main,并将 Flutter 3.47 与 vendored 依赖隔离到 Linux;主线 3.44.6 和 HarmonyOS 3.35.8 保持独立。依赖解析、静态分析、完整测试及编译级验证均已通过。
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
合并摘要
解决 #639 中 Linux/NVIDIA 环境下叠加出现的播放崩溃、画面损坏、闪烁和 Libmpv 蓝屏问题,并保留原调查分支中针对 #307 的相关修复。
为可合并所做的整理
main(cb4cd8d2),解决原分支基于 v1.11.2 导致的冲突和功能落后。3.44.6。3.47.0-0.3.pre,通过.flutter-version-linux和pubspec_overrides.linux.yaml隔离依赖。3.35.8-ohos-1.0.1和pubspec_overrides.ohos.yaml。desktop_multi_window_linux_347兼容层;主线 3.44 和鸿蒙代码不受其内部 API 变化影响。验证
3.47.0-0.3.pre下 Linux 专属依赖解析成功。flutter analyze:0 issue。flutter build bundle --no-pub成功。actionlint。本次整理保留了原调查提交的一问题一提交结构,同时消除了原先“不适合合并”的全局 Flutter 升级、旧主分支基线和跨平台依赖污染问题。
Fixes #639.