Skip to content
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

TAStudio Config Set max Undo Levels cause an exception: "Value was either too large or too small for an Int32" #1555

Croopper opened this issue Apr 22, 2019 · 2 comments


None yet
3 participants
Copy link

commented Apr 22, 2019

Default 100 undo levels are definitely not enough! So I decided to change it to much more and I entered this value 9999999999 then I got the exception:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.OverflowException: Value was either too large or too small for an Int32.
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at BizHawk.Client.EmuHawk.TAStudio.SetMaxUndoLevelsMenuItem_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


This exception is similar to this one: #1549 I guess?


This comment has been minimized.

Copy link

commented Apr 22, 2019

It's look like that everywhere in emulator where is the possibility to enter this number is the same error.

@YoshiRulz YoshiRulz removed their assignment Apr 22, 2019


This comment has been minimized.

Copy link

commented Apr 27, 2019

The prompt is designed to accept various things like signed int and hex, so it's the caller's job to parse it properly. Everywhere it's just assumed to be int, and anything beyond that dies. A good solution would be adding the range arguments to the prompt so it could clamp before returning, even tho it still returns a string, so it's up to a debate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.