-
Notifications
You must be signed in to change notification settings - Fork 383
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
Refactor InputDisplayGenerator and LogEntryGenerator handling #3742
Conversation
I get NullReferenceExceptions because
|
I get a System.NullReferenceException: Object reference not set to an instance of an object.
at BizHawk.Client.EmuHawk.TAStudio.UpdateAutoFire(String button, Nullable`1 isOn)
at BizHawk.Client.EmuHawk.TAStudio.UpdateAutoFire()
at BizHawk.Client.EmuHawk.TAStudio.LoadFile(FileInfo file, Boolean startsFromSavestate, Int32 gotoFrame)
at BizHawk.Client.EmuHawk.TAStudio.Engage()
at BizHawk.Client.EmuHawk.TAStudio.Tastudio_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at BizHawk.Client.EmuHawk.FormBase.OnLoad(EventArgs e) |
When does this happen? Just opening TAStudio works fine for me, are there certain steps required? |
Yes, You need to have an external tool set to auto-load a game when EmuHawk starts, which means TAStudio will also need to be set to auto-load a TASPROJ file when EmuHawk launches as well. So, it's more like:
Let me know if you need more information. |
I just get |
You're using the wrong build. That's an older version prior to the Bot settings file changes, prior to the v2.9 stable release. Here's the actual latest build. GeneticAlgorithmBot-v1.0.4-dev.zip (Pre-release here: https://github.com/tommai78101/Bizhawk-GeneticAlgorithmBot/releases/tag/neat-1.0.4) I compiled my bot with the latest BizHawk dev build, so it should at least get you past that benign error. UPDATE: Actually I got a different error when I don't use VS2022 to attach to the EmuHawk.exe process. YoshiRulz said this might be a completely different bug that's happening inside ************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at System.Windows.Forms.ToolStripControlHost.SetVisibleCore(Boolean visible)
at BizHawk.Client.EmuHawk.TAStudio.UpdateProgressBar()
at BizHawk.Client.EmuHawk.TAStudio.StopSeeking(Boolean skipRecModeCheck)
at BizHawk.Client.EmuHawk.TAStudio.AskSaveChanges()
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Enumerable.All[TSource](IEnumerable`1 source, Func`2 predicate)
at BizHawk.Client.EmuHawk.MainForm.<.ctor>b__6_9(Object o, CancelEventArgs e)
at System.Windows.Forms.Form.OnClosing(CancelEventArgs e)
at System.Windows.Forms.Form.WmClose(Message& m)
at BizHawk.Client.EmuHawk.MainForm.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) Now I'm thinking it might not be related to your UPDATE 2: Found the source of the crash I reported earlier 18 hours ago. It's located in FINAL UPDATE: I figured out my issue now. |
75c0e99
to
97690f7
Compare
I'm really excited to see this change |
I can already see this avalanching into 100 different bugs
also optimize LsmvImport
97690f7
to
62b1d80
Compare
This PR aims to simplify the
Bk2InputDisplayGenerator
andBk2LogEntryGenerator
handling, especially in regards to the manyIController
classes that exist, and improve caching.Is this safe? It should be. Further simplifying the different controller types would help with the clarity here.
Basically, there is now one
InputDisplayGenerator
field on theInputManager
class that always uses theActiveController
'sControllerDefinition
as basis. As far as I understand the code, that's all that's required but it was being handled much more complicated before.Additionally I've added a
ILogEntryController : IController
interface that is now applied toIMovieController
as well, and just contains oneBk2LogEntryGenerator
cached as a field on theILogEntryController
to be used for log entry generation from that controller, without having to create a new one every time or caching it on aBk2Movie
(which was apparently problematic before: f6135ab).