ShadowMario / FNF-PsychEngine

Engine originally used on Mind Games mod
Apache License 2.0
1.11k stars 2.17k forks source link

'Null Object Reference' at PlayState.hx line 1201 #2461

Closed AdrianCD5 closed 2 years ago

AdrianCD5 commented 2 years ago

Describe your bug here.

When building Psych and attempting to load a song, I get a NOR at the exact same spot of the loading process; PlayState.hx line 1201. Another person is able to build this completely fine and without issue so I'm not sure what's happening with my hardware specifically. I have all of the libraries installed.

Command Prompt/Terminal logs (if existing)

source/Achievements.hx:157: characters 30-54 : Warning : `FlxCamera.defaultCameras` is deprecated, use `FlxG.cameras.setDefaultDrawTarget` instead
source/MainMenuState.hx:66: characters 3-39 : Warning : `FlxCamera.defaultCameras` is deprecated, use `FlxG.cameras.setDefaultDrawTarget` instead
source/PlayState.hx:312: characters 3-39 : Warning : `FlxCamera.defaultCameras` is deprecated, use `FlxG.cameras.setDefaultDrawTarget` instead
source/editors/CharacterEditorState.hx:93: characters 3-41 : Warning : `FlxCamera.defaultCameras` is deprecated, use `FlxG.cameras.setDefaultDrawTarget` instead
source/editors/DialogueCharacterEditorState.hx:82: characters 3-40 : Warning : `FlxCamera.defaultCameras` is deprecated, use `FlxG.cameras.setDefaultDrawTarget` instead
C:/HaxeToolkit/haxe/lib/hscript/2,4,0/hscript/Interp.hx:145: characters 8-18 : Warning : Std.is is deprecated. Use Std.isOfType 
instead.
C:/HaxeToolkit/haxe/lib/hscript/2,4,0/hscript/Interp.hx:180: characters 8-18 : Warning : Std.is is deprecated. Use Std.isOfType 
instead.
C:/HaxeToolkit/haxe/lib/hscript/2,4,0/hscript/Interp.hx:221: characters 8-18 : Warning : Std.is is deprecated. Use Std.isOfType 
instead.
C:/HaxeToolkit/haxe/lib/hscript/2,4,0/hscript/Interp.hx:515: characters 8-18 : Warning : Std.is is deprecated. Use Std.isOfType 
instead.
C:/HaxeToolkit/haxe/lib/hscript/2,4,0/hscript/Interp.hx:483: characters 37-56 : Warning : Std.is is deprecated. Use Std.isOfType instead.
C:/HaxeToolkit/haxe/lib/hscript/2,4,0/hscript/Interp.hx:484: characters 31-47 : Warning : Std.is is deprecated. Use Std.isOfType instead.
C:/HaxeToolkit/haxe/lib/hscript/2,4,0/hscript/Interp.hx:646: characters 10-42 : Warning : Std.is is deprecated. Use Std.isOfType instead.
source/options/NoteOffsetState.hx:57: characters 3-39 : Warning 
: `FlxCamera.defaultCameras` is deprecated, use `FlxG.cameras.setDefaultDrawTarget` instead

Compiling group: haxe
cl.exe -Iinclude -IC:/HaxeToolkit/haxe/lib/discord_rpc/git/linc/ -IC:/HaxeToolkit/haxe/lib/linc_luajit/git//linc/ -I C:/Users/moder/Byte-Funkin-Psych-Engine-0.5-Port/source/vlc/cpp/include/ -I C:/Users/moder/Byte-Funkin-Psych-Engine-0.5-Port/source/vlc/cpp/src/ -nologo /WX- /fp:precise -DHX_WINDOWS -GR -Od(optim-std) -Zi(optim-std) -FdC:\Users\moder\Byte-Funkin-Psych-Engine-0.5-Port\export\debug\windows\obj\obj/msvc1964-debug-nc/vc.pdb(optim-std) -Zi(debug) -FdC:\Users\moder\Byte-Funkin-Psych-Engine-0.5-Port\export\debug\windows\obj\obj/msvc1964-debug-nc/vc.pdb(debug) -Od(debug) -O2(release) -bigobj -Os(optim-size) -FS -Oy- -c -EHs 
-GS- -IC:/HaxeToolkit/haxe/lib/hxcpp/4,2,1/include -DHXCPP_DEBUG -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHX_SMART_STRINGS(haxe) -DHXCPP_API_LEVEL=400(haxe) -D_CRT_SECURE_NO_DEPRECATE -D_ALLOW_MSC_VER_MISMATCH -D_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH -DHX_WIN_MAIN(main) -wd4996 ... tags=[haxe,static]
 - src/lime/utils/AssetCache.cpp  [haxe,release]
Link: ApplicationMain-debug.exe
source/Discord.hx:17: Discord Client starting...
source/Discord.hx:67: Discord Client initialized
source/Discord.hx:24: Discord Client started.
source/LoadingState.hx:162: Setting asset folder to shared
source/Conductor.hx:75: new BPM map BUDDY []
Called from hxcpp::__hxcpp_main
Called from ApplicationMain::main ApplicationMain.hx line 25    
Called from ApplicationMain::create ApplicationMain.hx line 130 
Called from lime.app.Application::exec lime/app/Application.hx line 150
Called from lime._internal.backend.native.NativeApplication::exec lime/_internal/backend/native/NativeApplication.hx line 146   
Called from lime._internal.backend.native.NativeApplication::handleRenderEvent lime/_internal/backend/native/NativeApplication.hx line 370
Called from lime.app._Event_lime_graphics_RenderContext_Void::dispatch lime/_internal/macros/EventMacro.hx line 91
Called from openfl.display.Stage::__onLimeRender openfl/display/Stage.hx line 1950
Called from openfl.display.Stage::__broadcastEvent openfl/display/Stage.hx line 1166
Called from openfl.display.DisplayObject::__dispatch openfl/display/DisplayObject.hx line 1399
Called from openfl.events.EventDispatcher::__dispatchEvent openfl/events/EventDispatcher.hx line 402
Called from flixel.FlxGame::onEnterFrame flixel/FlxGame.hx line 
545
Called from flixel.FlxGame::step flixel/FlxGame.hx line 677     
Called from flixel.FlxGame::update flixel/FlxGame.hx line 724   
Called from flixel.FlxGame::switchState flixel/FlxGame.hx line 637
Called from PlayState::create PlayState.hx line 1201
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command lime test windows -debug --connect 6000" terminated with exit code: 1.

Are you modding a build from source or with Lua?

Source

What is your build target?

Windows

Did you edit anything in this build? If so, mention or summarize your changes.

Yes, I am using a port of the mod Byte Funkin' that a coder made for me. It builds fine on their computer, and loads songs.

tposejank commented 2 years ago

you edited somethig?

AdrianCD5 commented 2 years ago

Apologies, I'm mistaken. There was an edit to the specific code, adding an overlay to the game. Line 1201 is the final line referencing overlaything: image 'overlaything' is referenced as a var at the start so I'm not sure why it's crashing: image

tposejank commented 2 years ago

it is null you need to make it not null aka = new FlxSprite (q93958482jdjrieoqkkglt)

AdrianCD5 commented 2 years ago

did that, it's still not finding the image despite it being in the right place so ill just leave it for now. ty