dolphinsmalltalk / Dolphin

Dolphin Smalltalk Core Image
MIT License
294 stars 58 forks source link

Access violation exceptions when debugging Dolphin process with Visual Studio #1284

Closed JBetz closed 4 months ago

JBetz commented 4 months ago

Describe the bug When attached to a Visual Studio debugger, the Dolphin VM throws access violation errors during normal IDE usage. The exception doesn't get surfaced to Dolphin if you click continue, but it does happen enough to interfere with debugging.

To Reproduce Steps to reproduce the behavior:

  1. Open Dolphin image
  2. Open Visual Studio and attach to Dolphin process
  3. Rename a method using context menu in method pane
  4. Access violation exception thrown from Visual Studio

Screenshots image

And soon after: image

Setup

Additional context I did notice there's an option to have Visual Studio ignore certain exception types. Is this necessary to reduce noise from exceptions that are part of normal operation?

blairmcg commented 4 months ago

This is not a bug. It is the use of guard pages to dynamically grow memory, similar to the example given here. In the first you are seeing the stack growing (or about to grow), and in the 2nd case growth of the object table. You can filter them out by module in VisualStudio to exclude the Dolphin VM, either in advance, or from that dialogue. Just tick the "Except when thrown from" box.

JBetz commented 4 months ago

Great, thanks!