Post subject: Bizhawk SNES Problems
Player (54)
Joined: 11/20/2013
Posts: 103
I've encountered several problems with Bizhawk 1.7.2 and rather than post them in the bug reporting thread I've been encouraged to start a new one. So here it is. Issue 1 I filed official bug report #213 for one of the issues I've encountered. It has been closed already and labelled invalid. I have spent half my day today testing and documenting these issues so I would appreciate it not being brushed off like that. What is the correct process here? Do I file a new report? Is there some kind of FAQ I should have read before I tried to contribute because I can't find it. Precise steps I followed: -Launch bizhawk, preset to compatibility mode and TAS profile -Open rom: Dragon View (U) -Record movie from Power-on -Record about 1500 frames of input. Save and stop movie. -Close and re-open Bizhawk -Open rom, Play movie I just recorded. -Playback a while then Stop movie. Save a state sometime after stopping. -Close and reopen Bizhawk -Open rom and attempt to load state. This produces the following error: http://i922.photobucket.com/albums/ad69/khazwolf/BizError_zpsfbf3d72f.png I have tested this repeatedly, on multiple Roms including Dragon View and Super Mario RPG. On my end it is impossible to NOT reproduce it. Issue 2: I often encounter this issue upon loading an SNES Rom and immediately attempting to play a movie. The movie list then appears as normal except with nothing listed. If you then re-open the play movie menu it comes up as usual. This is a minor issue but occurs frequently. Issue 3: On some SNES Roms, Bizhawk will not register the first frame of input following a load state. This has been tested extensively in both Bizhawk 1.7.2 and 1.5.2 on Zelda: Link to the Past, Super Mario RPG and Dragon View. Of these listed, only Dragon View has this problem - as far as I can tell it will never once accept the first frame of input. The other games show some inconsistency however between input immediately after loadstate and input separated by one frame advance from loadstate. eg/ Savestate at frame 100 and 101. In Dragon View, if you load frame 101 and press a button for one frame, it will never be picked up even though it will if you load frame 100 and advance one first. This does not occur in Bizhawk 1.5.2. In both versions of Bizhawk with the other two games mentioned, however, instances could be found where input on immediately loading savestate produced different results from loading a prior state and advancing to the same frame. I have encountered other errors since beginning to use Bizhawk 1.7.2 but I have not had the opportunity to test them further yet. If you would like future feedback in a different format please tell me so.
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
When posting an error box containing an explicitly generic error message (issue #2) can you please expand the details button? Regarding the Issue 3, this is somewhat making some sense and sounds like a reasonable bug. The way bizhawk feeds input to bsnes (or rather, the way bsnes requests it from bizhawk) is kind of weird, and it seems like a good place for a bug. Like, the savestate doesnt remember the last input bsnes polled, and bsnes doesnt poll on every frame.
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
Khaz, are you using 1.7.2a? It was released shortly after 1.7.2. http://sourceforge.net/projects/bizhawk/files/BizHawk/BizHawk-1.7.2a.zip/download Issue 1 I was able to recreate. Issue 2 I was unable to recreate.
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Player (54)
Joined: 11/20/2013
Posts: 103
Issue 2 is common but does not happen every time. It took me three tries to reproduce it right now: Just open bizhawk, open rom, play movie. The details box for it says this:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at SevenZip.SevenZipLibraryManager.InitUserInFormat(Object user, InArchiveFormat format)
   at SevenZip.SevenZipLibraryManager.LoadLibrary(Object user, Enum format)
   at SevenZip.SevenZipExtractor.Init(String archiveFullName)
   at SevenZip.SevenZipExtractor..ctor(String archiveFullName)
   at BizHawk.Client.Common.SevenZipSharpArchiveHandler.Construct(String path)
   at BizHawk.Common.HawkFile.AnalyzeArchive(String path)
   at BizHawk.Common.HawkFile.Open(String path)
   at BizHawk.Client.EmuHawk.PlayMovie.AddMovieToList(String filename, Boolean force)
   at BizHawk.Client.EmuHawk.PlayMovie.<>c__DisplayClass7.<ScanFiles>b__5(Int32 i)
   at System.Threading.Tasks.Parallel.<>c__DisplayClassf`1.<ForWorker>b__c()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
   at System.Threading.Tasks.Parallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body)
   at BizHawk.Client.EmuHawk.PlayMovie.ScanFiles()
   at BizHawk.Client.EmuHawk.PlayMovie.PlayMovie_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at SevenZip.SevenZipLibraryManager.InitUserInFormat(Object user, InArchiveFormat format)
   at SevenZip.SevenZipLibraryManager.LoadLibrary(Object user, Enum format)
   at SevenZip.SevenZipExtractor.Init(String archiveFullName)
   at SevenZip.SevenZipExtractor..ctor(String archiveFullName)
   at BizHawk.Client.Common.SevenZipSharpArchiveHandler.Construct(String path)
   at BizHawk.Common.HawkFile.AnalyzeArchive(String path)
   at BizHawk.Common.HawkFile.Open(String path)
   at BizHawk.Client.EmuHawk.PlayMovie.AddMovieToList(String filename, Boolean force)
   at BizHawk.Client.EmuHawk.PlayMovie.<>c__DisplayClass7.<ScanFiles>b__5(Int32 i)
   at System.Threading.Tasks.Parallel.<>c__DisplayClassf`1.<ForWorker>b__c()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )<---

