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

Final Fantasy IV: The Complete Collection:- Game hangs when transitioning into FMV playback during a particular scene since v0.9.1-1967-g3cefa1a (updated, issue has returned) #4550

Closed
solarmystic opened this issue Nov 15, 2013 · 3 comments · Fixed by #5002

Comments

@solarmystic
Copy link
Contributor

UPDATE:- Issue has returned again since v0.9.6-303-g4d4fb98; it was last fixed in v0.9.6-301-gaf8a9bc. See #4550 (comment) for further details.

Issue is as stated in the title and was brought to my attention in the ppsspp.org forum FFIV thread by quite a few forumites. Also happens on all regions (EU/JP/US).

Reponsible commit found via bisecting (amongst the many Maxim at3+ commits) is v0.9.1-1967-g3cefa1a 3cefa1a

capture

Last unaffected build is rather debatable since the one before it (v0.9.1-1966-gf311901) which does incorporate the maxim at3+ stuff plays the FMV but has no audio.

I guess the last one that is truly unaffected (full working audio and non hanging FMV) would be v0.9.1-1966-gb0fa1a6 b0fa1a6 which also happens to be the last one before any of the maxim at3+ stuff got integrated into ppsspp.

Problem reproduction:

a. Start the game on any revision after the Maxim atrac3+ merge happened.

b. Load the following FFIV savefile (link provided by zarlox from the ppsspp.org forum is for the JP version, but savefiles can be freely used between US/EU/JP regions, by swapping them in the appropriate folders, tested using the EU version). Choose the Level 33 file and you'll appear on the world map next to an airship, and the town called Agart.

http://www.mediafire.com/download/2o5e158fvcfii2v/FF4PPSSPPSAVEDATA.rar

c. On the world map, board the airship, and head underground (land in the black hole next to Agart)

d. A bunch of sequences will play out, and eventually, when the game tries to transititon into the FMV showing the crash of the airship, the game just shows garbage (see image below), and eventually hangs with a black screen which cannot be skipped.

capture

Logfile:
(Nothing spectacular here, it doesn't actually log anything pertinent when the hangups occur)
https://gist.github.com/solarmystic/7492640

Temporary solutions/workarounds:

  1. Use any build prior to the Maxim at3+ merge like v0.9.1-1965-g027ba31 to get through those parts, save, and then head back to the newer build. Not ideal but workable.
@unknownbrackets
Copy link
Collaborator

The basic problem here is that, from the first 64k, ffmpeg is not able to analyze it properly. However, other videos (like the longer intro video) can analyze fine with only the first 64k.

The same seems to happen with the latest version of ffmpeg.

It is able to correctly analyze the entire file.

-[Unknown]

@solarmystic
Copy link
Contributor Author

@unknownbrackets @hrydgard

Please reopen this issue as it has since returned when your #4993 pull request was merged to master in v0.9.6-303-g4d4fb98 4d4fb98. The game/emulator crashes halfway through the video, instead of playing it back until the end.

untitled

Last build where the issue remained fixed from your original 2c38805 commit is v0.9.6-301-gaf8a9bc af8a9bc

Releaselog before crash occurs:-
https://gist.github.com/solarmystic/8250528

Stacktrace of the crash from MSVC 2013:-

    PPSSPPWindows64.exe!__crt_debugger_hook�()  Unknown
>   PPSSPPWindows64.exe!__report_gsfailure(unsigned __int64 StackCookie) Line 302   C
    PPSSPPWindows64.exe!ff_atrac3p_generate_tones(Atrac3pChanUnitCtx * ch_unit, AVFloatDSPContext * fdsp, int ch_num, int sb, float * out) Line 199 C
    [External Code] 

capture1

capture1a

Thanks to royr719 from the PPSSPP forums for bringing this to my attention.

solarmystic referenced this issue Jan 4, 2014
Set the audio/video streams per sceMpegGet*Au()
@unknownbrackets
Copy link
Collaborator

Seems like an updated ffmpeg build prevents the crash (or else I compiled it wrong), but the basic problem is that we're filling the audio stream buffer (and then dropping packets) before actually decoding any audio. This is in the psmf code, though. Hmm.

-[Unknown]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants