Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
How much memory does your system have?
Have much is free before you load BizHawk?
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
In a nutshell, when I try to load up my tasproj file I get the error "Unable to read beyond the end of the stream."
I was working on a project and decided to take a break, saved and left Bizhawk/TAStudio open. I went to play a different game and when I finished, I noticed Bizhawk had crashed. After relaunching and trying to open my project file, I got this error.
I'm not sure what to do, can it be fixed? Any help or advice is appreciated.
Joined: 10/12/2011
Posts: 6438
Location: The land down under.
Now assuming no input is lost forever.
There are many different steps you can take, the easiest one is to (attempt to) upload it here for someone to look into. (If it doesn't upload, do an offsite like mega)
All we basically need is the name of the game, and it shouldn't be an issue to wait on a fix.
The alternate solution.
Load the game on BizHawk, create a new tas project, save (as a different filename) and close BizHawk.
Now, unzip both of them.
Move "Header" and "Input Log" from the old project to the new one.
Zip up the new one and change the extension from .zip to .tasproj
Then pray that it works.
Disables Comments and Ratings for the YouTube account.Something better for yourself and also others.
Already did this after beeing pointed to those options by the changelog.
My Computer has 16BG RAM, 64bit OS.
Free RAM was available all the time, at the moment of the latest crash, BizHawk used approx. 650MB RAM.
As an addition: If I TAS without TAStudio (using just BizHawk, Savestates, etc.) the game runs perfectly fine.
Joined: 4/17/2010
Posts: 11475
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Open it as an archive and remove the GreenZone file.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Joined: 4/17/2010
Posts: 11475
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Your branches (as well as states) died when you saved it, don't know how. You might want to learn to stably reproduce such tasproj corruption so we can try fixing it.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
feos: Updating branch, then saving immidiately after it seems to do some nasty things. The progress bar goes really fast when saving, I'm not sure if it is the same, as it happened to me on v1.11.3, all input files files in the tasproj gone. Since then I look at the progress bar when saving.
Joined: 11/13/2006
Posts: 2822
Location: Northern California
Is that what causes that bug to happen? I've had it happen to me pretty frequently as well but I could never tell what caused it, even when trying to manually reproduce it.
TASvideos Admin and acting Senior Judge 💙 Currently unable to dedicate a lot of time to the site, taking care of family.
Now infrequently posting on Bluesky
Joined: 4/17/2010
Posts: 11475
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Can't reproduce it the way TASeditor describes.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Alright I figured out an easy way to reproduce it. Using my project file, I let TAStudio play the game for about 2000 frames. From there I pause, add 10 branches and save. This causes the super fast saving that doesn't actually save lol. I tested this a few times and it worked every time.
From here if I try to exit, TAStudio will prompt me to save. Saying no, then trying to re-open the file will give "Unable to read beyond the end of the stream."
There was also an alternate way I reproduced it. It involved letting the file play for about 10,000 frames then adding a single branch and saving. Both methods seem to work consistently.
Joined: 4/17/2010
Posts: 11475
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Uh, I guess I'd have to invoke Suuper on this too, I don't understand the tsm logic enough. It erroneously counts branch states as greenzone when figuring out which states it can afford dropping from the greenzone during saving. Hold on.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Joined: 4/17/2010
Posts: 11475
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
Can you compile the latest commit?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
I wasn't able to get a "Unable to read beyond the end of the stream." error. (I tried running a game for 2,000 frames, creating 10 branches, then saving.)
Do you have "Metadata" -> "Savestate History Settings" -> "Put branch states to .tasproj" enabled? (I didn't get the error either way.)
I fixed a few things that I did find, so maybe your bug will also be fixed.
Joined: 11/13/2006
Posts: 2822
Location: Northern California
Copy-pasting from the issue tracker:
Unpausing at the end of a file activates live-recording mode once new blank frames are added. This persists upon loading a branch. This only happens specifically when the movie is unpaused: Live-recording deactivates whenever frame advance is used, and frame-advancing past the end of the current file does not activate it.
Reproduction steps:
1. Create a new tasproj file and paint 100 frames of input
2. Set a branch at frame 1
3. Unpause the movie and let it run past frame 100
4. Pause the movie, load the branch, then unpause again
I think the intended behavior is that live-recording only activates whenever the movie is set to Read+Write, but this is happening with the movie set to Read-Only.
TASvideos Admin and acting Senior Judge 💙 Currently unable to dedicate a lot of time to the site, taking care of family.
Now infrequently posting on Bluesky
Did you try by alternating quickly the two options of creating branches?(don't give a name, just click cancel)? Or even alternate it, but not 50%. I reproduce it frequently by doing this. I just did it from an exported BK2 movie from a tasproj that I reconverted to tasproj.(On GBA... mgba core)
Also, try 20 000 frames.
After alternating, I click "save as", create a new movie.
Open an another movie
Reopen the just saved movie.
REDDIT:
Steps I did:(Feos request, and I should've provided it before)
-Open a GBA game
-Open TAStudio
-Let it play for 17000 frames(Sorry for the length)
-Save 5 times with the "Add Branch", 5 times with the "Add Branch with text" (Cancelling each time, so you don't give a name to the branch). You alternate these 10 ten branches: one with the first, one with the second, one with the first... Do it quickly.
-Save as X quickly (I named it real quick too)
- New movie
-Open X
allback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Joined: 4/17/2010
Posts: 11475
Location: Lake Chargoggagoggmanchauggagoggchaubunagungamaugg
What makes you think it's the same problem?
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
@niamek: I am unable to reproduce your error.
I don't see how doing something quickly would mess anything up, and I also don't know how quickly you mean for me to do it. If you could find a method of reproducing the error that doesn't require quick clicking, that would be great.
(It also seems that this situation is so contrived that nobody would ever accidentally encounter it...)
Also, please post the settings you have under "Metadata..." -> "Savestate History Settings"
When I tried it with branch states turned off, everything worked the way it is supposed to. With it turned on, however, I got a different error when I tried to re-open it. Bizhawk told me that the system Id did not match; the movie had no system Id set. (When I changed the code to bypass that check, it found other problems with it.)
I don't know if this is a problem caused by that setting being half-baked, or somewhere else. Could someone familiar with movie saving look into it?
(I tested with Mario Kart Super Circuit, US.)