divyang4481 / bizhawk

Automatically exported from code.google.com/p/bizhawk
0 stars 0 forks source link

N64 - Bizhawk runs out of memory after some RAM searches #198

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Bizhawk 1.7.0

After doing quite a few RAM searches, Bizhawk's memory (RAM) usage will reach 
1GB. At this point it throws an error message and the RAM search can't 
continue. ROM in this case was Majora's Mask U.
I would suspect that this would also happen with other cores if not for the 
fact that there RAM search probably never uses this much memory.

Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.

************** Ausnahmetext **************
System.OutOfMemoryException: Eine Ausnahme vom Typ 
"System.OutOfMemoryException" wurde ausgelöst.
   bei System.Collections.Generic.List`1.set_Capacity(Int32 value)
   bei System.Collections.Generic.List`1.EnsureCapacity(Int32 min)
   bei System.Collections.Generic.List`1.Add(T item)
   bei System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   bei System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   bei BizHawk.Client.Common.RamSearchEngine.DoSearch()
   bei BizHawk.Client.EmuHawk.RamSearch.DoSearch()
   bei BizHawk.Client.EmuHawk.RamSearch.SearchMenuItem_Click(Object sender, EventArgs e)
   bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   bei System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
   bei ToolStripEx.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Geladene Assemblys **************
mscorlib
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34014 built by: FX45W81RTMGDR.
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll.
----------------------------------------
EmuHawk
    Assembly-Version: 1.7.0.6812.
    Win32-Version: 1.7.0.6812.
    CodeBase: file:///D:/Programme/bizhawk%20170/EmuHawk.exe.
----------------------------------------
System
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34003 built by: FX45W81RTMGDR.
    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.33440 built by: FX45W81RTMREL.
    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.33440 built by: FX45W81RTMREL.
    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.0.6812.
    Win32-Version: 1.7.0.6812.
    CodeBase: file:///D:/Programme/bizhawk%20170/dll/BizHawk.Client.Common.dll.
----------------------------------------
BizHawk.Emulation.Common
    Assembly-Version: 1.7.0.6812.
    Win32-Version: 1.7.0.6812.
    CodeBase: file:///D:/Programme/bizhawk%20170/dll/BizHawk.Emulation.Common.dll.
----------------------------------------
BizHawk.Emulation.DiscSystem
    Assembly-Version: 1.7.0.6812.
    Win32-Version: 1.7.0.6812.
    CodeBase: file:///D:/Programme/bizhawk%20170/dll/BizHawk.Emulation.DiscSystem.dll.
----------------------------------------
BizHawk.Common
    Assembly-Version: 1.7.0.6812.
    Win32-Version: 1.7.0.6812.
    CodeBase: file:///D:/Programme/bizhawk%20170/dll/BizHawk.Common.dll.
----------------------------------------
System.Core
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.33440 built by: FX45W81RTMREL.
    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:///D:/Programme/bizhawk%20170/dll/SlimDX.dll.
----------------------------------------
BizHawk.Bizware.BizwareGL.OpenTK
    Assembly-Version: 0.0.0.0.
    Win32-Version: 0.0.0.0.
    CodeBase: file:///D:/Programme/bizhawk%20170/dll/BizHawk.Bizware.BizwareGL.OpenTK.dll.
----------------------------------------
BizHawk.Bizware.BizwareGL
    Assembly-Version: 0.0.0.0.
    Win32-Version: 0.0.0.0.
    CodeBase: file:///D:/Programme/bizhawk%20170/dll/BizHawk.Bizware.BizwareGL.dll.
----------------------------------------
OpenTK
    Assembly-Version: 1.1.0.0.
    Win32-Version: 1.1.1475.5656.
    CodeBase: file:///D:/Programme/bizhawk%20170/dll/OpenTK.dll.
----------------------------------------
Microsoft.VisualBasic
    Assembly-Version: 10.0.0.0.
    Win32-Version: 12.0.20806.33440 built by: FX45W81RTMREL.
    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.0.6812.
    Win32-Version: 1.7.0.6812.
    CodeBase: file:///D:/Programme/bizhawk%20170/dll/Bizhawk.Emulation.Cores.dll.
----------------------------------------
Newtonsoft.Json
    Assembly-Version: 6.0.0.0.
    Win32-Version: 6.0.3.17312.
    CodeBase: file:///D:/Programme/bizhawk%20170/dll/Newtonsoft.Json.dll.
----------------------------------------
System.Numerics
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.33440 built by: FX45W81RTMREL.
    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.33440.
    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.33440 built by: FX45W81RTMREL.
    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.33440 built by: FX45W81RTMREL.
    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.33440 built by: FX45W81RTMREL.
    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.33440 built by: FX45W81RTMREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll.
----------------------------------------
mscorlib.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.33440 built by: FX45W81RTMREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll.
----------------------------------------
System.Windows.Forms.resources
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.33440 built by: FX45W81RTMREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------
OpenTK.GLControl
    Assembly-Version: 1.1.0.0.
    Win32-Version: 1.1.1475.5656.
    CodeBase: file:///D:/Programme/bizhawk%20170/dll/OpenTK.GLControl.dll.
----------------------------------------
PresentationFramework
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.34004.
    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.34004 built by: FX45W81RTMGDR.
    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.34004 built by: FX45W81RTMGDR.
    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.33440 built by: FX45W81RTMREL.
    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:///D:/Programme/bizhawk%20170/dll/ICSharpCode.SharpZipLib.dll.
----------------------------------------
System.Configuration
    Assembly-Version: 4.0.0.0.
    Win32-Version: 4.0.30319.33440 built by: FX45W81RTMREL.
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
----------------------------------------

************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms 
festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.

Zum Beispiel:

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

Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
Ausnahmen an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt.

Original issue reported on code.google.com by moritz.g...@gmail.com on 2 Jul 2014 at 3:17

GoogleCodeExporter commented 9 years ago
I can try to manage memory more efficiently, there are some solutions there.  
In the meantime I recommend you turn off Undo when doing searches on N64 
(especially large games like Majoras Mask)

Original comment by adeli...@tasvideos.org on 3 Jul 2014 at 4:47

GoogleCodeExporter commented 9 years ago
Couldn't you just limit how many steps you can go back to like 5 for N64 games? 
That should curb the memory usage, shouldn't it?

Also why does Bizhawk only use 1 GB of RAM? If modern computers have anything 
in excess it's RAM. Ofcourse as a 32 Bit program it can't use more than 2GB, 
but why doesn't it go up to that point?

Original comment by moritz.g...@gmail.com on 4 Jul 2014 at 1:39

GoogleCodeExporter commented 9 years ago
we could limit the undo, sure.  Or save it to disk instead of ram.  Or both.  
That's not trivial, or top priority right now.

A 32bit app is supposed to have 2gigs or so, but in reality, a .net app will 
crash at around 1 gig, due to whatever garbage reasons.

Original comment by adeli...@tasvideos.org on 21 Jul 2014 at 9:43

GoogleCodeExporter commented 9 years ago
Revision 8722 should adequately address this issue, undo now uses less ram, and 
is limited to 5 undos

I tried the most absurd scenario, Majoras Mask, 1 byte searches, and I deleted 
5 addresses one at a time. EmuHawk used a lot of ram but no where near out of 
memory errors.

Original comment by adeli...@tasvideos.org on 2 Jan 2015 at 10:26