biolab / orange3

🍊 :bar_chart: :bulb: Orange: Interactive data analysis
https://orangedatamining.com
Other
4.88k stars 1.02k forks source link

Segmentation fault (core dumped) #4518

Closed Hrovatin closed 4 years ago

Hrovatin commented 4 years ago

I am often getting an error Segmentation fault (core dumped) in Orange (3.25.0 Linux). At first the Orange seems to be frozen for a couple of seconds and then it crashes (the window closes on its own). It seems to be happening at random/not always on the same workflow or its part. The report from when this last happened:

libpng warning: iCCP: known incorrect sRGB profile
QCssParser::parseColorValue: Specified color without alpha value but alpha given: 'rgb 0, 0, 0, 100'
/home/karin/Documents/git/orange-widget-base/orangewidget/widget.py:286: RuntimeWarning: subclassing of widget classes is deprecated and will be disabled in the future.
Extract code from OWGeneSets or explicitly open it.
  RuntimeWarning)
/home/karin/Documents/git/orange-widget-base/orangewidget/widget.py:286: RuntimeWarning: subclassing of widget classes is deprecated and will be disabled in the future.
Extract code from OWPreprocess or explicitly open it.
  RuntimeWarning)
/home/karin/Documents/git/orange3-bioinformatics/orangecontrib/bioinformatics/ncbi/gene/__init__.py:177: OrangeDeprecationWarning: Direct calls to Table's constructor are deprecated and will be removed. Replace this call with Table.from_list
  table = Table(domain, data_x)
/home/karin/Documents/git/orange3/Orange/widgets/settings.py:82: UserWarning: Storing variables as strings in settings is deprecated.
Support for this will be dropped in Orange 3.26.
Change domain_role_hints to store an instance of `Variable`.
  "Storing variables as strings in settings is deprecated.\n"
/home/karin/Documents/git/orange3/Orange/widgets/settings.py:82: UserWarning: Storing variables as strings in settings is deprecated.
Support for this will be dropped in Orange 3.26.
Change domain_role_hints to store an instance of `Variable`.
  "Storing variables as strings in settings is deprecated.\n"
/home/karin/Documents/git/orange3-bioinformatics/orangecontrib/bioinformatics/ncbi/gene/__init__.py:177: OrangeDeprecationWarning: Direct calls to Table's constructor are deprecated and will be removed. Replace this call with Table.from_list
  table = Table(domain, data_x)
/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangecontrib/prototypes/widgets/owunique.py:87: OrangeDeprecationWarning: Call to deprecated <function Domain.__iter__ at 0x7f581ae761e0>; Instead, use Domain.variables
  self.model_attrs = (list(data.domain) + list(data.domain.metas), [])
ERROR:orangewidget.workflow.widgetsscheme:Error calling 'set_dataset' of 'Heat Map (1)'
Traceback (most recent call last):
  File "/home/karin/Documents/git/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 826, in process_signals_for_widget
    handler(*args)
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owheatmap.py", line 557, in set_dataset
    self.update_heatmaps()
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owheatmap.py", line 589, in update_heatmaps
    self.construct_heatmaps_scene(parts, self.effective_data)
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owheatmap.py", line 773, in construct_heatmaps_scene
    self.setup_scene(parts, data)
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owheatmap.py", line 796, in setup_scene
    widget.setHeatmaps(parts)
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/utils/heatmap.py", line 450, in setHeatmaps
    data=X_part, span=parts.span, colormap=colormap,
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/utils/heatmap.py", line 953, in __init__
    self.setHeatmapData(data)
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/utils/heatmap.py", line 987, in setHeatmapData
    self.__updatePixmap()
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/utils/heatmap.py", line 1020, in __updatePixmap
    qimage = qimage_from_array(rgb)
  File "/home/karin/Documents/git/orange3/Orange/widgets/utils/image.py", line 33, in qimage_from_array
    buffer = img.bits().asarray(w * h * 4)
