{"action":"created","issue":{"url":"https://api.github.com/repos/mantidproject/mantid/issues/15199","repository_url":"https://api.github.com/repos/mantidproject/mantid","labels_url":"https://api.github.com/repos/mantidproject/mantid/issues/15199/labels{/name}","comments_url":"https://api.github.com/repos/mantidproject/mantid/issues/15199/comments","events_url":"https://api.github.com/repos/mantidproject/mantid/issues/15199/events","html_url":"https://github.com/mantidproject/mantid/issues/15199","id":131693439,"number":15199,"title":"Thread exhaustion in SliceViewer","user":{"login":"OwenArnold","id":1109536,"avatar_url":"https://avatars3.githubusercontent.com/u/1109536?v=4","gravatar_id":"","url":"https://api.github.com/users/OwenArnold","html_url":"https://github.com/OwenArnold","followers_url":"https://api.github.com/users/OwenArnold/followers","following_url":"https://api.github.com/users/OwenArnold/following{/other_user}","gists_url":"https://api.github.com/users/OwenArnold/gists{/gist_id}","starred_url":"https://api.github.com/users/OwenArnold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OwenArnold/subscriptions","organizations_url":"https://api.github.com/users/OwenArnold/orgs","repos_url":"https://api.github.com/users/OwenArnold/repos","events_url":"https://api.github.com/users/OwenArnold/events{/privacy}","received_events_url":"https://api.github.com/users/OwenArnold/received_events","type":"User","site_admin":false},"labels":[{"id":40046181,"url":"https://api.github.com/repos/mantidproject/mantid/labels/Component:%20Diffraction","name":"Component: Diffraction","color":"009800","default":false},{"id":172782247,"url":"https://api.github.com/repos/mantidproject/mantid/labels/Component:%20GUI","name":"Component: GUI","color":"009800","default":false},{"id":40046492,"url":"https://api.github.com/repos/mantidproject/mantid/labels/Group:%20Vates","name":"Group: Vates","color":"bfe5bf","default":false},{"id":40046083,"url":"https://api.github.com/repos/mantidproject/mantid/labels/Misc:%20Bug","name":"Misc: Bug","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"AntonPiccardoSelg","id":8955784,"avatar_url":"https://avatars0.githubusercontent.com/u/8955784?v=4","gravatar_id":"","url":"https://api.github.com/users/AntonPiccardoSelg","html_url":"https://github.com/AntonPiccardoSelg","followers_url":"https://api.github.com/users/AntonPiccardoSelg/followers","following_url":"https://api.github.com/users/AntonPiccardoSelg/following{/other_user}","gists_url":"https://api.github.com/users/AntonPiccardoSelg/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonPiccardoSelg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonPiccardoSelg/subscriptions","organizations_url":"https://api.github.com/users/AntonPiccardoSelg/orgs","repos_url":"https://api.github.com/users/AntonPiccardoSelg/repos","events_url":"https://api.github.com/users/AntonPiccardoSelg/events{/privacy}","received_events_url":"https://api.github.com/users/AntonPiccardoSelg/received_events","type":"User","site_admin":false},"assignees":[{"login":"AntonPiccardoSelg","id":8955784,"avatar_url":"https://avatars0.githubusercontent.com/u/8955784?v=4","gravatar_id":"","url":"https://api.github.com/users/AntonPiccardoSelg","html_url":"https://github.com/AntonPiccardoSelg","followers_url":"https://api.github.com/users/AntonPiccardoSelg/followers","following_url":"https://api.github.com/users/AntonPiccardoSelg/following{/other_user}","gists_url":"https://api.github.com/users/AntonPiccardoSelg/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonPiccardoSelg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonPiccardoSelg/subscriptions","organizations_url":"https://api.github.com/users/AntonPiccardoSelg/orgs","repos_url":"https://api.github.com/users/AntonPiccardoSelg/repos","events_url":"https://api.github.com/users/AntonPiccardoSelg/events{/privacy}","received_events_url":"https://api.github.com/users/AntonPiccardoSelg/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-02-05T16:53:19Z","updated_at":"2017-10-05T14:39:11Z","closed_at":null,"author_association":"OWNER","body":"While testing #15161 on OSX (although the platform shouldn't matter) I've found that I can invoke a \"no thread available exception\" see [description](http://www.appinf.com/docs/poco/Poco.NoThreadAvailableException.html) which propagates up through MantidPlot and results in termination options.\n\n**To Reproduce**\n- Create a large MDEventWorkspace\n- View it in the SliceViewer\n- Turn on Rebinning \n- Change the Rebinning parameters to yield a largeish MDHistoWorkspace. \n- Switch it to Auto Rebin\n- Now use sliders and zoom in a lot. You should be racking-up calls to BinMD on lots of different threads.\n- Keep doing this and you will eventually get the aforementioned exception.\n\nI see this as protecting against Machiavelli rather than Murphy as the user would have to deliberately and  for a sustained period overstress the tool to get this issue. The fix involves making changes to AlgorithmRunner i'm uncomfortable with this late in the release cycle. That's why i've made it a 3.7 issue despite the fact that it's a bugfix.\n\n**How to Fix**\n\nWe can probably fix this by addressing the `startAlgorithm` method [here](https://github.com/mantidproject/mantid/blob/master/MantidQt/API/src/AlgorithmRunner.cpp#L72-L89). I suggest making this return a boolean to indicate whether the AlgorithmRunner was actually able to start  the algorithm. I'd wrap the call to the async execution in a try catch and try to swallow any `NoThreadAvailableExceptions`. If an exception of this type is thrown we should return false. We need Anton's fix #15161 in place to ensure that a failed BinMD invocation does not result in an attempt to draw the overlay.\n"},"comment":{"url":"https://api.github.com/repos/mantidproject/mantid/issues/comments/334485466","html_url":"https://github.com/mantidproject/mantid/issues/15199#issuecomment-334485466","issue_url":"https://api.github.com/repos/mantidproject/mantid/issues/15199","id":334485466,"user":{"login":"AntonPiccardoSelg","id":8955784,"avatar_url":"https://avatars0.githubusercontent.com/u/8955784?v=4","gravatar_id":"","url":"https://api.github.com/users/AntonPiccardoSelg","html_url":"https://github.com/AntonPiccardoSelg","followers_url":"https://api.github.com/users/AntonPiccardoSelg/followers","following_url":"https://api.github.com/users/AntonPiccardoSelg/following{/other_user}","gists_url":"https://api.github.com/users/AntonPiccardoSelg/gists{/gist_id}","starred_url":"https://api.github.com/users/AntonPiccardoSelg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AntonPiccardoSelg/subscriptions","organizations_url":"https://api.github.com/users/AntonPiccardoSelg/orgs","repos_url":"https://api.github.com/users/AntonPiccardoSelg/repos","events_url":"https://api.github.com/users/AntonPiccardoSelg/events{/privacy}","received_events_url":"https://api.github.com/users/AntonPiccardoSelg/received_events","type":"User","site_admin":false},"created_at":"2017-10-05T14:39:11Z","updated_at":"2017-10-05T14:39:11Z","author_association":"MEMBER","body":"@Mantid-Matthew This might be another good issue to get working on the SliceViewer. Best to talk to @martyngigg about the underlying cause. "}}
{"actor":{"display_login":"AntonPiccardoSelg"}}