#Everest Core Branch 4171 Crash on Startup

99 messages ยท Page 1 of 1 (latest)

idle sorrel
remote vale
#

update your mods, particularly Maddie's Helping Hand

#

you can do so from olympus:

idle sorrel
#

alright

remote vale
#

thonkeline hm, i thought this was a crash related to a different cause, but i just noticed something else

#

did it work on older versions of everest?

idle sorrel
#

yes

#

4111 is the last one that works for me

#

this is especially annoying because everest is kinda forcing me into updating because mod compatibility or sumthing

remote vale
#

@barren field maddyplant would this be related to hook ordering? any idea what this could be related to?

idle sorrel
#

i was kinda just ignoring the updates because i knew they would crash but now i cant update my mods anymore

#

and i dont like that

#

last time i got told that some IL hook ordering is bugged and will be fixed soon

remote vale
#

that's why i pinged popax, asking if hook ordering could be related or something

#

can you send your log.txt?

idle sorrel
#

sure

remote vale
#

actually, idk if this could be an IL hook thing, i'll look into the source

idle sorrel
#

im just waiting for it to crash again it takes a bit

remote vale
#

the crash seems to happen in frogeline project's froghelper

idle sorrel
#

just out of curiosity, where do you see that?

remote vale
#

Susge is this a monomod crime

remote vale
idle sorrel
#

ahh

remote vale
#
   at MonoMod.RuntimeDetour.ILHook..ctor(MethodBase method, Manipulator manipulator, IDetourFactory factory, DetourConfig config, Boolean applyByDefault)
   at Celeste.Mod.Helpers.LegacyMonoMod.LegacyILHook._Refresh()
   at FrogHelper.Entities.FrogBerryShard.Load()
   at FrogHelper.FrogHelperModule.Load()

the crash seems to indicate it's FrogHelper

idle sorrel
remote vale
#

hmm i'm no expect but that orig_Update and orig_OnCollect hooks are looking mighty suspicious Susge

idle sorrel
#

let me disable froghelper and see if it starts

remote vale
#

probably will

idle sorrel
#

37 other mods depend on this mod ๐Ÿ˜ฌ

#

oh wait thats frosthelper

#

im dumb

#

i am guessing that froghelper is included in the frogeline project

remote vale
#

it is

idle sorrel
#

alright well thats not so bad

remote vale
idle sorrel
#

yeah it starts now

#

ok i can live with that

#

thanks!

remote vale
#

i wonder if this is a flaw with flp

#

not a fan of those orig_Update and orig_OnCollect hooks

barren field
#

Ok, what's going on?

remote vale
#

apparently flp2021 is crashing on latest core

#

4111 was the last core versionto work

remote vale
barren field
#

Don't think so

#

Also, uhm, I wrote that "dodgy code" 3paul

remote vale
#

3paul oh

#

why the orig hook

tulip moss
#

hey @idle sorrel could send the list of mods that you are using? if you are unsure you could disable all mods via Olympus and then send your blacklist.txt from your mod folder. I wana try to reproduce this locally

#

unless you already had some mods disabled in that case just send your current blacklist.txt ohnoshiro

idle sorrel
tulip moss
#

thanks

barren field
#

At this point you're basically the debugging wizard peaceline
I have no clue how you keep figuring these issues out, so I'm gonna let you work your magic here

tulip moss
tulip moss
#

Okay this is funny FrogHelper is having issues without any dependencies on core but on stable it works

sand jungle
#

maybe whatever that ILContext.Manipulator thing does is broken on core

tulip moss
#

Okay I pinpointed the issue

#
      FrogBerryShard.collectHook = new ILHook((MethodBase) typeof (Celeste.Strawberry).GetMethod("orig_OnCollect"), new ILContext.Manipulator(FrogBerryShard.CollectRoutineModifier));
tulip moss
#

Idk what's from reading the patch it seems broken

#

no idea how it rans on non core