AttributeError: 'NoneType' object has no attribute 'asarray'
-------------------------- AttributeError Exception ---------------------------
Traceback (most recent call last):
  File "/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangecanvas/scheme/signalmanager.py", line 936, in __process_next
    if self.__process_next_helper(use_max_active=True):
  File "/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangecanvas/scheme/signalmanager.py", line 974, in __process_next_helper
    self.process_node(selected_node)
  File "/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangecanvas/scheme/signalmanager.py", line 605, in process_node
    self.send_to_node(node, signals_in)
  File "/home/karin/Documents/git/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 792, in send_to_node
    self.process_signals_for_widget(node, widget, signals)
  File "/home/karin/Documents/git/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 826, in process_signals_for_widget
    handler(*args)
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owheatmap.py", line 557, in set_dataset
    self.update_heatmaps()
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owheatmap.py", line 589, in update_heatmaps
    self.construct_heatmaps_scene(parts, self.effective_data)
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owheatmap.py", line 773, in construct_heatmaps_scene
    self.setup_scene(parts, data)
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owheatmap.py", line 796, in setup_scene
    widget.setHeatmaps(parts)
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/utils/heatmap.py", line 450, in setHeatmaps
    data=X_part, span=parts.span, colormap=colormap,
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/utils/heatmap.py", line 953, in __init__
    self.setHeatmapData(data)
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/utils/heatmap.py", line 987, in setHeatmapData
    self.__updatePixmap()
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/utils/heatmap.py", line 1020, in __updatePixmap
    qimage = qimage_from_array(rgb)
  File "/home/karin/Documents/git/orange3/Orange/widgets/utils/image.py", line 33, in qimage_from_array
    buffer = img.bits().asarray(w * h * 4)
AttributeError: 'NoneType' object has no attribute 'asarray'
-------------------------------------------------------------------------------
QLayout: Attempting to add QLayout "" to ErrorReporting "", which already has a layout
Segmentation fault (core dumped)
janezd commented 4 years ago

@Hrovatin, did #4520 fix it? Is the problem common/replicable enough to check?

Hrovatin commented 4 years ago

I do not know how to reproduce it. I will add the change to my Orange and see if the issue stops happening.

ales-erjavec commented 4 years ago

I do not think #4520 fixed the segmentation fault. I think that happened in the error reporting.

Hrovatin commented 4 years ago

Orange was recently crashing on loading of a relatively large workflow (the one I am currently using). - Sometimes it loads and sometimes it crashes. The error report:

`libpng warning: iCCP: known incorrect sRGB profile
QCssParser::parseColorValue: Specified color without alpha value but alpha given: 'rgb 0, 0, 0, 100'
/home/karin/Documents/git/orange-widget-base/orangewidget/widget.py:286: RuntimeWarning: subclassing of widget classes is deprecated and will be disabled in the future.
Extract code from OWGeneSets or explicitly open it.
  RuntimeWarning)
/home/karin/Documents/git/orange-widget-base/orangewidget/widget.py:979: UserWarning: Storing variables as strings in settings is deprecated.
Support for this will be dropped in Orange 3.26.
Change domain_role_hints to store an instance of `Variable`.
  self.settingsHandler.open_context(self, *a)
/home/karin/Documents/git/orange3/Orange/widgets/data/owselectcolumns.py:310: UserWarning: Storing variables as strings in settings is deprecated.
Support for this will be dropped in Orange 3.26.
Change domain_role_hints to store an instance of `Variable`.
  self.openContext(data)
CRITICAL:orangecanvas.scheme.widgetmanager:
Traceback (most recent call last):
  File "/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangecanvas/scheme/widgetmanager.py", line 240, in __add_widget_for_node
    w = self.create_widget_for_node(node)
  File "/home/karin/Documents/git/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 296, in create_widget_for_node
    widget = self.create_widget_instance(node)
  File "/home/karin/Documents/git/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 409, in create_widget_instance
    widget.__init__()
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owheatmap.py", line 239, in __init__
    self.color_cb = gui.palette_combo_box(self.palette_name)
  File "/home/karin/Documents/git/orange3/Orange/widgets/gui.py", line 92, in palette_combo_box
    cb.setCurrentIndex(model.indexOf(initial_palette))
TypeError: setCurrentIndex(self, int): argument 1 has unexpected type 'NoneType'
----------------------------- TypeError Exception -----------------------------
Traceback (most recent call last):
  File "/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangecanvas/scheme/widgetmanager.py", line 376, in __process_init_queue
    self.ensure_created(node)
  File "/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangecanvas/scheme/widgetmanager.py", line 324, in ensure_created
    self.__add_widget_for_node(node)
  File "/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangecanvas/scheme/widgetmanager.py", line 240, in __add_widget_for_node
    w = self.create_widget_for_node(node)
  File "/home/karin/Documents/git/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 296, in create_widget_for_node
    widget = self.create_widget_instance(node)
  File "/home/karin/Documents/git/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 409, in create_widget_instance
    widget.__init__()
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owheatmap.py", line 239, in __init__
    self.color_cb = gui.palette_combo_box(self.palette_name)
  File "/home/karin/Documents/git/orange3/Orange/widgets/gui.py", line 92, in palette_combo_box
    cb.setCurrentIndex(model.indexOf(initial_palette))
TypeError: setCurrentIndex(self, int): argument 1 has unexpected type 'NoneType'
-------------------------------------------------------------------------------
QLayout: Attempting to add QLayout "" to ErrorReporting "", which already has a layout
`
markotoplak commented 4 years ago