---> (Inner Exception #1) System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at SevenZip.SevenZipLibraryManager.InitUserInFormat(Object user, InArchiveFormat format)
   at SevenZip.SevenZipLibraryManager.LoadLibrary(Object user, Enum format)
   at SevenZip.SevenZipExtractor.Init(String archiveFullName)
   at SevenZip.SevenZipExtractor..ctor(String archiveFullName)
   at BizHawk.Client.Common.SevenZipSharpArchiveHandler.Construct(String path)
   at BizHawk.Common.HawkFile.AnalyzeArchive(String path)
   at BizHawk.Common.HawkFile.Open(String path)
   at BizHawk.Client.EmuHawk.PlayMovie.AddMovieToList(String filename, Boolean force)
   at BizHawk.Client.EmuHawk.PlayMovie.<>c__DisplayClass7.<ScanFiles>b__5(Int32 i)
   at System.Threading.Tasks.Parallel.<>c__DisplayClassf`1.<ForWorker>b__c()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )<---

---> (Inner Exception #2) System.NullReferenceException: Object reference not set to an instance of an object.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at SevenZip.SevenZipLibraryManager.InitUserInFormat(Object user, InArchiveFormat format)
   at SevenZip.SevenZipLibraryManager.LoadLibrary(Object user, Enum format)
   at SevenZip.SevenZipExtractor.Init(String archiveFullName)
   at SevenZip.SevenZipExtractor..ctor(String archiveFullName)
   at BizHawk.Client.Common.SevenZipSharpArchiveHandler.Construct(String path)
   at BizHawk.Common.HawkFile.AnalyzeArchive(String path)
   at BizHawk.Common.HawkFile.Open(String path)
   at BizHawk.Client.EmuHawk.PlayMovie.AddMovieToList(String filename, Boolean force)
   at BizHawk.Client.EmuHawk.PlayMovie.<>c__DisplayClass7.<ScanFiles>b__5(Int32 i)
   at System.Threading.Tasks.Parallel.<>c__DisplayClassf`1.<ForWorker>b__c()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
   at System.Threading.Tasks.Task.<>c__DisplayClass7.<ExecuteSelfReplicating>b__6(Object )<---



************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
EmuHawk
    Assembly Version: 1.7.2.7275
    Win32 Version: 1.7.2.7275
    CodeBase: file:///C:/Biz172/EmuHawk.exe
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1002 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
BizHawk.Client.Common
    Assembly Version: 1.7.2.7275
    Win32 Version: 1.7.2.7275
    CodeBase: file:///C:/Biz172/dll/BizHawk.Client.Common.dll
----------------------------------------
BizHawk.Emulation.Common
    Assembly Version: 1.7.2.7275
    Win32 Version: 1.7.2.7275
    CodeBase: file:///C:/Biz172/dll/BizHawk.Emulation.Common.dll
----------------------------------------
BizHawk.Emulation.DiscSystem
    Assembly Version: 1.7.2.7275
    Win32 Version: 1.7.2.7275
    CodeBase: file:///C:/Biz172/dll/BizHawk.Emulation.DiscSystem.dll
----------------------------------------
BizHawk.Common
    Assembly Version: 1.7.2.7275
    Win32 Version: 1.7.2.7275
    CodeBase: file:///C:/Biz172/dll/BizHawk.Common.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
SlimDX
    Assembly Version: 4.0.10.43
    Win32 Version: 
    CodeBase: file:///C:/Biz172/dll/SlimDX.dll
----------------------------------------
BizHawk.Bizware.BizwareGL.OpenTK
    Assembly Version: 0.0.0.0
    Win32 Version: 0.0.0.0
    CodeBase: file:///C:/Biz172/dll/BizHawk.Bizware.BizwareGL.OpenTK.dll
----------------------------------------
BizHawk.Bizware.BizwareGL
    Assembly Version: 0.0.0.0
    Win32 Version: 0.0.0.0
    CodeBase: file:///C:/Biz172/dll/BizHawk.Bizware.BizwareGL.dll
----------------------------------------
OpenTK
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.1475.5656
    CodeBase: file:///C:/Biz172/dll/OpenTK.dll
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 10.0.0.0
    Win32 Version: 10.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
BizHawk.Emulation.Cores
    Assembly Version: 1.7.2.7275
    Win32 Version: 1.7.2.7275
    CodeBase: file:///C:/Biz172/dll/Bizhawk.Emulation.Cores.dll
----------------------------------------
Newtonsoft.Json
    Assembly Version: 6.0.0.0
    Win32 Version: 6.0.3.17312
    CodeBase: file:///C:/Biz172/dll/Newtonsoft.Json.dll
----------------------------------------
System.Numerics
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.ComponentModel.DataAnnotations
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.DataAnnotations/v4.0_4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll
----------------------------------------
System.Runtime.Serialization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.Xml.Linq
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.0.30319.296 (RTMGDR.030319-2900)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
OpenTK.GLControl
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.1475.5656
    CodeBase: file:///C:/Biz172/dll/OpenTK.GLControl.dll
----------------------------------------
PresentationFramework
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.298
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
WindowsBase
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.298 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
PresentationCore
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.298 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
System.Xaml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.298 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
----------------------------------------
ICSharpCode.SharpZipLib
    Assembly Version: 0.86.0.518
    Win32 Version: 0.86.0.518
    CodeBase: file:///C:/Biz172/dll/ICSharpCode.SharpZipLib.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
I hadn't noticed 1.7.2a yet. I don't see changes related to these issues but I will try it sometime tomorrow I guess.
Editor
Joined: 3/31/2010
Posts: 1466
Location: Not playing Puyo Tetris
Ok. I also got Issue 2. Once. It's not just SNES based. I was attempting to start playback for Mario Kart 64. When I went to the Play Movie Dialog, I got that error message. I was unable to recreate it though.
When TAS does Quake 1, SDA will declare war. The Prince doth arrive he doth please.
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
alright thanks guys, thats what i needed. this is unrelated to any other movie or snes issues 98% positively, and I'll tackle it shortly. Issues #1 and #3 seem to be the same thing basically, and the problem is well understood. We're contemplating ways to solve it.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
khaz, this report was very valuable and what we found is a nasty bug. All your problems (other than the play movie dialog) stem from this. To be clear this bug is only on sneshawk and only in the context of using the emulator after stopping a movie. To get you back to productive TASing until the next release, whenever you stop a movie, go to emulation menu and do reboot core. It is annoying, but will save you from all these bugs. And don't trust any non-movie savestate you have made previously, those are hosed. The play movie dialog can be worked around too. Just drag & drop a movie onto the window to quickly load it. Also, for TASing, it is faster to do file -> recent rom -> autoload and File -> movie -> recent -> autoload. This will save you a lot of time, and avoid play dialog crashes.
It's hard to look this good. My TAS projects
Player (54)
Joined: 11/20/2013
Posts: 103
Thanks adelikat, I was starting to worry I was going insane yesterday... That advice is all extremely helpful and I appreciate it, I wasn't aware there was an autoload feature (I tend to ignore "Recent" menus). That alone is going to save me an insane amount of time. I wish you luck correcting the problem!
Editor, Emulator Coder
Joined: 8/7/2008
Posts: 1156
I believe I solved Issue #2 in r7351. I didnt repro it or even debug it, but by inspection of the stacktrace, it appeared that there was a race condition in static methods for library initialization in the SevenZipSharp code we use, which would need to be solved by locks, which I then found in a newer version of SevenZipSharp. So, I upgraded our SevenZipSharp. Lets see if that fixes it, I'm pretty confident it will.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3573)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
this should fix all issues brought up here.
It's hard to look this good. My TAS projects