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

DiscoHawk Freeze #2952

Closed
Meerkov opened this issue Oct 3, 2021 · 8 comments
Closed

DiscoHawk Freeze #2952

Meerkov opened this issue Oct 3, 2021 · 8 comments

Comments

@Meerkov
Copy link
Contributor

Meerkov commented Oct 3, 2021

Summary

DiscoHawk freezes when extracting music from Gunship (USA)

I don't know why it freezes, as it works fine for other games.

Repro

  1. First open DiscoHawk
  2. Drag "Gunship (USA).cue" to the HAWK area
  3. Drag "Gunship (USA)_hawked.ccd" to the MP3 extraction area.

Output

4. DiscoHawk hangs for a long time (forever).
5. Force quit DiscoHawk
6. Check the output folder, and you will see Track 02 successfully extracted.
7. No other files extracted successfully.

Host env.

BizHawk 2.6.2 - win64

@Meerkov
Copy link
Contributor Author

Meerkov commented Oct 3, 2021

When debugging, it seems like it gets through about 8 tracks before hitting an exception here:

int trackLength = track.NextTrack.LBA - track.LBA;
System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=DiscoHawk
  StackTrace:
   at BizHawk.Client.DiscoHawk.AudioExtractor.Extract(Disc disc, String path, String fileBase) in C:\Users\admin\Documents\GitHub\BizHawk2\src\BizHawk.Client.DiscoHawk\AudioExtractor.cs:line 24

Not sure why it freezes in release, but debug makes it almost all the way through. But I'm guessing the last track on the disk is an invalid music file, and for some reason DiscoHawk is trying to process it incorrectly?

@zeromus
Copy link
Contributor

zeromus commented Oct 3, 2021

I found this problem too... but it's not what made it hang for me... it's like, a separate problem. I just added a random check to avoid it. but uhhhh ... I'm not sure how this code ever worked. Well, it got all the tracks in this case, and the only dysfunction I can imagine from the change I made is that a final track might fail to get dumped, so since that isnt happening.... we'll just leave it at that for now

@Meerkov
Copy link
Contributor Author

Meerkov commented Oct 3, 2021

In the game "5 Star Racing" I noticed the final 2 tracks are silent. The second to last one is 8 minutes, and the last one is 3.

Is that the issue you're talking about, with failing to export the final track(s)? I've seen a number of games seemingly not export the final track. I just assumed a lot of games include a data track as the last track, but maybe it's export failures. I'll start keeping my eyes out for more examples.

@zeromus
Copy link
Contributor

zeromus commented Oct 3, 2021

That one is a bad example. The last 2 tracks are actually silence.
Yes, the problem would be problems exporting final track(s), or more precisely, only the final track.
But I checked it just now and I'm less concerned that it's a problem. In the scheme DiscSystem is using, the final track is the leadout track, which isn't audio to be dumped. preceding tracks should all be fine, so I now believe this should be working at 100% success

@Meerkov
Copy link
Contributor Author

Meerkov commented Oct 4, 2021

Ok, thanks for checking zeromus. If I notice other strange behavior I'll take a note of it.

@Meerkov
Copy link
Contributor Author

Meerkov commented Oct 6, 2021

You know, I find it a little suspicious that so many games have a blank track at the end. Are we sure this isn't a bug?

@zeromus
Copy link
Contributor

zeromus commented Oct 7, 2021

So many which games?

@Meerkov
Copy link
Contributor Author

Meerkov commented Oct 8, 2021

Nevermind, I noticed a lot of PSX games have a blank track at the end (like maybe 1 out of every 4 I checked). But it seems that those tracks are actually just filled with \0 bytes, so it's not a bug unless the files I'm using were improperly created.

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

No branches or pull requests

3 participants