@Hrovatin, could you try to clear widget settings and see if this is still the case?

Hrovatin commented 4 years ago

I did this. However, I still get a similar message after Orange crashed. Now I can not even open the workflow without crashing.


/home/karin/Documents/git/orange-widget-base/orangewidget/widget.py:286: RuntimeWarning: subclassing of widget classes is deprecated and will be disabled in the future.
Extract code from OWGeneSets or explicitly open it.
  RuntimeWarning)
CRITICAL:orangecanvas.scheme.widgetmanager:
Traceback (most recent call last):
  File "/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangecanvas/scheme/widgetmanager.py", line 240, in __add_widget_for_node
    w = self.create_widget_for_node(node)
  File "/home/karin/Documents/git/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 296, in create_widget_for_node
    widget = self.create_widget_instance(node)
  File "/home/karin/Documents/git/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 409, in create_widget_instance
    widget.__init__()
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owheatmap.py", line 239, in __init__
    self.color_cb = gui.palette_combo_box(self.palette_name)
  File "/home/karin/Documents/git/orange3/Orange/widgets/gui.py", line 92, in palette_combo_box
    cb.setCurrentIndex(model.indexOf(initial_palette))
TypeError: setCurrentIndex(self, int): argument 1 has unexpected type 'NoneType'
----------------------------- TypeError Exception -----------------------------
Traceback (most recent call last):
  File "/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangecanvas/scheme/widgetmanager.py", line 376, in __process_init_queue
    self.ensure_created(node)
  File "/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangecanvas/scheme/widgetmanager.py", line 324, in ensure_created
    self.__add_widget_for_node(node)
  File "/home/karin/Documents/git/orange3venv/lib/python3.6/site-packages/orangecanvas/scheme/widgetmanager.py", line 240, in __add_widget_for_node
    w = self.create_widget_for_node(node)
  File "/home/karin/Documents/git/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 296, in create_widget_for_node
    widget = self.create_widget_instance(node)
  File "/home/karin/Documents/git/orange-widget-base/orangewidget/workflow/widgetsscheme.py", line 409, in create_widget_instance
    widget.__init__()
  File "/home/karin/Documents/git/orange3/Orange/widgets/visualize/owheatmap.py", line 239, in __init__
    self.color_cb = gui.palette_combo_box(self.palette_name)
  File "/home/karin/Documents/git/orange3/Orange/widgets/gui.py", line 92, in palette_combo_box
    cb.setCurrentIndex(model.indexOf(initial_palette))
TypeError: setCurrentIndex(self, int): argument 1 has unexpected type 'NoneType'
QLayout: Attempting to add QLayout "" to ErrorReporting "", which already has a layout

[1]+  Killed                  orange-canvas```
ajdapretnar commented 4 years ago

@Hrovatin Please consider editing your comments. It is much easier to inspect the log if it is formatted as code.

Hrovatin commented 4 years ago

@ajdapretnar I spent quite some time trying to get it out of this bold format into code before posting, but I did no manage to do it. if you know why how to solve it please let me know, so that I can correct them. Edit: I have now figured out the issue: the bold was somehow created by long ----------------- in the error report and the code was not working seemingly because there was an empty line in the middle of the error report.