ctrlcctrlv / wxsand

Owen Piette's Falling Sand Game with patch for compilation on modern systems
Other
27 stars 8 forks source link

Mac OS X 10.13.3 bugs #3

Open jabagawee opened 6 years ago

jabagawee commented 6 years ago

image

Debugging causes me to believe that in the loop in Sand::onRun, we are stuck in the line that says

while (Pending()) Dispatch();

but I do not know enough about the wxWidgets model to figure it out from there.

ctrlcctrlv commented 6 years ago

I, unfortunately, do not have a Mac so can't help with this at all.

Wooldoor commented 4 years ago

I've made some headway in figuring this out. I was having the same problem on macOS 10.14. In Canvas.cpp, uncommenting the line // g_canvas->Refresh(); fixes the drawing issue. I read somewhere that the default background is grey, so this might be related to that. In Sand.cpp, removing the while loop around Dispatch() so that Dispatch is called only once fixes both the segfault on quit and makes the simulation actually run. You have to move your mouse around the window to generate events so that Dispatch will return since it blocks without a previous call to pending, but it runs.