#Death during custom transistion

127 messages · Page 1 of 1 (latest)

vivid lynx
#

The image is immediately after the bug, no variants, and I couldn't do anything except move

#

The crash occurs after alt+f4'ing to exit the map

final iris
#

@dusky charm fuckfuckfuckfuckfuck

#

this is the same crash as #1252745586357047334 and #1252742233803985016

#

i have no clue how this would conflict

#

@gaunt flax hi so

#

we suspect this is related to the new extended variant

#

i have no clue how this would cause things to go wrong

vivid lynx
#

fyi, before I alt-f4'd out of the game, the only thing I could do was walk, I couldn't even pause

#

oh I can't enter specific other maps like mauve and my own map either

final iris
#

can you downgrade extended variants one version

vivid lynx
#

ok

gaunt flax
#

do we know which method it crashes on?

final iris
#

it crashes in DashCoroutine

#

this is a certified monomod moment however

#

ughhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

#

i have no fucking clue why there would be a DynamicMethod there

#

very angry landeline

#

mm is such a mess

vivid lynx
#

it worked

#

downgraded extended variants and I can now play the game

final iris
#

one second, i am going to curl up in a corner and fucking sob snip_sob

#

h o w

#

how does this happen

gaunt flax
dusky charm
#

This is what code modders have to deal with in an emergency catplush

final iris
#

i will be so mad if thats the case

#

why even a dynamic method??? what did i do differently

#

do they mean a delegate???

#

i am so fucking confused

gaunt flax
#

well, the crash is in the MatchCall extension method maddyS

dusky charm
#

Note that gravity helper does not use reorg

final iris
#

well yes

#

...wait

#

wait wait wait wait

vivid lynx
#

I will test if the same thing will break the game again

final iris
#

i have an idea

gaunt flax
#

it means there's a call <DynamicMethod> instead of call <MethodReference> here

final iris
#

is it this ref

gaunt flax
#

it might be yeah

final iris
#

is this ref fucking everything up

#

i am so

#

give me one minute

#

i will test build this

gaunt flax
vivid lynx
#

ok dying during that transistion now just causes a crash, and doesn't permanently crash it

final iris
#

@gaunt flax can i delete the delegate declaration

gaunt flax
#

yeah 👍

dusky charm
#

Gravity helper is just the scapegoat since it appears at the top of the stack trace pausefrogeline

final iris
#

nnot really

#

it was more like mm

gaunt flax
#

well, Samah is getting the pings

dusky charm
#

^

final iris
#

i'm so sorry

dusky charm
#

I’m on the bus and have nothing better to do pausefrogeline

#

Imagine if monomod weren’t flaky af

final iris
#

so

#

moral of the story

#

if you wanted to be fancy and emit a delegate with a ref parameter

#

uh

#

don't!

dusky charm
#

Are we good now?

final iris
#

iiim making a build for testing

#

this happens with just gh and extvars right

dusky charm
#

Okay, then we just have to wait while people who don’t have auto update enabled make more tickets

#

“Then” in this context meaning after you release a fix

final iris
#

how do i reproduce the crash

gaunt flax
#

I withdrew the update so extended variants will cease to exist for 5 minutes, don't worry

stone lion
dusky charm
#

🐌

final iris
#

heres the new ver

#

(me when the comment at line 43 lies)

dusky charm
#

DashDir should be checked with > 0 or it won’t handle 360 dashing… right?

final iris
#

i dont have a controller or a way to test this

#

make sure to not update mods else this will make the issue resurface

vivid lynx
#

do I replace the current ext var with this?

final iris
#

yes

stone lion
final iris
#

sorry if im acting hectic, im like really stressed

#

and its like 0:45 snip_sob

gaunt flax
#

Well, I can withhold the release until tomorrow, I'm going to bed as well ^^'

final iris
#

<insert mild panic>

vivid lynx
#

do you want me to mimic the same crash of the transistion?

final iris
#

do whatever you did before to crash

vivid lynx
#

hecc it auto-updated

#

despite me telling olympus to not do that gladeline

stone lion
#

do you also have auto updates turned on in game

vivid lynx
#

idk, I'll check after doing the extended variants thing again

final iris
#

did it show the cog wheel in the top left when opening everest

vivid lynx
#

for a small amount of time, yes

stone lion
final iris
#

then turn off auto mod updates in mod options

#

snail

vivid lynx
final iris
#

having gone through hundreds of #953393160464269402 questions it is in my habit to explain everything to people

vivid lynx
#

it works

final iris
#

because if i don't then someone will be like "wdym" after 30 minutes and i have to waste more time explaining to them what to do

solid kindle
#

Am trying this now with my crash will update on whether it works

vivid lynx
#

although the bug that started this is still very real (I am pressing pause repeatedly at the end)

final iris
#

discord skill issue

#

it doesn't understand mkvs (still, ffs)

vivid lynx
#

I'll convert it

solid kindle
#

It worked! catpogatthephone

final iris
#

banger

#

okay im getting one more person to test it

vivid lynx
stone lion
#

yea i think it's known that dying there can cause weird issues

vivid lynx
#

it's extremely funny

final iris
#

i'll make a pr

uneven siren
#

oh it makes a lot of sense actually

#

for the curious ones on why does this hell happen

#

tldr: the delegate was not static and byref params dont work well with instance delegates

#

in more detail, in EmitDelegate theres two major cases: static and not static
in the first case the method is emitted and thats properly matched from a MethodInfo to a MethodReference that cecil needs
in the latter case, non static delegates, we attempt to go through the fast delegate invokers, which basically facilitates calling non static methods because of the need to hold an instance.
that generates a dynamic method definition and the Instruction.Create wrappers from monomod contain an edge case for DynamicMethods where it wont try to import them (because theres nothing to import), thus causing it to hold a DynamicMethod in the operand of a call

#

then anything that assumes that call operands should always be MethodReferences (which is a correct assumtion btw) will blow up

#

the bigger issue now is why the heck does removing a ref make all of that not happen

#

found it!

#

turns out that obtaining the invoker in FastDelegateInvokers.GetDelegateInvoker will first try to use one of the pregenerated (via source gen) invokers, which are only available for up to 16 parameters that are not byref, thus when using ref that shortcut cannot be used and it falls back to a DynamicMethod because otherwise it would get one of those generated methods which are not DynamicMethods thus they will be properly imported

#

ngl this should probably be reported to monomod