lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Sporadic segfault during catastrophic exit


From: Vadim Zeitlin
Subject: Re: [lmi] Sporadic segfault during catastrophic exit
Date: Thu, 7 Jul 2011 12:47:24 +0200

On Mon, 26 Jul 2010 16:27:58 +0000 Greg Chicares <address@hidden> wrote:

GC> To reproduce, spoil 'validated.md5' (e.g. by altering an md5 sum) and try
GC> to start 'lmi_wx_shared.exe' with no arguments. This message:
GC>   At least one required file is missing, altered, or invalid. Try 
reinstalling.
GC>   [file /lmi/src/lmi/authenticity.cpp, line 286]
GC> is supposed to be shown. However, sometimes a segfault occurs. I can
GC> reproduce it more than half the time with
GC>   http://download.savannah.gnu.org/releases-noredirect/lmi/lmi.tar.xz
GC> which today corresponds to lmi-20100701T1133Z HEAD (though I plan to
GC> update that archive every month or so). With current HEAD, I can
GC> reproduce it only about two to five percent of the time.

 Unfortunately I can't reproduce this in my build of LMI HEAD with g++
4.5.3. I've tried running it manually a few times and then, as I couldn't
really bring myself to do it a hundred times, applied this patch

diff --git a/alert_wx.cpp b/alert_wx.cpp
index e96ef30..63f4097 100644
--- a/alert_wx.cpp
+++ b/alert_wx.cpp
@@ -72,7 +72,7 @@ void warning_alert(std::string const& s)
 {
     if(wxTheApp && wxTheApp->GetTopWindow())
         {
-        wxMessageBox(s, "Warning", wxOK, wxTheApp->GetTopWindow());
+        puts(("Warning: " + s).c_str());
         }
     else
         {

and ran (this is zsh short loop syntax):

        for ((n=0;n<100;n++)); ./lmi_wx.exe

But all I got was the expected output on the console consisting of

Warning: At least one required file is missing, altered, or invalid. Try 
reinstalling.
[file /cygdrive/w/src/lmi/authenticity.cpp, line 286]

repeated a hundred times.

 FWIW I don't see any problems in MSVC build neither (which uses debugging
CRT that detects common memory-related bugs in C/C++ code). BTW, I do see a
lot of memory leaks when the program exits prematurely but this is probably
not very important.

 Do you still see this bug (I realize that it was a year ago but I don't
think I saw any changes susceptible to correct it since then)?

 Thanks,
VZ

reply via email to

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