polybiusproxy / hxCodec

Haxe library for native video playback on HaxeFlixel and OpenFL.
https://lib.haxe.org/p/hxCodec
Mozilla Public License 2.0
109 stars 71 forks source link

Game Crashes Due To Song Cutscenes #13

Closed Behnja closed 3 years ago

Behnja commented 3 years ago

So I don't know if this is my fault, and I'm just dumb, but the game still crashes after cutscenes play. Now don't get me wrong, @polybiusproxy did a good job in fixing game crashes after a cutscene plays when entering a week (thanks for that btw 👍 ). However, we got another cutscene issue. I'm trying to add a second cutscene to my week, and used the code below:

codeError

It's in PlayState.hx, right above "prevCamFollow = camFollow;", just like the instructions said. I go into the week, the first cutscene plays flawlessly and then I get put into the first song. I finish it, and then I hear 1 second of audio of the second cutscene, and the game crashes.

Again, if the code is the problem and I didn't write it correctly, please go ahead and correct me by showing me how it's supposed to be written. If the code is not the problem, then goodluck on fixing the issue Poly lmao. If you need anything, like the crash log, be sure to let me know.

Edit: I just fixed a typo (I cant stand seeing those)

RedDoesStuff commented 3 years ago

If you are running on kade engine, i suggest that you find a line of code in MP4Hanler.hx where it goes to switch states, then instead of FlxState.switchState, use LoadingState.loadAndSwitchState.

polybiusproxy commented 3 years ago

Please provide the logs.

Behnja commented 3 years ago

@polybiusproxy here's the log, and oh yeah, @CryBitDev the suggestion didn't work.

Log: C:/HaxeToolkit/haxe/lib/polymod/git/polymod/format/XMLMerge.hx:189: characters 10-23 : Warning : This typedef is deprecated in favor of haxe.xml.Access C:/HaxeToolkit/haxe/lib/polymod/git/polymod/format/XMLMerge.hx:189: characters 30-43 : Warning : This typedef is deprecated in favor of haxe.xml.Access source/DiffOverview.hx:65: characters 3-39 : Warning : FlxCamera.defaultCameras is deprecated, use FlxG.cameras.setDefaultDrawTarget instead source/PlayState.hx:410: 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/0,0,2//linc/ -I C:/Users/benig/Desktop/fridaynightfunkinTHEFKNDEGENERATES/Kade-Engine-master/source/vlc/cpp/include/ -I C:/Users/benig/Desktop/fridaynightfunkinTHEFKNDEGENERATES/Kade-Engine-master/source/vlc/cpp/src/ -nologo /WX- /fp:precise -DHX_WINDOWS -GR -O2(optim-std) -Zi(debug) -FdC:\Users\benig\Desktop\fridaynightfunkinTHEFKNDEGENERATES\Kade-Engine-master\export\release\windows\obj\obj/msvc1964-nc/vc.pdb(debug) -Od(debug) -O2(release) -Os(optim-size) -FS -Oy- -c -EHs -GS- -IC:/HaxeToolkit/haxe/lib/hxcpp/4,2,1/include -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_GC_BIG_BLOCKS(gc) -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]

kimicake commented 3 years ago

Getting the same issue...

