Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UndertaleModLib.AddAssetsFromList() return NullReferenceExceptions #2021

Open
CoolModder opened this issue Jan 22, 2025 · 1 comment
Open
Labels
bug Something isn't working

Comments

@CoolModder
Copy link

CoolModder commented Jan 22, 2025

Describe the bug

When attempting to save edits to code of mindwave demo, it returns:
System.NullReferenceException: 'Object reference not set to an instance of an object.'
At line 209 of Compiler.CS;
Modifying the assembly works as intended, and in fact the code will be decompiled as the intended decompiled code
Original decompiled code (gml_Object_obj_charselect_menu_Create_0 of Mindwave):
characters = [charselect_tutorial, charselect_shuffle, charselect_sparkle];
Original disassembly:

pushref.i gml_Script_charselect_shuffle
pushref.i gml_Script_charselect_tutorial
call.i @@NewGMLArray@@(argc=3)

Intended decompiled code:
characters = [charselect_future, charselect_tutorial, charselect_shuffle, charselect_sparkle];
Intended disassembly:

pushref.i gml_Script_charselect_shuffle
pushref.i gml_Script_charselect_tutorial
pushref.i gml_Script_charselect_future
call.i @@NewGMLArray@@(argc=4)

Appears to be due to arrays not being recompiled properly

Reproducing steps

  1. Open Data.win from Mindwave demo
  2. Replace the original decompiled code from -> gml_Object_obj_charselect_menu_Create_0 with the Intended decompiled code
  3. Save or switch tabs

Setup Details

Version: Pull request #2013
System: Win 11
Game: Mindwave Demo https://store.steampowered.com/app/2741670/MINDWAVE_Demo/

@CoolModder CoolModder added the bug Something isn't working label Jan 22, 2025
@CoolModder
Copy link
Author

CoolModder commented Jan 22, 2025

This also happens when trying to import .gml files with arrays, with the same exact failures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant