bugLet me illustrate... - Bugs: bug #20240, Segfault induced by very long...


You are not allowed to post comments on this tracker with your current authentification level.

bug #20240: Segfault induced by very long error message

Submitted by:  Greg Chicares <chicares>
Submitted on:  Fri 22 Jun 2007 05:37:07 PM UTC  
Category: GUISeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Sat 02 Aug 2008 04:18:53 PM UTC, comment #1:

I can't reproduce the problem, at least not with wx svn trunk. I tested logging functions with long strings and they seem to work fine.

Can anybody else still reproduce this?


Vadim Zeitlin <zeitlin>
Project Member
Fri 22 Jun 2007 05:37:07 PM UTC, original submission:

Here is an unclean workaround for an observed segfault.
We need to find the root cause and fix it, because the
observed problem could arise in a different case where
we don't happen to use such a workaround.

In 'census_view.cpp':

<< "Line #" << current_line << ": "
// TODO ?? It would be better to use fatal_error() instead of
// warning() followed by fatal_error() with a short string, but
// apparently that can segfault with very long strings. Is there
// a limit on exception size that should be tested here?
fatal_error() << "Invalid input." << LMI_FLUSH;

I never documented a failing testcase; we should try to
establish one using the applicable portion of the original


I believe that ultimately wxSafeShowMessage() should have
been called, but it would seem strange indeed for that
function to segfault, so we really need to nail down a
reproducible testcase. It seems conceivable that the
original code

throw std::range_error(error.str());

caused the segfault before it had a chance to be caught
and fed to wxSafeShowMessage(), though again that would
seem most strange.

Greg Chicares <chicares>
Project Administrator


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by chicares (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    No Changes Have Been Made to This Item

    Back to the top

    Powered by Savane 3.1-cleanup