octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #53137] Variable Editor: m_table_colors list s


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #53137] Variable Editor: m_table_colors list should be used with range-checked indices
Date: Mon, 12 Feb 2018 17:49:23 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

URL:
  <http://savannah.gnu.org/bugs/?53137>

                 Summary: Variable Editor: m_table_colors list should be used
with range-checked indices
                 Project: GNU Octave
            Submitted by: sebald
            Submitted on: Mon 12 Feb 2018 10:49:21 PM UTC
                Category: GUI
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Segfault, Bus Error, etc.
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

In doing some debugging on another issue, I came across a consistent crash at
launch that I tracked down to insufficient colors in the m_table_colors list. 
In other words, if the following is not done in the variable_editor
constructor:


  // Colors.

  for (int i = 0; i < resource_manager::varedit_color_chars ().length ();
i++)
    m_table_colors.append (QColor (Qt::white));


Octave will crash.

This isn't a bug per se, since it's only in modifications that I came across
this.  However, Octave shouldn't crash because some color table isn't
initialized sufficiently big.  Also, it wouldn't surprise me if some scenario
is possible in which the resource_manager::varedit_color_chars ().length () is
different between the time of initialization and notice_settings() update,
e.g., a color-theme change in the OS desk top.

Changeset in a moment...




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53137>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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