lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] wxmsw-2.9.0 regression: messagebox doubling


From: Greg Chicares
Subject: Re: [lmi] wxmsw-2.9.0 regression: messagebox doubling
Date: Fri, 27 Feb 2009 12:48:14 +0000
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

On 2009-02-26 19:06Z, Vadim Zeitlin wrote:
> On Thu, 26 Feb 2009 16:40:59 +0000 Greg Chicares <address@hidden> wrote:
> 
> GC> At the risk of overstating the obvious...this:
> GC>   http://lists.nongnu.org/archive/html/lmi/2009-02/msg00056.html
> GC> would seem to be the worst of our remaining issues.
> 
>  This is the same problem which resulted in crash in my initial report,
> i.e. the dangling view pointer wx doc-view code.

Might the cause be different? Given this analysis:

http://lists.nongnu.org/archive/html/lmi/2009-02/msg00059.html
| [...] then it crashes in wx code called from inside
| safe_message_alert() because wxDocMDIChildFrame::m_childView is a dangling
| pointer.

...I tried the patch below [0], but I still observe this problem:
  http://lists.nongnu.org/archive/html/lmi/2009-02/msg00056.html
But with that patch, AFAICT, it is as though the function were
written like this:

void safe_message_alert(char const* message)
{
    ::MessageBoxA(0, message, "Error", MB_OK | MB_ICONSTOP | MB_TASKMODAL);
}

and there's no attempt to dereference any pointer in wx. OTOH,
there's other code in 'alert_wx.cpp' that still uses wx, so
let me try the patchset in your 2009-02-27T12:32Z message that
arrived just as I was about to send this one. Either I'll apply
them to my local copy if I find time, or I'll just wait for the
next daily wx snapshot.

---------

[0] "the patch below"

Index: alert_wx.cpp
===================================================================
RCS file: /sources/lmi/lmi/alert_wx.cpp,v
retrieving revision 1.20
diff -U 3 -r1.20 alert_wx.cpp
--- alert_wx.cpp        31 Dec 2008 21:54:11 -0000      1.20
+++ alert_wx.cpp        27 Feb 2009 12:04:53 -0000
@@ -158,6 +158,7 @@
     std::fflush(stderr);
 #else  // defined LMI_MSW
     HWND handle = 0;
+#   if 0
     if(wxTheApp)
         {
         wxWindow* top_window = wxTheApp->GetTopWindow();
@@ -166,6 +167,7 @@
             handle = reinterpret_cast<HWND>(top_window->GetHandle());
             }
         }
+#   endif // 0
     ::MessageBoxA(handle, message, "Error", MB_OK | MB_ICONSTOP | 
MB_TASKMODAL);
 #endif // defined LMI_MSW
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]