[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53411] variable editor: segfault when opening
From: |
Dan Sebald |
Subject: |
[Octave-bug-tracker] [bug #53411] variable editor: segfault when opening a variable twice |
Date: |
Wed, 21 Mar 2018 19:59:03 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0 |
Follow-up Comment #1, bug #53411 (project octave):
Confirmed... at least on KDE/Plasma Qt 4.4.8. (This didn't happen on Mint
Cinnamon at the time I programmed it.) What are you testing on?
The crash appears to be the last non-comment line before the "Already Open 2"
statement below that I put in place for debugging (after which I added the
"return" to see what FOCUS WIDGET is):
QDockWidget *existing_qdw = m_main->findChild<QDockWidget *> (name);
if (existing_qdw != NULL)
{
// Already open.
std::cerr << "Already Open 1\n";
std::cerr << "FOCUS WIDGET: " << m_main->focusWidget ();
return;
// Put current focused variable out of focus
QFocusEvent event (QEvent::FocusOut, Qt::OtherFocusReason);
QApplication::sendEvent (m_main->focusWidget (), &event);
std::cerr << "Already Open 2\n";
return;
// Put existing variable in focus and raise
event = QFocusEvent (QEvent::FocusIn, Qt::OtherFocusReason);
QApplication::sendEvent (existing_qdw, &event);
s
The focus widget is
>> x = eye(5);
>> openvar x
>> openvar x
>> Already Open 1
FOCUS WIDGET: 0
>>
On the system I programmed initially, I'm sure I had a fairly advanced version
of Qt 5. Either on that system the indicated focus widget is not 0 (why it's
zero on KDE Qt 4.4.8 I'm not sure, as the Command Window is in focus), or Qt
recognizes the widget is 0 and doesn't try sending an event to it.
In any case, this needs a sanity check on the m_main->focusWidget(). There
are a few other similar issues we're trying to iron out for the GUI. I'll
address this one after those few. Shouldn't take too long.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53411>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53411] variable editor: segfault when opening a variable twice, Mike Miller, 2018/03/21
- [Octave-bug-tracker] [bug #53411] variable editor: segfault when opening a variable twice,
Dan Sebald <=
- [Octave-bug-tracker] [bug #53411] variable editor: segfault when opening a variable twice, Mike Miller, 2018/03/21
- [Octave-bug-tracker] [bug #53411] variable editor: segfault when opening a variable twice, Dan Sebald, 2018/03/21
- [Octave-bug-tracker] [bug #53411] variable editor: segfault when opening a variable twice, Rik, 2018/03/22
- [Octave-bug-tracker] [bug #53411] variable editor: segfault when opening a variable twice, Mike Miller, 2018/03/22
- [Octave-bug-tracker] [bug #53411] variable editor: segfault when opening a variable twice, Philip Nienhuis, 2018/03/22
- [Octave-bug-tracker] [bug #53411] variable editor: segfault when opening a variable twice, Dan Sebald, 2018/03/22
- [Octave-bug-tracker] [bug #53411] variable editor: segfault when opening a variable twice, Mike Miller, 2018/03/22
- [Octave-bug-tracker] [bug #53411] variable editor: segfault when opening a variable twice, Dan Sebald, 2018/03/22
- [Octave-bug-tracker] [bug #53411] variable editor: segfault when opening a variable twice, Mike Miller, 2018/03/22