lmi
[Top][All Lists]
Advanced

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

Re: [lmi] wx_test: output strings truncated to one character


From: Greg Chicares
Subject: Re: [lmi] wx_test: output strings truncated to one character
Date: Wed, 10 Feb 2016 16:22:54 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

On 02/10/2016 02:31 PM, Vadim Zeitlin wrote:
> On Tue, 9 Feb 2016 15:54:50 +0000 Greg Chicares <address@hidden> wrote:
> 
> GC> Building and running lmi (HEAD) in msw-7, we observe that this
> GC> code in 'wx_test_about_version.cpp':
> GC>   // Extract the last word of the dialog title.
> GC>   wxString const last_word = d->GetTitle().AfterLast(' ');
> GC>   wxPrintf("About dialog version string is \"%s\".\n", last_word);
> GC>   LMI_ASSERT_EQUAL(last_word, LMI_VERSION);
> GC> prints:
> GC>   About dialog version string is "2".
> GC> but LMI_VERSION is:
> GC>   #define LMI_VERSION "20160114T1914Z"
> GC> and the assertion above succeeds, so it seems that the wxString
> GC> is correct but something is wrong with wxPrintf().
> 
>  This is fixed by
> 
> https://github.com/wxWidgets/wxWidgets/commit/06458cb89fb8449f377b0b782404b9a9cbe3ae2d
> 
> which should work in all cases. As you can see, the fix itself is trivial,
> it's just testing it with the different MinGW compilers/versions/modes
> (-std=xxx) that was not.
> 
>  I don't see any mechanism by which this bug could result in memory
> corruption (as it just passed a wide string to the format specifier
> expecting a narrow string), so, unfortunately, I don't think it was also
> responsible for the other problems you've observed, but you will probably
> still want to update to this wxWidgets commit if only to get readable
> output from wx_test. And if it somehow also fixes the other problems, it
> could be a nice bonus...

I've updated wx to this SHA
  730c1ee79b77b3eab58881492b2de6b659319ba2
and rebuilt with an 'install_wx.make' that otherwise matches HEAD
(I've reverted all the other recent local changes).

Naively rerunning the GUI test without rebuilding lmi...I looked, and behold
  Error

  Abnormal-termination handler called. Please report this problem.

and his name that sat on him was
  pure virtual method called
and
  'UnregisterClass' failed with error 0x00000584
followed with him. So let's try to exorcize that by rebuilding lmi.

The good news (which we were sure of) is:
- c: skipped (n)
+ configurable_settings: skipped (not running distribution tests)

The bad news is:
  Error

  Abnormal-termination handler called. Please report this problem.

and
  pure virtual method called
and
  In file ../include/wx/msw/private.h at line 809: 'UnregisterClass'
  failed with error 0x00000584 (class still has open windows.).


Let's try gdb:

/opt/lmi/bin[1]$gdb --quiet ./wx_test.exe
Reading symbols from ./wx_test.exe...done.
(gdb) set arg --ash_nazg --data_path=/opt/lmi/data
(gdb) b __cxa_pure_virtual
Breakpoint 1 at 0x44f770
(gdb) r
Starting program: /opt/lmi/bin/wx_test.exe --ash_nazg --data_path=/opt/lmi/data
[New Thread 2652.0xe04]

Breakpoint 1, 0x66ccb5d0 in __cxa_pure_virtual ()
   from 
/opt/lmi/local/lib/wxmsw310u_gcc_gcc-491-1ce7f42362ba3075eeb4be4679f88dd3.dll
(gdb) bt
#0  0x66ccb5d0 in __cxa_pure_virtual ()
   from 
/opt/lmi/local/lib/wxmsw310u_gcc_gcc-491-1ce7f42362ba3075eeb4be4679f88dd3.dll
#1  0x66d46f66 in wxTextAutoCompleteData::ChangeStrings(wxArrayString const&)
    ()
   from 
/opt/lmi/local/lib/wxmsw310u_gcc_gcc-491-1ce7f42362ba3075eeb4be4679f88dd3.dll
#2  0x00228fa8 in ?? ()
#3  0x04c790c3 in wxArgNormalizer<wchar_t const*>::wxArgNormalizer (index=5,
    fmt=0xc9bc452f, value=<optimized out>, this=<optimized out>)
    at ../include/wx/strvararg.h:451
#4  wxArgNormalizerWchar<wchar_t const*>::wxArgNormalizerWchar (index=5,
    fmt=0xc9bc452f, value=<optimized out>, this=<optimized out>)
    at ../include/wx/strvararg.h:471
#5  wxLogger::Log<char const*, int, wchar_t const*, long, wchar_t const*> (
    a5=<optimized out>, a4=<optimized out>,
    a3=0x549bdd8 
<_ZZN15wxArgNormalizerIiEC4EiPK14wxFormatStringjE12__FUNCTION__+1416> 
L"GetObject(HBITMAP)", a2=378,
    a1=0x549b964 
<_ZZN15wxArgNormalizerIiEC4EiPK14wxFormatStringjE12__FUNCTION__+276> 
"../src/msw/gdiimage.cpp", f1=..., this=0xc9bc455b)
    at ../include/wx/log.h:961
#6  wxBMPResourceHandler::LoadFile (this=<optimized out>,
    bitmap=<error reading variable: Cannot access memory at address 
0xc9bc4593>,---Type <return> to continue, or q <return> to quit---
 name=<error reading variable: Cannot access memory at address 0xc9bc4597>)
    at ../src/msw/gdiimage.cpp:378
Backtrace stopped: Cannot access memory at address 0xc9bc458f
(gdb) k
Kill the program being debugged? (y or n) y
(gdb) q




reply via email to

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