Rinku 3.0.4: краш GUI на 26.2, несуществующий флаг Chromium, dev-сервер и объявление зависимости - #35
Merged
Merged
Conversation
added 4 commits
September 8, 2026 19:02
Fixes the 26.2 client crash: with Rinku 2.2.1 a GUI open/close loop died on the fourth iteration with "Texture view Sampler0 (MCEF Browser Texture 1x1) has been closed!", and on 3.0.4 the same loop runs 25 times with the browser preload pool left enabled. The API move is mostly mechanical — com.cinemamod.mcef.MCEF becomes de.keksuccino.rinku.Rinku, MCEFBrowser becomes RinkuBrowser, the mixin follows CefUtil to de.keksuccino.rinku.util, and getTextureLocation is now getTextureIdentifier. Three things kept it small: RinkuInitListener is a functional interface so the scheduleForInit lambdas are untouched, RinkuBrowser still extends CefBrowserOsr so setFocus/getURL/ executeJavaScript/loadURL/setZoomLevel come along for free, and CefUtil.init still calls CefApp.startup(String[]) so the GPU-flag ModifyArg survives the move. mcef_version is renamed to rinku_version since MCEF is gone from the project entirely. CefUtilMixin no longer injects --use-gl=desktop. That flag was removed from Chromium years ago; it slipped through while Rinku shipped an older build, but against Chromium 151 it fails CefApp.startup outright, so CEF reached INITIALIZATION_FAILED and no browser was ever created. It was our own mine, not something the migration broke — any Chromium bump would have set it off. Rinku publishes its NeoForge builds inconsistently: 26.2 carries classes at the top level while 1.21.1, 1.21.11 and 26.1.2 are jarJar wrappers whose real mod sits in META-INF/jarjar/. NeoForge unpacks that at runtime, but javac sees an empty jar, so the build now compiles against whatever actually holds the classes and leaves the published artifact on the runtime classpath untouched. All seven targets build. Verified end to end on 1.21.11-fabric and 26.2-neoforge: CEF initializes, the page loads, the bridge is injected, page-to-game channels arrive, and the GUI reopens without crashing. Closes #28 Closes #31
Both Minecraft 26 dev servers died during mod loading:
ModLoadingException: Rinku (rinku) has failed to load correctly
java.lang.NoClassDefFoundError: net/minecraft/client/gui/screens/Screen
Rinku is a client-side library, and NeoForge's dev dist cleaner strips
the client classes it constructs against. A plain runtimeOnly dependency
feeds both dev runs, so runServer loaded it and died. Production was
never affected — WebGUI does not declare Rinku in neoforge.mods.toml, so
a real server never loads it — which is why this only ever bit
developers, and only on 26.x where Rinku's builds are not dist-safe.
The obvious fix does not work: moddev has dropped per-run classpaths on
modern Minecraft, and clientAdditionalRuntimeClasspath answers "no
additional classpath anymore for Minecraft 1.21.11". So Rinku now stays
off the runtime classpath entirely and reaches the client run as a jar
in its mods folder, installed by a task bound to runClient alone. That
also matches how the mod is actually used: a player installs Rinku, a
server operator does not.
Minecraft 26 gets the server smoke test in CI as well. The dev server
was broken on both 26 targets for months only because nothing ever
booted one there.
Verified: both 26 servers reach "Done" with WebGUI initialised, 1.21.1
and 1.21.11 servers still do, and the 26.2 client still brings up
Chromium and the page bridge with Rinku coming from the mods folder.
Closes #29
Covers the whole stack: the Rinku rename and dependency refresh, the Rinku 3.0.4 migration with its 26.2 crash fix, and the dev server fix. The upgrade is not transparent for everyone, so the entry says who has to act. Rinku's mod id changed from mcef to rinku, and WebGUI bundles it on Fabric via jar-in-jar but not on NeoForge — so Fabric players do nothing while NeoForge players must swap the jar in their mods folder. The README claimed NeoForge "needs no extra dependencies", which was never true: nothing bundles the browser library there. The installation steps now say so per loader.
Installing WebGUI alone on NeoForge kills the game during mod loading:
@mixin target com.cinemamod.mcef.CefUtil was not found
NoClassDefFoundError: org/cef/handler/CefDisplayHandler
at land.webgui.WebGUIMod.<init>
Reproduced on the released 1.6.2 from Modrinth with Prism, so this is
not a regression — it is shipping today. WebGUI declared the browser
library nowhere: not in neoforge.mods.toml, not in the Modrinth version
metadata, and nothing is bundled into the NeoForge jar. So the launcher
installs nothing, FML does not know the mod is needed, and the player
gets a crash report instead of a missing-dependency screen.
Fabric was never affected: there the library rides inside the jar via
jar-in-jar, which is why it feels like it installs itself.
Declaring it required does both jobs — launchers resolve and install
Rinku, and a hand-copied install fails with FML's readable screen rather
than a stack trace. Bundling it with jarJar the way Fabric does is worth
considering too, but Rinku's NeoForge artifacts are themselves jarJar
wrappers on several versions, so that needs more care than a one-liner.
Refs #34
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.
Closes #28. Closes #29. Closes #31. Closes #34.
Что чинится
INITIALIZATION_FAILEDrunServerна 26.x и 1.21.11-neoforgeЧетыре находки
1. Краш GUI на 26.2 (#31).
Texture view Sampler0 (MCEF Browser Texture 1x1) has been closed!— детерминированно на 4-м открытии, независимо от задержки перед закрытием. Rinku 3.0.4 его снимает; обходной путь сbrowser-preload-enabled=falseбольше не нужен.2. Мина в нашем коде.
CefUtilMixinподмешивал вCefApp.startupфлаг--use-gl=desktop, удалённый из Chromium несколько лет назад. Пока Rinku тянул старый Chromium, он проходил незамеченным; на Chromium 151 валит инициализацию CEF целиком. Рвануло бы при любом обновлении Chromium, независимо от этой миграции.3. Игра падала на старте на NeoForge (#34). Воспроизведено на релизной 1.6.2 с Modrinth в Prism: библиотека не была объявлена нигде — ни в
neoforge.mods.toml, ни в метаданных Modrinth, ни вложена в jar. Лаунчер не ставил ничего, FML не знал, что мод нужен, пользователь получалNoClassDefFoundError: org/cef/handler/CefDisplayHandlerвместо экрана «не хватает мода». Fabric не затронут — там библиотека внутри jar.4. dev
runServer(#29). Rinku попадала в runtime обоих dev-ранов. Аккуратного решения не нашлось: moddev убрал per-run classpath на современных Minecraft. Теперь она не на classpath вовсе, а приезжает в клиентский ран jar'ом вrun/mods— что заодно точнее моделирует продакшн.Миграция API
com.cinemamod.mcef.MCEF→de.keksuccino.rinku.Rinku,MCEFBrowser→RinkuBrowser, цель миксина →de.keksuccino.rinku.util.CefUtil,getTextureLocation()→getTextureIdentifier(), свойствоmcef_version→rinku_version.Обошлось 12 файлами механической замены:
RinkuInitListener— функциональный интерфейс,RinkuBrowser extends CefBrowserOsr,CefUtil.init()всё ещё зовётCefApp.startup(String[]).Обход апстримной непоследовательности
NeoForge-сборки Rinku 3.0.4 упакованы по-разному: у 26.2 классы сверху, у 1.21.1, 1.21.11 и 26.1.2 это jarJar-обёртки. В рантайме NeoForge распаковывает сам, javac видит пустой jar — сборка компилируется против того, где реально лежат классы.
CI
smoke: trueдобавлен обоим таргетам MC 26. Баг с dev-сервером прожил месяцы ровно потому, что там никто не поднимал сервер.Проверено
Все 7 таргетов собираются. Стендом mc-webgui/testkit, по 10/10 на 1.21.11-fabric и 26.2-neoforge: CEF инициализируется, страница грузится, мост инжектится, каналы page→game доходят, GUI переоткрывается без краша, скриншот снимается. Серверы: 26.2, 26.1.2, 1.21.11-neoforge, 1.21.1-neoforge — все стартуют.
Не проверено: подтянет ли лаунчер Rinku по объявленной зависимости на реальной установке. Локально подтверждено только то, что зависимость попала в jar.
Версия
mod_version= 1.7.0, CHANGELOG заполнен. Мерж вmainзапустит публикацию.