Ticket #920 (new bug)

Opened 3 years ago

Last modified 3 years ago

C++ chrashes

Reported by: miha Owned by: Noughmad
Milestone: Future Component: canvas
Severity: major Keywords:
Cc: matejd Blocking:
Blocked By:

Description

Sometimes the C++ code chrashes. I'm not sure what happens and I can't replicate it. Think of a way to catch this nasty bug ;)

Change History

comment:1 Changed 3 years ago by matija

An example of an exception that happens for no apparent reason.

Unhandled exception of type RuntimeError occured at 9:42:29:
Traceback:
  File: OWLinProjGraph.py, line 430 in mouseMoveEvent
  Code: for curve in self.tooltipCurves: curve.detach()
    RuntimeError: underlying C/C++ object has been deleted 

comment:2 Changed 3 years ago by Noughmad

I get a similar error (underlying C/C++ object has been deleted) when closing the Discretize Qt widget.

comment:3 Changed 3 years ago by matejd

Orange crashes with segmentation fault when I try to return QList<bool> to Python code, but only on large datasets (adult for example). The commented code is in plot3d.cpp in orangeqt:

QList<bool> Plot3D::get_selected_indices()
{
    //return selected_indices.toList(); // TODO: this crashes on adult.tab
    return QList<bool>();
}

To try it out, run ScatterPlot3D on adult.tab.

comment:4 Changed 3 years ago by Noughmad

I tried it, and found the line at which Matej's crash occurs, and it is after the QList<bool> is returned from C++ code.

The code is in OWScatterPlot3D.py in method send_selections() at line 606:

        selected = self.plot.get_selected_indices()
        if len(selected) != len(self.data):
            return
        unselected = numpy.logical_not(selected)
        selected = self.data.selectref(list(selected))
        unselected = self.data.selectref(list(unselected))
        self.send('Selected Examples', selected)
        self.send('Unselected Examples', unselected)

The program crashes at the last line, when sending unselected examples. Selected examples are sent fine (the set is empty), but sending the unselected examples (all 32000 of them) fails.

Replacing the whole function with

self.send('Unselected Examples', self.data)

also crashes, so I think either send() can't handle datasets that large, or there is something wrong with the data.

comment:5 Changed 3 years ago by matejd

This is giving me headaches. Apparently it crashes after sending unselected (send returns).

comment:6 Changed 3 years ago by matejd

  • Cc matejd added
Note: See TracTickets for help on using tickets.