TASEmulators / TASEmulators/BizHawk

Lua Console Right-click crash(It looks like the same bug happened in several places)

Open
#4,842 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
2.8k
Forks
468
PR merge metrics
No merged PRs in 30d

Description

  1. After opening the Lua Console window, first right-click in the message window under the “Output” tab, then immediately right-click in the list on the left; an error occurs.
  2. When open the Cheat window, click any menu item, and then immediately right-click the list below, an error occurs.
    有关调用实时(JIT)调试而不是此对话框的详细信息,
    请参见此消息的结尾。

************** 异常文本 **************
System.NullReferenceException: 未将对象引用设置到对象的实例。
在 BizHawk.Client.EmuHawk.InputRoll.CalculatePointedCell(Int32 x, Int32 y) 位置 /src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs:行号 1941
在 BizHawk.Client.EmuHawk.InputRoll.OnMouseMove(MouseEventArgs e) 位置 /src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs:行号 1070
在 BizHawk.Client.EmuHawk.InputRoll.OnMouseDown(MouseEventArgs e) 位置 /src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs:行号 1187
在 System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs, especially CalculatePointedCell at line 1941 and the mouse handlers at lines 1070 and 1187. Reproduce the right-click sequences in the Lua Console and Cheat window, then trace which state is null. Done means both workflows no longer raise the reported NullReferenceException.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.