You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the recent changes to use wxOverlay, we're seeing a bunch of crashes and other issues when dragging/docking windows with wxAUI on the Mac. This can be seen with the wxAUI sample with a debug build of wxWidgets. If you start the sample and immediately try to drag one of the tabs off the notebook, an assert is raised and then the app crashes.
MacOS Sonoma 14.4, Xcode 15
The text was updated successfully, but these errors were encountered:
Thanks, I can reproduce this and AFAICS this happens because m_overlayWindow is null, i.e. either wxOverlayImpl::CreateOverlayWindow() hadn't been called, somehow, or it failed. But I don't immediately see why would this happen...
--- a/src/osx/cocoa/overlay.mm
+++ b/src/osx/cocoa/overlay.mm
@@ -280,7 +280,7 @@ void wxOverlayImpl::Clear(wxDC* dc)
void wxOverlayImpl::Reset()
{
- if ( m_window )
+ if ( m_window && m_overlayWindow)
{
// erase whatever was drawn on the overlay the last time
wxClientDC dc(m_window);
It seems to occur when you try to drag the tab (or AUI frame) over something that shouldn't accept the tab/frame in which case there wouldn't be an overlay for it. Thus, there would be nothing to clear/reset.
Thanks! I agree that Reset() shouldn't do anything in this case, so I'm pushing a commit with the same effect, with which I can't reproduce the bug any more. Please let me know if you still see any problems.
It is valid to call Reset() even if Init() had never been called, e.g.
when we didn't need to draw anything on the overlay, but it asserted and
crashed in this case because it used invalid m_overlayWindow under Mac.
Fix this by simply doing nothing in Reset() if m_overlayWindow was not
initialized.
This commit is best viewed ignoring whitespace-only changes.
CloseswxWidgets#24415.
Co-Authored-By: Daniel Kulp <dan@kulp.com>
Description
With the recent changes to use wxOverlay, we're seeing a bunch of crashes and other issues when dragging/docking windows with wxAUI on the Mac. This can be seen with the wxAUI sample with a debug build of wxWidgets. If you start the sample and immediately try to drag one of the tabs off the notebook, an assert is raised and then the app crashes.
MacOS Sonoma 14.4, Xcode 15
The text was updated successfully, but these errors were encountered: