Re: segfault
Nerijus Baliunas <[email protected]> Wed, 4 Nov 2009 17:38:46 +0200
| Newsgroups | gmane.mail.mahogany.devel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 10 Sep 2009 14:51:46 +0200 Vadim Zeitlin <[email protected]> wrote: VZ> NB> with latest svn when trying to view html message: VZ> NB> VZ> NB> Program received signal SIGSEGV, Segmentation fault. VZ> NB> 0x323d6465 in ?? () VZ> ... VZ> NB> (gdb) bt VZ> NB> #0 0x323d6465 in ?? () VZ> NB> #1 0xb7fa3c47 in wxHtmlWindow::CreateLayout (this=0x8aaf000) VZ> NB> at ../wxWidgets/src/html/htmlwin.cpp:693 VZ> VZ> This is really strange, m_Cell may not be NULL here (it's checked for just VZ> above) so apparently it's a dangling pointer but I don't know how could VZ> this happen and there have definitely been no recent changes to wxHTML VZ> which could explain it. I found the bad change by bitsecting: Index: src/html/htmlwin.cpp =================================================================== --- htmlwin.cpp (revision 61771) +++ htmlwin.cpp (revision 61772) @@ -467,11 +467,8 @@ SetBackgroundImage(wxNullBitmap); m_Parser->SetDC(dc); - if (m_Cell) - { - delete m_Cell; - m_Cell = NULL; - } + + delete m_Cell; m_Cell = (wxHtmlContainerCell*) m_Parser->Parse(newsrc); delete dc; m_Cell->SetIndent(m_Borders, wxHTML_INDENT_ALL, wxHTML_UNITS_PIXELS); 61771 works, 61772 crashes. Regards, Nerijus ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july