[Top][All Lists]

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

[Octave-bug-tracker] [bug #63714] uitable may show nan with data=zero

From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #63714] uitable may show nan with data=zero
Date: Fri, 27 Jan 2023 14:40:22 -0500 (EST)

Follow-up Comment #5, bug #63714 (project octave):

With Octave build from the current default branch on my debian system, I don't
see NaN appearing in the table but I do see the "Table data is not editable at
this location" warnings and I am able to cause a crash when running with the
thread sanitizer.

If you add the property

'celleditcallback', @(h, event) disp (event)

to the uitable definition, is the crash avoided?  Or, with the following
change to Octave, is the crash avoided?  At least for me, the warning was
coming from Table::sendCellEditCallback and it looks like the problem is that
Octave's warning function should not be called directly from the GUI thread.

diff --git a/libgui/graphics/Table.cc b/libgui/graphics/Table.cc
--- a/libgui/graphics/Table.cc
+++ b/libgui/graphics/Table.cc
@@ -558,8 +558,6 @@ OCTAVE_BEGIN_NAMESPACE(octave)
         emit gh_callback_event (m_handle, "celleditcallback",
-    else if (error.string_value ().length () > 0)
-      warning ("%s", error.string_value ().c_str ());

To be compatible with Matlab, I don't think we should be issuing a warning if
celleditcallback is not provided.

Also, it appears that this function is being called from the
Table::itemChanged function when the indices of the edited item are out of
range for the current data in the uitable.  I'm still trying to understand how
that can happen.


Reply to this item at:


Message sent via Savannah

reply via email to

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