Skip to content

Rinku 3.0.4: краш GUI на 26.2, несуществующий флаг Chromium, dev-сервер и объявление зависимости - #35

Merged
KoSHeroff merged 4 commits into
mainfrom
fix/dev-server-26
Sep 8, 2026
Merged

KoSHeroff merged 4 commits into
mainfrom
fix/dev-server-26

Conversation

@KoSHeroff

Copy link
Copy Markdown
Member

Closes #28. Closes #29. Closes #31. Closes #34.

Заменяет #33, который GitHub закрыл автоматически вместе с удалённой базовой веткой после мержа #30. Содержимое то же, база теперь main.

Вобрал в себя #32: тот PR отдельно нежизнеспособен, потому что миграция на Rinku 3 ломает runServer на 1.21.11-neoforge, а чинит это уже коммит про dev-сервер.

Что чинится

было стало
Краш клиента на 26.2 после нескольких открытий GUI падал на 4-м цикле 25/25
Игра на NeoForge без браузерной библиотеки краш на старте понятный экран FML + лаунчер ставит сам
Браузер на современном Chromium INITIALIZATION_FAILED работает
runServer на 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 запустит публикацию.

Кирилл Гринев 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
@KoSHeroff
KoSHeroff merged commit aaaed17 into main Sep 8, 2026
16 checks passed
@KoSHeroff
KoSHeroff deleted the fix/dev-server-26 branch September 9, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment