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

Xyanide Resurrection freezing #8526

Closed
daniel229 opened this issue Jan 30, 2016 · 31 comments · Fixed by #13659 or #13673
Closed

Xyanide Resurrection freezing #8526

daniel229 opened this issue Jan 30, 2016 · 31 comments · Fixed by #13659 or #13673
Labels
PSMF / MPEG Issue involves scePsmf or sceMpeg video playback.
Milestone

Comments

@daniel229
Copy link
Collaborator

Seems like a scempeg bug
5

log
https://gist.github.com/daniel229/15538499b882fcf3a39c

@hrydgard
Copy link
Owner

Did it ever work before?

@daniel229
Copy link
Collaborator Author

Not happen in v1.0.1-891-g1c67de0 ,but happen in v1.0.1-898-gbb96478
v1.0.1-891-g1c67de0...v1.0.1-898-gbb96478

even not freezing in v1.0.1-891-g1c67de0,bu still has this error,

45:27:097 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: Could not find codec parameters for stream 1 (Audio: mp3, 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options

@unknownbrackets
Copy link
Collaborator

During the log you posted:

57:38:567 DecodeThread N[ME]: HLE\sceMpeg.cpp:1125 sceMpegAvcDecode(0990bc4c, 094c937c, 512, 094c94dc, 09fbda9c)
57:38:598 DecodeThread W[ME]: HLE\sceMpeg.cpp:1770 UNIMPL sceMpegFlushAllStream(0990bc4c)
57:38:598 DecodeThread N[ME]: HLE\sceMpeg.cpp:1669 UNIMPL sceMpegChangeGetAuMode(0990bc4c, 17, 1): changing type=0
57:38:598 DecodeThread N[ME]: HLE\sceMpeg.cpp:1669 UNIMPL sceMpegChangeGetAuMode(0990bc4c, 18, 0): changing type=0
57:38:598 DecodeThread N[ME]: HLE\sceMpeg.cpp:1386 128=sceMpegRingbufferAvailableSize(0946aebc)
57:38:598 DecodeThread N[ME]: HLE\sceMpeg.cpp:1448 sceMpegRingbufferPut(0946aebc, 27, 128)
57:38:600 DecodeThread I[ME]: HLE\sceMpeg.cpp:348 Stream offset: 2048, Stream size: 0x10C800
57:38:600 DecodeThread I[ME]: HLE\sceMpeg.cpp:349 First timestamp: 90000, Last timestamp: 900810
57:38:625 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: More than one AAC RDB per ADTS frame
57:38:625 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF:  is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
57:38:625 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: Sample rate index in program config element does not match the sample rate index configured by the container.
57:38:628 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: Inconsistent channel configuration.
57:38:628 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: get_buffer() failed
57:38:629 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: Could not find codec parameters for stream 1 (Audio: aac (SSR), 3.0, fltp, 372 kb/s): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
57:38:630 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: deprecated pixel format used, make sure you did set range correctly
57:38:630 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: No accelerated colorspace conversion found from yuv420p to rgba.

It seems to think that the video has aac audio. I wonder if we're flushing wrong... maybe logging sceIo would help us understand if it's trying to play two different videos or just one?

-[Unknown]

@daniel229
Copy link
Collaborator Author

@unknownbrackets
Copy link
Collaborator

It reads less data:

00:00:727 StreamThread N[IO]: HLE\sceIo.cpp:917 sceIoReadAsync(4, 093d5e6c, 6000): deferring result

And then seeks to the beginning:

00:00:738 StreamThread N[IO]: HLE\sceIo.cpp:1212 0 = sceIoLseekAsync(4, 0, 0)

It then flushes, which we survive, and then flushes again, which we don't. Seems strange.

There's also stuff like this:

59:58:684 DecodeThread W[ME]: HLE\sceMpeg.cpp:1770 UNIMPL sceMpegFlushAllStream(0990bc4c)
59:58:685 DecodeThread I[ME]: HLE\sceMpeg.cpp:348 Stream offset: 2048, Stream size: 0x10C800
59:58:685 DecodeThread I[ME]: HLE\sceMpeg.cpp:349 First timestamp: 90000, Last timestamp: 900810
59:58:701 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: Header missing
59:58:701 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: Header missing
59:58:701 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: Could not find codec parameters for stream 1 (Audio: mp3, 0 channels, s16p): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
59:58:701 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: deprecated pixel format used, make sure you did set range correctly
59:58:702 DecodeThread I[ME]: HW\MediaEngine.cpp:87 FF: No accelerated colorspace conversion found from yuv420p to rgba.

I suspect we're trying to decode garbage, or header data, or something we ought not to...

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Aug 8, 2016

v1.2.2-839-gfb05c05 same problem
log:
https://drive.google.com/file/d/0B3OaSdeV0L8kaEFMZ1hKT1Y1S1k/view?usp=sharing

@sum2012
Copy link
Collaborator

sum2012 commented Aug 8, 2016

jpcsp hang earily with this log:
12499 [DecodeThread] WARN hle.sceMpeg - Audio frame length 0x810 with incorrect header (header: 01 01 01 01 01 01 01 01)

edit:If I make a "try...except" ,then it make the same freeze place
edit2:second time it is not freeze

@sum2012 sum2012 added the PSMF / MPEG Issue involves scePsmf or sceMpeg video playback. label Feb 28, 2017
@unknownbrackets
Copy link
Collaborator

Will have to compile later. Sounds like we're down to:
v1.2.2-568-g63e730446...v1.2.2-786-gfa3f219fd

-[Unknown]

@unknownbrackets
Copy link
Collaborator

unknownbrackets commented Jun 2, 2018

Here's one in the middle: v1.2.2-680-g0519b3ef7.zip
If that is broken: v1.2.2-614-g7814cdced.zip
Or if it works: v1.2.2-727-g1091fd2dc.zip

-[Unknown]

@unknownbrackets
Copy link
Collaborator

To narrow that range a bit to more likely commits:
v1.2.2-614-g7814cdced...5da0375

Just gonna send the exe now, reuse the other files from v1.2.2-680-g0519b3ef7.

v1.2.2-634-g606856c9a.zip
v1.2.2-648-ge72cc3321.zip
v1.2.2-658-gce8d2bef5.zip - if only this fails, it's #8803.

The game has logged "bad video stream":
https://report.ppsspp.org/logs/game/NPEH00060_1.00
https://report.ppsspp.org/logs/game/ULES00634_1.01

And it seems to use both Psmf and Mpeg.

-[Unknown]

@unknownbrackets
Copy link
Collaborator

Okay so to confirm that even better, here's a build with #8803 reverted. We still want those changes for sure, but this will confirm if the latest version works without them. Again, just the exe - use with assets from v1.6.2 or the latest git build.

revert-8803.zip

If that does, here's a few for partial reverts of that PR (I think the last 3 commits are most likely to be related):

revert-8803-last3-c8d0270.zip
revert-8803-last2-4ee39f8.zip
revert-8803-last1-04dcaea.zip

I wonder what mpegLibVersion is being used here. Last build - this will show a message with the mpegLibVersion so there's no question. Maybe there's something funny happening here.

mpeg-ver-alert.zip

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Jun 3, 2018

I 1 years leave,good news hear from this game,
anyway revert-8803.zip don't work

@sum2012
Copy link
Collaborator

sum2012 commented Jun 3, 2018

@unknownbrackets
Copy link
Collaborator

unknownbrackets commented Jun 3, 2018

Okay, so it's using the firmware version which should be the latest.

Hmm: #8867 (comment) notes Xyanide impacted then, so presumably working when that was merged to some degree...

It gets tricky if two different things broke it. We could try reverting 8803, 8867, 9014, and 9484. If it's all related to Mpeg, those should be the PRs that cause it. Want to try that or should I try to make a build?

PS: Good to see you around.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Jun 3, 2018

revert 8803 have tested fail. (You have made it to me to test https://github.com/hrydgard/ppsspp/files/2065554/revert-8803.zip )
edit: That mean two different things broke it ?
For 8867, 9014, and 9484 , can you make a build? (I don't know how to resolve conflict)

@unknownbrackets
Copy link
Collaborator

unknownbrackets commented Jun 3, 2018

Here's all of them reverted: revert-8803-8867-9014-9484.zip

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Jun 3, 2018

revert-8803-8867-90149484.zip don't work

@sum2012
Copy link
Collaborator

sum2012 commented Jun 10, 2018

@unknownbrackets I want to find out which commit in #8803 have problem , but checkout submodule error ,can you help me ? thanks
1

@unknownbrackets
Copy link
Collaborator

Hmm... you might have to try git submodule sync --recursive. I think it was pointing to a different git repo then, and git submodule update doesn't change repos of submodules.

It changed in this commit:
b46bb1e#diff-8903239df476d7401cf9e76af0252622

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Jun 10, 2018

Thanks,that work.
A small finding in v1.2.2-658-gce8d2bef5
sometimes hang ,sometimes not hang .........

@unknownbrackets
Copy link
Collaborator

Ah - that could even mean it broke earlier on then, just not consistently.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Jun 10, 2018

Hmm, v1.2.2-648-ge72cc3321 test 5 times not hang

@sum2012
Copy link
Collaborator

sum2012 commented Jun 10, 2018

git bisect result:
41f2999

garbage data can be proved from good log:
05:58:435 DecodeThread I[ME]: HLE\sceMpeg.cpp:351 Stream offset: 2048, Stream size: 0x10C800
05:58:435 DecodeThread I[ME]: HLE\sceMpeg.cpp:352 First timestamp: 90000, Last timestamp: 900810
05:58:465 DecodeThread I[ME]: HW\MediaEngine.cpp:85 FF: deprecated pixel format used, make sure you did set range correctly
05:58:465 DecodeThread I[ME]: HW\MediaEngine.cpp:85 FF: No accelerated colorspace conversion found from yuv420p to rgba.
05:58:718 RenderThread I[ME]: HW\MediaEngine.cpp:85 FF: error while decoding MB 26 9, bytestream -13
05:59:118 RenderThread I[ME]: HW\MediaEngine.cpp:85 FF: error while decoding MB 11 12, bytestream -11

@sum2012
Copy link
Collaborator

sum2012 commented Jun 10, 2018

In v1.2.2-658-gce8d2be ,revert 41f2999 100% don't hang
in current master revert (
sum2012@b7c2ef5 sometimes hang ,sometimes not hang

@unknownbrackets
Copy link
Collaborator

Maybe this change is now truncating a frame (sometimes) at a ringbuffer boundary and it's not working properly or not providing more data the way we expect...?

41f2999#diff-7569aff64133d9c49602eec78c0dfd5bL1447

Hm.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Jun 12, 2018

I find out another bad change is 558b462
pull 8867 + revert 41f2999 + revert
558b462 is okay.

But in the current master,maybe I revert some wrong sum2012@6760c3d , video suddenly become black.
I cannot do myself some more work to fix this.Hope you have idea to fix this,Thanks

@Panderner
Copy link
Contributor

Same happens on latest build

this is a text that spams in the log when i encounter freezing

DecodeThread W[ME]: HLE/sceMpeg.cpp:1102 sceMpegAvcDecode(0990bc4c, 094c937c, 512, 094c94d8, 09fbda9c): mpeg buffer empty

@sum2012
Copy link
Collaborator

sum2012 commented Oct 31, 2020

Update the log to v1.10.3-1052-gf3c05cb81-windows-amd64
ppsspplog.zip

@sum2012
Copy link
Collaborator

sum2012 commented Nov 15, 2020

@shenweip Thanks again

@Panderner
Copy link
Contributor

it's seems this game is broken again after #13663 Merge.

@shenweip
Copy link
Contributor

it's seems this game is broken again after #13663 Merge.

Oops, just a mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PSMF / MPEG Issue involves scePsmf or sceMpeg video playback.
Projects
None yet
6 participants