source/Song.hx:87: loading ugh/ugh-hard
source/Paths.hx:98: assets/videos/ughCutscene.mp4
source/MP4Handler.hx:67: Setting width to 1280
source/MP4Handler.hx:68: Setting height to 720
settin' path: file:///C:\Users\nobod\Documents\GitHub\week7-js-port\export\debug\windows\bin//assets/videos/ughCutscene.mp4
[00000268c212ed00] main input error: no suitable demux module for `file/subtitle:///C:/Users/nobod/Documents/GitHub/week7-js-port/export/debug/windows/bin//assets/videos//ughCutscene.txt'
source/MP4Handler.hx:107: video loaded!
[00000268c214e680] main vout display error: Failed to change zoom
[00000268c214e680] main vout display error: Failed to set on top
[00000268c214e680] main vout display error: Failed to change source AR
[00000268c214e680] main vout display error: Failed to change zoom
[00000268c214e680] main vout display error: Failed to change source AR
source/MP4Handler.hx:122: Big, Big Chungus, Big Chungus!
source/PlayState.hx:358: Mod chart: false - assets/data/ugh/modchart.lua
source/Conductor.hx:68: new BPM map BUDDY []
source/PlayState.hx:475: INFORMATION ABOUT WHAT U PLAYIN WIT:
FRAMES: 10
ZONE: 166
TS: 1
BotPlay : true
source/Character.hx:266: 496
source/PlayState.hx:1304: uh 10
source/PlayState.hx:1306: SF CALC: 166
source/PlayState.hx:1337: song looks gucci
source/PlayState.hx:2087: loaded vocals
source/PlayState.hx:2127: Found offset file: assets/data/ugh/0.offset
source/PlayState.hx:1341: generated
source/PlayState.hx:1483: starting
source/MusicBeatState.hx:31: reg (x: -200 | y: -200 | w: 1792 | h: 1008)
source/TimingStruct.hx:43: Apparently -1875 is out of any segs
...
source/TimingStruct.hx:43: Apparently -2 is out of any segs
source/Character.hx:518: dance
source/Replay.hx:132: loading C:\Users\nobod\Documents\GitHub\week7-js-port\export\debug\windows\bin/assets/replays/replay-Ugh-time1629953701212.kadeReplay replay...
source/Highscore.hx:35: BotPlay detected. Score saving is disabled.
source/PlayState.hx:3614: LOADING NEXT SONG
source/PlayState.hx:3615: Guns-hard
source/Song.hx:87: loading guns/guns-hard
source/Paths.hx:98: assets/videos/gunsCutscene.mp4
source/MP4Handler.hx:67: Setting width to 1280
source/MP4Handler.hx:68: Setting height to 720
settin' path: file:///C:\Users\nobod\Documents\GitHub\week7-js-port\export\debug\windows\bin//assets/videos/gunsCutscene.mp4
Called from hxcpp::__hxc[p00p0_00m2a68ic2n1
f0Cca0]l main input error: lno suitable demux module for `file/subtitle:///C:/Users/nobod/Documents/GitHub/week7-js-port/export/debug/windows/bin//assets/videos//gunsCutscene.txt'
ed from ApplicationMain::main ApplicationMain.hx lin[e0 0020502
8Cc2a14le6l80e]d main vout display error: Failed to change zoom
f[r00o00m0 26A8cp21p4el68i0]c main vout display error: aFailed to set on top
t[i0o0n00M02a68ic2n1:4e:68c0]r main vout display error: Failed to change source ARe
ate 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 551
Called from flixel.FlxGame::step flixel/FlxGame.hx line 677
Called from flixel.FlxGame::update flixel/FlxGame.hx line 747
Called from flixel.FlxState::tryUpdate flixel/FlxState.hx line 202
Called from PlayState::update PlayState.hx line 2535
Critical Error: Uncatchable Throw: Null Object Reference
[00000268c212f0c0] main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 300 ms)
[00000268c212f0c0] main input error: ES_OUT_RESET_PCR called
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command lime test windows -debug --haxelib=hxcpp-debug-server --connect 6000" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.
polybiusproxy commented 3 years ago

make new issue

Behnja commented 3 years ago

@polybiusproxy why did you close the issue? Is it fixed?

polybiusproxy commented 3 years ago

@polybiusproxy why did you close the issue? Is it fixed?

yes

Behnja commented 3 years ago

@polybiusproxy well it's not. The game still crashes before the second cutscene even plays. I don't know how to write the if statement so I just went ahead and didn't do one, maybe that's the issue? You should put in the instructions section how it should be written.

foodcake commented 3 years ago

they haven't even commited anything, just wait for the next commit, hopefully it's there