Project

General

Profile

Emulator Issues #8686

TAS Movie playback fails on launch.

Added by bastos.eder about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Game Name?
The Legend of Zelda: The Wind Waker (also confirmed with Metroid Prime)

Game ID?
GZLE01

What's the problem? Describe what went wrong in few words.
Attempting to play back a pre-recorded DTM file fails immediately. On my self-compiled Ubuntu build, the following message appears in a popup:

Internal LZO Error - decompression failed (-4) (91488256, 203661)
Try loading the state again

And after clicking OK, the emulator crashes and the following is dumped to stdout:

dolphin-emu: malloc.c:2905: __libc_malloc: Assertion `!victim || ((((mchunkptr)((char*)(victim) - 2*(sizeof(size_t)))))->size & 0x2) || ar_ptr == (((((mchunkptr)((char*)(victim) - 2*(sizeof(size_t)))))->size & 0x4) ? ((heap_info ) ((unsigned long) (((mchunkptr)((char)(victim) - 2*(sizeof(size_t))))) & ~((2 * (4 * 1024 * 1024 * sizeof(long))) - 1)))->ar_ptr : &main_arena)' failed.

Although, once, the game did not crash and the movie attempted to continue playback of recorded input, but without having loaded the state.

On Windows build 6781 from dolphin-emu.org, no message is displayed, and the emulator crashes with loud repetitive noise blasting out the speaker.

What did you expect to happen instead?
The movie should play successfully.

What steps will reproduce the problem?
1. Get newest Dolphin build.
2. Record a movie.
3. Attempt to play back the movie.

Which versions of Dolphin did you test on?
6781 on Windows, and latest master as of this posting on Ubuntu.

Does using an older version of Dolphin solve your issue? If yes, which
versions of Dolphin used to work?
I have not tried an older version.

What are your PC specifications? (including, but not limited to: Operating
System, CPU and GPU)
i5 4670, GTX 970, Windows 8.1, Ubuntu 14.10

History

#1 Updated by bastos.eder about 5 years ago

Attempting to use the movie subsystem's method of loading states on startup on Android breaks emulation in a similar way, FWIW.

#2 Updated by JMC4789 about 5 years ago

What version of Dolphin was the movie recorded on?

#3 Updated by bastos.eder about 5 years ago

Same as listed for playback.

#4 Updated by peter about 5 years ago

Could not reproduce on windows with Super Mario Sunshine, 4.0-6787.
Also tested on Xenoblade Chronicles, so no problem with Wii games either.

Specs:
Windows 7
Intel i7-3770
Nvidia GTX 560 Ti

#5 Updated by bastos.eder about 5 years ago

For clarity, this refers specifically to movies recorded from a game in-progress.

#6 Updated by peter about 5 years ago

I still can't reproduce.

To clarify, here are the steps I take:
- Open up game
- Play for a while
- Start recording
- Play for a while
- Close game, getting a dialog for saving the movie file
- Play movie file

Tried again with Luigi's Mansion. No crash or error messages.

#7 Updated by Fog about 5 years ago

Could be an issue with the way you compiled it on Linux, or the DTM file is just corrupted.

#8 Updated by bastos.eder about 5 years ago

I was able to reproduce the issue with a DTM file both recorded and played back from Windows, build 4.0-6781.

#9 Updated by JMC4789 about 5 years ago

Can you try with a different savestate? Does the savestate work on its own? It sounds like the savestate is corrupted.

#10 Updated by bastos.eder about 5 years ago

I think I'm unclear on how this function is supposed to work.

Are you supposed to manually supply a savestate for the DTM to start from?

#11 Updated by JMC4789 about 5 years ago

I'm not 100% sure; I've only used movie support from clean start.

#12 Updated by bastos.eder about 5 years ago

I reproduced the issue on builds 3593 and 6789. On 6789, I even tried once with a cleared user directory.

I was in the process of making a video demonstrating the issue occurring, but when I was recording, it worked. That's how these things go, I guess.

I'm attaching an example of a movie that does not load successfully, and the one which does. They're from the same area of the same game (Wind Waker), and are very short so hopefully it is not too difficult to figure out what the difference is.

https://www.mediafire.com/?ewvtj5dyvd4x682

#13 Updated by bastos.eder about 5 years ago

The issue appears to have originated between 4.0-2543 and 4.0-2547.

#14 Updated by marwinmisselhorn about 5 years ago

Can you try to load the savestate on its own? Simply drag it onto the dolphin window to do so. If you get the same error can you perhaps try a different game?

I'm never getting this issue and I'm currently doing a lot of TAS work for Twilight Princess (also with savestates). It might be related to Wind Waker. Perhaps try to manually savestate a few times and load it back and see if the same error occurs.

#15 Updated by bastos.eder about 5 years ago

Loading the state generated by the DTM is successful. I've reproduced the issue with multiple games across Wii/GC, though I don't have a list handy. It may be useful to check games with certain audio ucodes.

Because I was able to get it to work once on a "broken" version, a race condition is probably what is happening. Which means the hardware may be an important factor. What are your PC's specs?

#16 Updated by marwinmisselhorn about 5 years ago

This is extremely odd then considering the error message you are describing only occurs during state loading, but your state seems to be fine. If a movie plays or not shouldn't interfere with that at all.

My only guess is it has something to do when a state gets loaded on bootup on your specific environment (Ubuntu, OpenGL).

Try the following. Rename your files like this:

Savestate file: testFile.sav
Movie file: testFile.sav.dtm

Boot the game, make sure "Read Only" is checked under Movie settings, then drag the savestate onto the Dolphin window again. The game should now attempt to load the savestate (which works based off your report) and then play the movie (while the game is already booted up). Try if that maybe works.

#17 Updated by bastos.eder about 5 years ago

So my "specific environment" is more like Windows 8.1 + OpenGL; I reproduced the issue ~50 times on that yesterday while narrowing down which commit caused it.

I mentioned Ubuntu because:

A) It also happens there
B) I built it from source for Ubuntu, resulting in the messages I included originally.

However, those messages don't show up every time when I reproduce on Ubuntu; many times it just locks up and plays a single audio buffer on loop, like what I observed on Windows. I think the messages I included may actually be a red herring here.

Regardless, I wasn't able to get it to work with your additional instructions either.

#18 Updated by marwinmisselhorn about 5 years ago

Mhm, really out of ideas. Im on Windows 7 64 bit using the D3D backend and everything is just fine. Perhaps lets try some options. Disable dual core and idle skipping under general options, change the audio backend to LLE recompiler and try using the D3D backend under graphics if possible.

Record another movie with those settings and see if it plays back then. I will try your exact build next, but Im only slightly below that one and nothing is wrong over here.

Also available in: Atom PDF