#Celeste Publicizer did a funny

37 messages · Page 1 of 1 (latest)

odd spruce
#

I had a working entity about a year ago, and recently tried it out after upgrading to Core, and it seems to have broken with an inscrutable error message.

System.ArgumentException: Undefined resource string ID:0x80070057
   at Celeste.Mod.ClonazepamHelper.Entities.OverlayManager.Unload(String tag)
   at Celeste.Mod.ClonazepamHelper.Entities.FestivalController.<>c__DisplayClass8_0.<TransitionRoutine>b__2()
   at Monocle.Scene.AfterUpdate()
   at DMD<System.Void Monocle.Engine:Update(Microsoft.Xna.Framework.GameTime)>(Engine this, GameTime gameTime)
   at ExtendedVariants.Variants.NoFreezeFrames.onEngineUpdate(orig_Update orig, Engine self, GameTime gameTime)
   at Hook<System.Void ExtendedVariants.Variants.NoFreezeFrames::onEngineUpdate(On.Monocle.Engine+orig_Update,Monocle.Engine,Microsoft.Xna.Framework.GameTime)>(Engine , GameTime )
   at SyncProxy<System.Void Monocle.Engine:Update(Microsoft.Xna.Framework.GameTime)>(Engine , GameTime )
   at Celeste.Celeste.Update(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.Game.RunLoop()
   at Microsoft.Xna.Framework.Game.Run()
   at Monocle.Engine.RunWithLogging()

The Unload function is as follows:

public static void Unload(string tag) {
    if (tag == null) {
        throw new ArgumentException("Tag must not be null");                                                                             }
    var player = Engine.Scene.Tracker.GetEntity<Player>();
    foreach (var entity in TaggedEntities(tag)) {
        if (entity is Trigger t && t.PlayerIsInside && player != null) {
            t.OnLeave(player);
            player.triggersInside.Remove(t);
        }
        entity.RemoveSelf();
    }
}

Which is itself being called by: this.Level.OnEndOfFrame += () => OverlayManager.Unload(oldRoom);

Not sure what to make of this error message. Any pointers?

#

Linux/x86_64, everest 4607

odd spruce
#

Bumping this in the hopes that someone who knows what’s up will see it…

astral apex
#

That Undefined resource string ID:0x80070057 isnt from an error message, but rather the runtime not being able to find the string
I assume tag was null and your exception was thrown

#

however i dont know why it might not find the string

odd spruce
#

I think that's not the issue

#

I think this is an issue with the private member access player.triggersInside

#

I determined this by realizing that it was also crashing in a different method, an entity constructor which not only threw no exceptions but also used no string literals

#

and then removing the private member access made everything work

astral apex
#

No that should work thinkeline

dark sierra
#

That error ID is ERROR_INVALID_PARAMETER btw, and considering it seems to break resource localization I have a feeling this is the JIT throwing an exception during method compilation which is so rarely seen that they didn't implement it right catresort

#

Can you try to manually compile the method using RuntimeHelpers.PrepareMethod and see if that throws?

odd spruce
#

teehee

#
System.ArgumentException: Undefined resource string ID:0x80070057
   at System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(RuntimeMethodHandle method, RuntimeTypeHandle[] instantiation)
   at Celeste.Mod.ClonazepamHelper.Entities.BouncyBooster.Load() in Code/Entities/BouncyBooster.cs:line 69
   at Celeste.Mod.ClonazepamHelper.ClonazepamModule.Load() in Code/ClonazepamModule.cs:line 23
   at DMD<System.Void Celeste.Mod.Everest:Register(Celeste.Mod.EverestModule)>(EverestModule module)
   at Celeste.Mod.MaxHelpingHand.Module.MaxHelpingHandModule.onModRegister(Action`1 orig, EverestModule module)
   at Hook<Celeste.Mod.Everest::Register>?17045391(EverestModule )
   at SyncProxy<System.Void Celeste.Mod.Everest:Register(Celeste.Mod.EverestModule)>(EverestModule )
   at Celeste.Mod.Everest.Loader.LoadModAssembly(EverestModuleMetadata meta, Assembly asm)
   at Celeste.Mod.Everest.Loader.LoadMod(EverestModuleMetadata meta)
   at Celeste.Mod.Everest.CheckDependenciesOfDelayedMods()
   at Celeste.Mod.Everest.Loader.LoadAuto()
   at Celeste.Mod.Everest.Boot()
   at Celeste.Celeste..ctor()
   at Celeste.Celeste.orig_Main(String[] args)
odd spruce
#

paging @dark sierra whenever you have time

dark sierra
#

Uhhhhhhh, to be honest I have no idea what to do after that sunnyleave

odd spruce
#

so true

#

I tried running celeste under dotnet8 and it did the same thing

unreal canyon
#

everest still runs on .net 7 behind the scenes

dark sierra
#

You might wanna try creating a runtime log using something along these lines

odd spruce
#

I tried it on windows and got a real error message!

#
System.ArgumentException: Value does not fall within the expected range.
   at System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(RuntimeMethodHandleInternal method, IntPtr* pInstantiation, Int32 cInstantiation)
   at System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(RuntimeMethodHandle method, RuntimeTypeHandle[] instantiation)
   at Celeste.Mod.ClonazepamHelper.Entities.BouncyBooster.Load()
   at Celeste.Mod.ClonazepamHelper.ClonazepamModule.Load()
   at DMD<System.Void Celeste.Mod.Everest:Register(Celeste.Mod.EverestModule)>(EverestModule module)
   at Celeste.Mod.MaxHelpingHand.Module.MaxHelpingHandModule.onModRegister(Action`1 orig, EverestModule module)
   at Hook<Celeste.Mod.Everest::Register>?56349145(EverestModule )
   at SyncProxy<System.Void Celeste.Mod.Everest:Register(Celeste.Mod.EverestModule)>(EverestModule )
   at Celeste.Mod.Everest.Loader.LoadModAssembly(EverestModuleMetadata meta, Assembly asm)
   at Celeste.Mod.Everest.Loader.LoadMod(EverestModuleMetadata meta)
   at Celeste.Mod.Everest.CheckDependenciesOfDelayedMods()
   at Celeste.Mod.Everest.Loader.LoadAuto()
   at Celeste.Mod.Everest.Boot()
   at Celeste.Celeste..ctor()
   at Celeste.Celeste.orig_Main(String[] args)
#

I popped it open in a decompiler. nothing looks weird about this?

#
    IL_0129: ldarg.0      // this
    IL_012a: ldfld        class [Celeste]Monocle.Wiggler [Celeste]Celeste.Booster::wiggler
    IL_012f: callvirt     instance void [Celeste]Monocle.Wiggler::Start()
granite lintel
#

just as a sanity check, does it work with only the bepinex publicizer without the custom celeste one?

odd spruce
#

can you link that

unreal canyon
#

yup

odd spruce
#

holy shit. it works

unreal canyon
#

@astral apex widergladeline3 ?

#

apparently celeste publicizer did a funny

odd spruce
#

Celeste Publicizer did a funny

astral apex
#

Whar?!

#

I have no idea how it would cause that?!

astral apex
#

@odd spruce can you send your project and steps to reproduce