#
      ILCursor ilCursor2 = new ILCursor(ctx);
      ilCursor2.GotoNext((Instruction i) => i.MatchCallOrCallvirt(typeof(HashSet<Celeste.EntityID>), "Add"));
      ILLabel AfterAdd = ilCursor2.DefineLabel();
      ILLabel AfterDelegate = ilCursor2.DefineLabel();
      ilCursor2.Emit(OpCodes.Ldarg_0);
      ilCursor2.Emit(OpCodes.Isinst, typeof(FrogBerryShard));
      ilCursor2.Emit(OpCodes.Brtrue, (object)AfterAdd);
      ilCursor2.Index += 1; // skip over callvirt before pop
      ilCursor2.Emit(OpCodes.Br, (object)AfterDelegate);
      ilCursor2.MarkLabel(AfterAdd);
      ilCursor2.Emit(OpCodes.Ldarg_0);
      ilCursor2.EmitDelegate<Func<HashSet<Celeste.EntityID>, Celeste.EntityID, Celeste.Strawberry, bool>>(((set, id, berry) =>
      {
        if (set == berry.SceneAs<Celeste.Level>()?.Session.Strawberries)
          return true; // <---- due to skipping callvirt pop will pop nothing return dummy value
        set.Add(id);
        return false; // <---- due to skipping callvirt pop will pop nothing return dummy value
      }));
      ilCursor2.MarkLabel(AfterDelegate);
      // upcoming instruction is pop...
#

original IL

#
callvirt  instance bool class [System.Core]System.Collections.Generic.HashSet`1<valuetype Celeste.EntityID>::Add(!0)
IL_00AF: pop
#

adding the lines with return true / false fixed it no core gona test on stable

#

ilCursor2.GotoNext((Instruction i) => i.MatchCallOrCallvirt(typeof(HashSet<Celeste.EntityID>), "Add")); cant find "Add" on stabe maddyS

#

mb its just a bad de-compilation, @barren field do you still have accesses to the original source code of that mod?

tulip moss
#

okay this is super cursed it's either a bug in old c# runtimesthat let this issue (popping nothing?) pass as valid IL (nope) or my de-compiler is going nuts and I am debugging garbage rn derpeline. I have new idea what's going on this patch shouldn't work

barren field
#

But yeah this makes sense

#

How did this ever work 3paul

#

I assume the delegate used to return void?

tulip moss
#

mb

#

I cant replicate it within my own mod as well

#

its realy freaky

#

btw whats OSS?

barren field
#

Open Source Software

tulip moss
#

ah I couldn't find it

#

Ill look again

barren field
#

Also, I'm a bit confused rn

barren field
tulip moss
#

not sure Ill need to look into EmitDelegate code

#

because I dont think you can dump IL patches from old monomod

barren field
#

No, like did it use to emit a delegate which returned nothing?

tulip moss
#

ah yes

#

That was the old delegate

#
          ilCursor2.EmitDelegate<System.Action<HashSet<Celeste.EntityID>, Celeste.EntityID, Celeste.Strawberry>>((System.Action<HashSet<Celeste.EntityID>, Celeste.EntityID, Celeste.Strawberry>) ((set, id, berry) =>
          {
            if (set == berry.SceneAs<Celeste.Level>()?.Session.Strawberries)
              return;
            set.Add(id);
          }));
barren field
#

Yeah that's plainly just wrong

#

I wouldn't bother debugging this further and just put it up to JIT jank

tulip moss
#

๐Ÿ‘

tulip moss
#

Aight I opened a PR for FrogHelper this should be fixed soongladeline

tulip moss
sand jungle
#

it's on @nimble mango 's github so probably it?

tulip moss
#

thanks laugheline

barren field
#

I think I have access? I wrote the code in question after all
However even then I couldn't push a new build to GB

tulip moss
#

that's a good start but we need someone with GB acsses

nimble mango
#

i mentioned it a while ago on the FLP server when i first tried core

#

making an FLP release is kind of intimidating though so i didn't probe much further

barren field
#

Guess we need to do more probing