Emulator Issues #10965


Gecko codehandler trampoline causes crash with JitArm64

Added by retroben almost 6 years ago. Updated over 3 years ago.

% Done:


Operating system:
Issue type:
Relates to usability:
Relates to performance:
Relates to maintainability:
Regression start:
Fixed in:


Legend of Zelda, Twilight Princess


Happens in this game but also in any game with any kind of Gecko code enabled on 5.0-6683 crashes (regardless of Ubershader settings),I ran this game fine prior to enabling a Gecko code to test it and Action Replay works fine with Sonic Heroes and also OnFrame works too with Zelda TP for the Hyrule Field Speed Hack still being enabled with it because I never bothered to check if that just works without intervention.
I even tried replacing the needed codehandler/totaldb files with updated ones but still end up with app crashes before games can boot.

Simply create the GZ2E01.ini within GameSettings while having totaldb.dsy and codehandler.bin in the dolphin folder directory and add this code that uses a button activator then don't even press the button,the result is Dolphin still crashes out despite the enabled Gecko code never being invoked via activator.

283DD31A 00000020
043A3EF8 02D8FF00

I unfortunately don't know what last version had Gecko codes working,but my last build was 5.0-6566.

A previous build beyond 5.0 stable had Gecko codes working,though the exact build is unknown.

This is on the same old Shield TV Pro stock/non-rooted but on OTA 6.3 with no OTA upgrade related malfunctions besides the keyboard app replacement bug.

This should be incredibly easy to reproduce hopefully.


GZ2E01.ini (1.22 KB) GZ2E01.ini retroben, 03/26/2018 12:02 PM
GZLE01.ini (919 Bytes) GZLE01.ini retroben, 03/26/2018 12:25 PM
GZLE01.ini (59 Bytes) GZLE01.ini retroben, 03/26/2018 12:59 PM
Actions #1

Updated by retroben almost 6 years ago

Same thing happening on 5.0-6566 and 5.0-6400 with it DAMN crashing!
An old debug version of Dolphin works fine with the Gecko codes using a Wind Waker code you may know about...

Code titled Real is the code that makes the game run at 60fps double pace.
Harmless on the old debug Dolphin but crashes on all mentioned versions.

Actions #2

Updated by retroben almost 6 years ago

