Conversation
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
Member
Author
|
Поглощён #33. Разделять их оказалось нельзя: миграция на Rinku 3 ломает |
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 #31.
Результат
Обходной путь с
browser-preload-enabled=falseиз #31 больше не нужен.Главное: мина была наша, не в Rinku
CefUtilMixinподмешивал вCefApp.startupфлаг--use-gl=desktop, удалённый из Chromium несколько лет назад. Пока Rinku тянул старый Chromium, флаг проходил незамеченным. На Chromium 151 из Rinku 3 он валитCefApp.startup, CEF уходит вINITIALIZATION_FAILED, браузер не создаётся вообще:Это не миграция сломала мод — она подорвала то, что лежало в коде и рвануло бы при любом обновлении Chromium. Остальные флаги проверены и оставлены:
--enable-gpu-rasterizationи--disable-gpu-vsyncвалидны,--enable-oop-rasterization— no-op, но безвредный.Миграция API
com.cinemamod.mcef.MCEFde.keksuccino.rinku.Rinkucom.cinemamod.mcef.MCEFBrowserde.keksuccino.rinku.RinkuBrowsercom.cinemamod.mcef.CefUtil(цель миксина)de.keksuccino.rinku.util.CefUtilgetTextureLocation()getTextureIdentifier()mcef_versionrinku_versionОбошлось 12 файлами механической замены:
RinkuInitListener— функциональный интерфейс, поэтому лямбдыscheduleForInitне тронуты;RinkuBrowser extends CefBrowserOsr, поэтомуsetFocus/getURL/executeJavaScript/loadURL/setZoomLevelнаследуются;CefUtil.init()всё ещё зовётCefApp.startup(String[]), так что@ModifyArgпережил переезд.Обход апстримной непоследовательности упаковки
NeoForge-сборки Rinku 3.0.4 различаются между собой: у 26.2 классы лежат сверху, а у 1.21.1, 1.21.11 и 26.1.2 это jarJar-обёртки с настоящим модом внутри
META-INF/jarjar/. В рантайме NeoForge распаковывает сам, а javac видит пустой jar. Сборка теперь компилируется против того, где реально лежат классы; опубликованный артефакт остаётся на runtime-classpath нетронутым. Стоит завести баг у Keksuccino.Проверено
Все 7 таргетов собираются. End-to-end на 1.21.11-fabric и 26.2-neoforge, по 10/10: CEF инициализируется, страница грузится, мост инжектится, каналы page→game доходят до мода, GUI переоткрывается без краша, скриншот снимается.
Проверка гонялась стендом webgui-testkit — тем же, что нашёл исходный краш.