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

Last Ranker crashes when battle in the Coliseum #3122

Closed
daniel229 opened this issue Aug 11, 2013 · 25 comments · Fixed by #8356
Closed

Last Ranker crashes when battle in the Coliseum #3122

daniel229 opened this issue Aug 11, 2013 · 25 comments · Fixed by #8356

Comments

@daniel229
Copy link
Collaborator

disable atreac3+ plugin can "fix" this issue.

savedata
https://docs.google.com/file/d/0BzGZGDfFE68zNUZvdDIxMi1VbEU/edit?usp=sharing

@daniel229
Copy link
Collaborator Author

It seems like one commit that between 0.76-1140-gbe483a1 and 0.76-1157-g7d566b9 causes the issue.Before 1141,it random crashed.after 1156,It definitely crashes.Disable atreac3+ plugin,no crash in any builds.

@daniel229
Copy link
Collaborator Author

in __sceAudio.cpp
revert
if (chan.sampleQueue.size() > 0 || chan.sampleAddress == 0)
to
if (chan.sampleQueue.size() > chan.sampleCount * 2 * chanQueueMaxSizeFactor || chan.sampleAddress == 0) {

then the definitely crash return to random crash.

@sum2012
Copy link
Collaborator

sum2012 commented Aug 11, 2013

VS2010 crash screen
1
This time I do not know correctly fix

@sum2012
Copy link
Collaborator

sum2012 commented Aug 11, 2013

@ daniel229
Please try work or not
https://docs.google.com/file/d/0B3OaSdeV0L8kS1p1cXJaVmcwZTA/edit?usp=sharing

@unknownbrackets
I hope this is not hack...

u32 _AtracDecodeData(int atracID, u8* outbuf, u32 *SamplesNum, u32* finish, int *remains)
{
    Atrac *atrac = getAtrac(atracID);

    u32 ret = 0;
    if(SamplesNum > finish) //added
        return 0x80630024;//ERROR_ATRAC_ALL_DATA_DECODED added

@unknownbrackets
Copy link
Collaborator

@sum2012 hmm, that fixes it really? I don't understand.

In sceAtracDecodeData(), both values are initialized to 0. That check should never have effect there, because 0 > 0 is always false.

In SasAtrac3::getNextSamples(), it's used in a loop, so it seems more likely. finish is either 0 or 1, but SamplesNum is again initialized to 0. 0 > 1 and 0 > 0 are both always false. Either way, it can't be greater than finish, can it?

@daniel229 and @sum2012, it seems like this is a crash inside the atrac decoder. Either bad params are being passed to it (e.g. a bad pointer, or a size that goes beyond the pointer), or the decoder is simply buggy. Or both.

-[Unknown]

@sum2012
Copy link
Collaborator

sum2012 commented Aug 11, 2013

@unknownbrackets so that I need @daniel229 confirm work
Add 1 more picture
2

@unknownbrackets
Copy link
Collaborator

As you can see from the stack, it's actually crashing in that other dll. I can't really help you with that dll, but I will say from a general standpoint, if you want to debug a crash inside a dll, you probably need to compile that dll in debug mode if possible (and most importantly have its pdb.)

-[Unknown]

@daniel229
Copy link
Collaborator Author

@sum2012 no crash,but missing BGM.

@daniel229
Copy link
Collaborator Author

run with a debug dll.
01

@sum2012
Copy link
Collaborator

sum2012 commented Aug 12, 2013

My error screen is differult to you
3
Again no idea to fix

@daniel229
Copy link
Collaborator Author

Test with the maxim-at3plus,It stops BGM instead of crash at that crash point.

@sum2012
Copy link
Collaborator

sum2012 commented Oct 20, 2013

stops BGM log:
47:02:476 ATRAC3 play I[ME]: HW\MediaEngine.cpp:101 FF: Frame data doesn't match channel configuration!
47:02:476 ATRAC3 play E[ME]: HLE\sceAtrac.cpp:599 avcodec_decode_audio4: Error decoding audio -1094995529
47:02:476 ATRAC3 play E[ME]: HLE\sceAtrac.cpp:787 UNIMPL sceAtracGetInternalErrorInfo(0, 09fdf66c)
47:02:504 ATRAC3 play W[KERNEL]: C:\BuildAgent\work\acf56f986e98e7c9\Core/HLE/sceKernel.h:454 Kernel: Bad object handle 0 (00000000)
47:02:504 ATRAC3 play E[IO]: HLE\sceIo.cpp:1033 sceIoLseek(4, 10d308, 0) - ERROR: invalid file

ppsspp-v0.9.1-2038-g90eed17 full log
https://gist.github.com/sum2012/a478046e21ed545d3b2b

@daniel229
Copy link
Collaborator Author

Still cut off with FFMPEG updated
40:41:618 ATRAC3 play I[ME]: HW\MediaEngine.cpp:84 FF: Frame data doesn't match channel configuration!
40:41:618 ATRAC3 play E[ME]: HLE\sceAtrac.cpp:608 avcodec_decode_audio4: Error decoding audio -1094995529
40:41:618 ATRAC3 play E[ME]: HLE\sceAtrac.cpp:818 UNIMPL sceAtracGetInternalErrorInfo(0, 09fdf66c)
40:41:651 ATRAC3 play E[IO]: HLE\sceIo.cpp:1055 sceIoLseek(4, 10d308, 0) - ERROR: invalid file
40:41:651 ATRAC3 play W[IO]: HLE\sceIo.cpp:796 sceIoRead(4, 099b7c80, 0): error 80020323

@hrydgard
Copy link
Owner

We are obviously decoding bad data for some reason, but at least we aren't crashing now...

@daniel229
Copy link
Collaborator Author

That BGM is playback well on ffmpeg player until the end,It does not stop,and looping the last frame.The other BGM files that from the iso have the same issue on ffmpeg player.
06

@unknownbrackets
Copy link
Collaborator

Does this still show the same "FF: Frame data doesn't match channel configuration!" error?

-[Unknown]

@daniel229
Copy link
Collaborator Author

Still,but I get it works one time.
16:29:064 ATRAC3 play E[ME]: HLE\sceAtrac.cpp:1445 sceAtracSetLoopNum(1, 0):no loop information
16:29:127 ATRAC3 play I[ME]: HLE\sceAtrac.cpp:1084 sceAtracReleaseAtracID(1)
16:29:205 ATRAC3 play I[ME]: HW\MediaEngine.cpp:85 FF: Frame data doesn't match channel configuration!
16:29:205 ATRAC3 play E[ME]: HLE\sceAtrac.cpp:655 avcodec_decode_audio4: Error decoding audio -1094995529
16:29:205 ATRAC3 play E[ME]: HLE\sceAtrac.cpp:911 UNIMPL sceAtracGetInternalErrorInfo(0, 09fdf66c)
16:29:208 ATRAC3 play E[IO]: HLE\sceIo.cpp:1084 sceIoLseek(4, 10d308, 0) - ERROR: invalid file
16:29:208 ATRAC3 play W[IO]: HLE\sceIo.cpp:804 sceIoRead(4, 099b7c80, 0): error 80020323
16:29:208 ATRAC3 play I[ME]: HLE\sceAtrac.cpp:1084 sceAtracReleaseAtracID(0)
16:29:629 ATRAC3 play I[ME]: HLE\sceAtrac.cpp:1628 0=sceAtracSetMOutHalfwayBufferAndGetID(08ccdb80, 00000c64, 00000c64)
16:29:629 ATRAC3 play W[ME]: HLE\sceAtrac.cpp:1273 This is an atrac3+ mono audio
16:29:629 ATRAC3 play E[ME]: HLE\sceAtrac.cpp:1445 sceAtracSetLoopNum(0, 0):no loop information

@daniel229
Copy link
Collaborator Author

Look like it usually works,and occasionally not work

@hrydgard
Copy link
Owner

Still happens?

@daniel229
Copy link
Collaborator Author

Yes,it still happens

@unknownbrackets
Copy link
Collaborator

So, just to be clear, does it still crash, or does it just not loop properly now?

-[Unknown]

@daniel229
Copy link
Collaborator Author

Not crash,just stop suddently in certain point of the bgm,not a loop,and sometime not happen.

@daniel229
Copy link
Collaborator Author

Still got "Error decoding audio" sometime in v1.0.1-224-g0978500 with default setting,but it won't happen when CPU clock change to 1000.

@unknownbrackets
Copy link
Collaborator

Is it affected by IO timing method?

-[Unknown]

@daniel229
Copy link
Collaborator Author

Yes,it is affected IO timing method.I usually try cpu clock 0 or 1000 with IO timing method fast.1000 always work.Just combined other IO timing method and got this result.

cpu clock 0

Fast not work
Host not work
Simulate UMD delays not work

cpu clock 1000

Fast work
Host work
Simulate UMD delays not work

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.

4 participants