Repository: silx-kit/silx
Issue: [profile] Exception while processing a live scatter

Flint exception. Still have to investigate.

```
ERROR 2020-06-05 12:52:36,156 flint.output: ERROR:silx.gui.plot.tools.profile.manager:Error while computing profilea [01:27]                  
ERROR 2020-06-05 12:52:36,192 flint.output: Traceback (most recent call last):                            20                                  
ERROR 2020-06-05 12:52:36,192 flint.output:   File "/home/ordinateur/Software/miniconda3/envs/blissenv/lib/python3.7/site-packages/silx/gui/pl
ot/tools/profile/manager.py", line 110, in run                                                                                                
ERROR 2020-06-05 12:52:36,194 flint.output:     profileData = self._roi.computeProfile(self._item)                                            
ERROR 2020-06-05 12:52:36,200 flint.output:   File "/home/ordinateur/Software/miniconda3/envs/blissenv/lib/python3.7/site-packages/silx/gui/plot/tools/profile/rois.py", line 794, in computeProfile
ERROR 2020-06-05 12:52:36,200 flint.output:     profile = self._computeProfile(item, x0, y0, x1, y1)                               
ERROR 2020-06-05 12:52:36,201 flint.output:   File "/home/ordinateur/Software/miniconda3/envs/blissenv/lib/python3.7/site-packages/silx/gui/pl
ot/tools/profile/rois.py", line 750, in _computeProfile                                                                                       ERROR 2020-06-05 12:52:36,203 flint.output:     interpolator = future.result()                                                                
ERROR 2020-06-05 12:52:36,203 flint.output:   File "/home/ordinateur/Software/miniconda3/envs/blissenv/lib/python3.7/concurrent/futures/_base.
py", line 433, in result                                                                                                           
ERROR 2020-06-05 12:52:36,204 flint.output:     raise CancelledError()                                                                        ERROR 2020-06-05 12:52:36,208 flint.output: concurrent.futures._base.CancelledError                                                           
ERROR 2020-06-05 12:52:36,642 flint.output: ERROR:silx.gui.plot.tools.profile.manager:Error while computing profile       7        
ERROR 2020-06-05 12:52:36,642 flint.output: Traceback (most recent call last):                                                     
ERROR 2020-06-05 12:52:36,674 flint.output:   File "/home/ordinateur/Software/miniconda3/envs/blissenv/lib/python3.7/site-packages/silx/gui/plot/tools/profile/manager.py", line 110, in run
ERROR 2020-06-05 12:52:36,674 flint.output:     profileData = self._roi.computeProfile(self._item)                                            
ERROR 2020-06-05 12:52:36,676 flint.output:   File "/home/ordinateur/Software/miniconda3/envs/blissenv/lib/python3.7/site-packages/silx/gui/plot/tools/profile/rois.py", line 794, in computeProfile
ERROR 2020-06-05 12:52:36,717 flint.output:     profile = self._computeProfile(item, x0, y0, x1, y1)                      8                   ERROR 2020-06-05 12:52:36,718 flint.output:   File "/home/ordinateur/Software/miniconda3/envs/blissenv/lib/python3.7/site-packages/silx/gui/pl
ot/tools/profile/rois.py", line 750, in _computeProfile
ERROR 2020-06-05 12:52:36,719 flint.output:     interpolator = future.result()                                                                
ERROR 2020-06-05 12:52:36,727 flint.output:   File "/home/ordinateur/Software/miniconda3/envs/blissenv/lib/python3.7/concurrent/futures/_base.
py", line 433, in result
ERROR 2020-06-05 12:52:36,727 flint.output:     raise CancelledError()                                                                        
ERROR 2020-06-05 12:52:36,727 flint.output: concurrent.futures._base.CancelledError                                                           
```

Changed files:
silx/gui/plot/tools/profile/rois.py

diff --git a/silx/gui/plot/tools/profile/rois.py b/silx/gui/plot/tools/profile/rois.py
index 280eadd9e..b49679c59 100644
--- a/silx/gui/plot/tools/profile/rois.py
+++ b/silx/gui/plot/tools/profile/rois.py
@@ -37,6 +37,7 @@ __date__ = "03/04/2020"
 
 import numpy
 import weakref
+from concurrent.futures import CancelledError
 
 from silx.gui import colors
 
@@ -324,7 +325,8 @@ class _DefaultImageProfileRoiMixIn(core.ProfileRoiMixIn):
         title = title + "; width = %d" % lineWidth
 
         # Use the axis names from the original plot
-        plot = item.getPlot()
+        profileManager = self.getProfileManager()
+        plot = profileManager.getPlotWidget()
         title = _relabelAxes(plot, title)
         xLabel = _relabelAxes(plot, xLabel)
 
@@ -458,7 +460,8 @@ class ProfileImageDirectedLineROI(roi_items.LineROI,
         yLabel = str(method).capitalize()
 
         # Use the axis names from the original plot
-        plot = item.getPlot()
+        profileManager = self.getProfileManager()
+        plot = profileManager.getPlotWidget()
         xLabel = _relabelAxes(plot, xLabel)
         title = _relabelAxes(plot, title)
 
@@ -747,7 +750,10 @@ class _DefaultScatterProfileRoiMixIn(core.ProfileRoiMixIn):
         :return: (points, values) profile data or None
         """
         future = scatter._getInterpolator()
-        interpolator = future.result()
+        try:
+            interpolator = future.result()
+        except CancelledError:
+            return None
         if interpolator is None:
             return None  # Cannot init an interpolator
 
@@ -807,8 +813,9 @@ class _DefaultScatterProfileRoiMixIn(core.ProfileRoiMixIn):
             xProfile = points[:, 1]
             xLabel = '{ylabel}'
 
-        # Use the axis names from the original plot
-        plot = item.getPlot()
+        # Use the axis names from the original
+        profileManager = self.getProfileManager()
+        plot = profileManager.getPlotWidget()
         title = _relabelAxes(plot, title)
         xLabel = _relabelAxes(plot, xLabel)
 
@@ -985,7 +992,8 @@ class _DefaultScatterProfileSliceRoiMixIn(core.ProfileRoiMixIn):
             assert False
 
         # Use the axis names from the original plot
-        plot = item.getPlot()
+        profileManager = self.getProfileManager()
+        plot = profileManager.getPlotWidget()
         xLabel = _relabelAxes(plot, xLabel)
 
         data = core.CurveProfileData(