I think it may have been one of the last of pr3935 builds that was early Vulkan testing which has the Gecko code for Wind Waker confirmed working on it.
Though that version is WAY too old. :(

Actions #3

Updated by retroben almost 6 years ago

Both 5.0-6335 and 5.0-5305 also crash.
Though 5305 has no error message.

Really hate the lack of a proper edit button on this site.

Actions #4

Updated by retroben almost 6 years ago

Even a super old 5.0-1418 is causing it to crash,and even if I make a fresh ini file with just the one code for 60fps double pace.

044C8D44 000A4CB8

Actions #5

Updated by retroben almost 6 years ago

Even an extra old 5.0-700 is stupidly failing to work with Gecko codes.
How did everyone miss this?!? (is it just an issue on my end just to make me not get any sleep and torture me!)

Sure,the code tested can be used as an Action Replay code,but how the hell are we supposed to use dedicated ASM modding Gecko codes with this happening no matter what version is used other than the now ancient pr3935 debugger build?!?
Have yet to try just as ancient 4.0 builds but that is just about as bad as using the special pr3935 build.

Actions #6

Updated by retroben almost 6 years ago

Finally got a version where the cheat works as Gecko in master branch.
Its Dolphin 5.0-369 which works.

On Dolphin 5.0-700,it crashes when Gecko is used.
I swear that I used Gecko codes with no problems somewhere beyond these versions,...before I got rid of my Shield TV OTA 5.0.2 version.

Still doesn't explain why its a troll and that elderly version along with pr3935 both work with the Gecko code setting.

Someone please investigate and fix this RUBBISH bug.

Actions #7

Updated by kanepyork almost 6 years ago

Thanks for doing that testing, but that seems to be an odd bisection result.

Can you check for a more recent good build? Of particular interest are 5.0-4575 ("Improved gecko codehandler") and the build immediately before it, 5.0-4572 .

If that doesn't turn up anything, can you finish the bisect? Take the average of 369 and 700 = 534, and test the build closest to that number. Repeat until you have the exact good->bad transition.

Actions #8

Updated by retroben almost 6 years ago

Found the one that broke it.

Dolphin 5.0-619;
Interpreter/CachedInterpreter/JitArm64: Fix CoreTiming::Advance usage (PR #4201 from EmptyChaos

Version that still works with the simple Wind Waker code that causes double paced 60fps to happen is 5.0-615 which allows the code to work.
From testing these old build,it reminds me that there was a frustrating change on newer builds which removed the ability to exit the app with the back button,not even having a popup message to ask if you are sure you want to exit.
I am forced to use the Home button which makes me have to re-navigate back to settings->apps to get back where I was.

Hopefully the solution could be just to adjust how the timing is on the Gecko codes part without touching the actual changes so it would only need the Gecko part itself to be fixed to be compatible with this commit and onwards via Android.

Guessing this build's commit was solely for Android while Windows and other x86 chipsets should still work just fine. (at least on recompilers)

Please look into fixing this,I went through the trouble of viciously beating down my Shield TV Pro's life cycle with constant installs/uninstalls to figure this out on top of file adding/deleting to remove other build apk files to reduce clutter.

Actions #9

Updated by retroben almost 6 years ago

Just tested both 4572 and 4575 and both exit instead of booting the game when that same Wind Waker double paced 60fps Gecko code is enabled.

That code btw is non-ASM and is instead a real-time value that the game reads in order to determine fps and pacing and uses the 00149970=30fps 000A4CB8=60fps values.

Before testing in 4575,I deleted the shader cache to avoid the instant crash risk caused by shader stability frustrations. (most random crashes in older builds are because of shaders for some odd/dumb reason)

044C8D44 000A4CB8

^ The exact thing I used in a new dolphin-emu folder with the required codehandler.bin and totaldb.dsy files included and the Config->Dolphin.ini enabled cheats=false set to True,the GameSettings folder newly created and a new file with GZLE01.ini and the cheat above added to it with a space on the bottom as people are told to do.

Sorry if I am being overly obvious,just pointing out EXACTLY what I did to test those later builds. (4572 was crashing with my pre-existing folder for some reason before even entering the app until I allowed a fresh folder to be made and used)

Actions #10

Updated by retroben almost 6 years ago

Forgot about this fact,the space saving versions of mods for Brawl are unplayable without Gecko codes,which IMO is the most important part of this issue aside from Gecko ASM patch codes being unusable and apparently being stuck with Action Replay's 40 line limit despite Super character codes going beyond that line count.

I had Super Smash Bros. Infinite running on Dolphin Android a long while back but only after I created a custom cheat list with the needed codes because the other GeckoOS .dol/.elf method wasn't working at all as it was only running vanilla Brawl despite my best attempts and it would take another whopping 8GBs of space if I used a patch if I wanted to keep the original version around because of how massive Brawl is due to SubSpace Emissary and the videos themselves.

I guess one could use the programs made to convert stuff into much smaller file-types to create the smaller Brawl setup from wiping the other over 50% of it away,but those tools don't have convenient Android ports to avoid needing to transfer stuff from a PC manually after running the .exe executables and doing the things to shrink its storage capacity.

I set up Super Smash Bros. Infinite directly from my Shield TV Pro so I could,by choice,play as Lanky Kong or Goku or Waluigi or many other hilarious/cool characters for added fun that regular Brawl doesn' provide on its own.

This was a time where I had no proper PC access to do much and at one point ShieldTV had an upgrade which added the horrendous USB adopting feature which held massive risks of losing read/write access to your media storage drives once they are hooked in.
ES File Explorer may take part in the sabotage,and I know in my first witness of it that a sideloaded YouTube app already snuck its way in to adopting my storage against my will,thus making it unusable for its original design.

Sorry for the rant,its incredibly difficult to manage files now since that horrid USB update long ago,but luckily I now have access to a PC/laptop with Air based file transfers which allows me to avoid USB storage altogether but will always have its own risks like the hundreds of users who end up with broken files on FTP and other web based file management modes.

I recommend Airdroid along with sideloading the Android app in order to make it even work as it almost works perfectly fine at least when using the Windows end to upload to/grab files from the device (Android end is broken because of a forced update on Windows) and I have yet to hit any roadblocks or corrupted files from it,though I dislike those forced updates on the Windows part of it but at least it still works fine.

Actions #11

Updated by JosJuice almost 6 years ago

  • Milestone set to Current
  • Regression changed from No to Yes
  • Regression start set to 5.0-619
Actions #12

Updated by retroben almost 6 years ago

Anything new on this?

I should check newer builds to see if something has changed,though I don't remember seeing a Gecko related commit message so far.

Actions #13

Updated by retroben almost 6 years ago

Gecko codes still prevent games from booting on 5.0-7918.

A refresher;

Make this GZLE01.ini file in the GameSettings folder and add those codes.
The result should be Wind Waker running at double pace 60fps but Gecko refuses to let the game even begin to boot while Action Replay works fine with the same exact address and no such issue.
Set $Real in Gecko_Enabled to get the issue,otherwise set $Deal in ActionReplay_Enabled to see the code function as intended.

GZLE01.ini |

044C8D44 000A4CB8

044C8D44 000A4CB8

Really wish this issue would be fixed eventually.

Actions #14

Updated by JosJuice over 3 years ago

  • Subject changed from 5.0-6683 Android: Gecko codes cause crashing regardless of code/s. to Gecko codehandler trampoline causes crash with JitArm64
  • Status changed from New to Work started
  • Assignee set to JosJuice

The issue caused by 5.0-619 (#9792) was fixed in 5.0-845. However, the new solution in 5.0-845 does not work with the AArch64 JIT because it does not support HLE hooks. So the proper solution should be to add support for HLE hooks.

Actions #15

Updated by JosJuice over 3 years ago

  • Status changed from Work started to Fix pending
Actions #16

Updated by JosJuice over 3 years ago

  • Status changed from Fix pending to Fixed
  • Fixed in set to 5.0-12964
Actions #17

Updated by retroben over 3 years ago

I can't even begin to boot a game on that build,it immediately gives me a "has stopped" crash error right before closing due to most likely modern Android nonsense (especially judging SAF/Scoped Storage) making things way too difficult.

I even tried renaming and then placing the old folder elsewhere then uninstalled and reinstalled the build fresh but games still won't even begin to attempt to boot for whatever reason.

Still on the same OTA version 6.3/Android 7.0 Nougat too.
A now very old alpha build I still have installed boots games just fine.

OpenGL backend is saying "OGL Extension PinnedMemory is not supported"

Vulkan backend is saying the following about swapchain failure as part of the log I captured;

51:21:547 ../../../../../../Core/VideoBackends/Vulkan/VulkanContext.cpp:458 I[Video]: Enabling extension: VK_KHR_swapchain
51:21:633 ../../../../../../Core/VideoBackends/Vulkan/VulkanLoader.cpp:220 E[Video]: (CreateSwapChain) vkCreateSwapchainKHR failed: (-1000000000: VK_ERROR_SURFACE_LOST_KHR)
51:21:633 ../../../../../../Core/Common/MsgHandler.cpp:115 E[MASTER]: Question: Failed to create Vulkan swap chain.
51:21:643 ../../../../../../Core/Common/FileUtil.cpp:138 I[COMMON]: Delete: file /storage/emulated/0/Android/data/org.dolphinemu.dolphinemu/cache/Shaders/Vulkan-Pipeline-6FFF40.cache

Actions #18

Updated by JosJuice over 3 years ago

Please create a new issue report for that problem, and include what the first broken version is.

Actions #19

Updated by retroben over 3 years ago

Can confirm a Gecko code for Wind Waker that makes the game go double speed 60fps is now working instead of invoking the usual Gecko codes crash as of 5.0-13001's fix to that other crash I was having.


Also available in: Atom PDF