Multi Thread sometimes doesn't catch exceptions.

I'm having a problem in my multi threaded project, sometimes the processing thread crashes without Rider catching the exception.

This leaves me with a responsive ui, but the internals doing nothing with me not easily able to figure out what's or where the problem is.

I'm using both `System.Timers.Timer.Elapsed` and System.Threading.Tasks.Parallel.ForEach for the processing threads.

 

Any ideas how to get Rider to catch and halt on exceptions on other threads?

 

0
5 comments

Hello,

Could you please enable "Debugger" tracing in "Help | Diagnostic Tools | Choose Trace Scenario," then reproduce the issue once again, and collect all Logs via calling the action "Help | Collect Logs."

Attach all the logs to the issue on our tracker then:https://youtrack.jetbrains.com/newIssue?draftId=25-2821127.

Also, it would be very helpful to have a repro solution or a code example on which Rider does not catch exceptions.

 

Thank you in advance!

Regards,

Sofia.

0

Sorry, seem that although I'm 'following' this thead I didn't get an email notification, strange.

I've had a quick attempt to replicate this in a bare  minimum code example, but wasn't able to replicated it there, so there's something deeper going on, I'll have a go at the logging tomorrow.

0

Ok so I enabled Debugger tracing, reproduced the issue, but when I go to Help | Collect Logs I get a dialog box that says something about logs and settings may contain sensitive data, with a button that takes me to my /tmp directory. there's a folder named "JetBrainsPerUserTemp-1000-1" though looking at the files in there, it doesn't look like a debug log, a handful of 423 byte files which just seem to note the buildtask version.

I can reproduce the problem reliably on my large complicated project by uncommenting the two lines here:

https://github.com/Pulsar4xDevs/Pulsar4x/blob/DevBranch/Pulsar4X/Pulsar4X.ECSLib/GameLoop/MasterTimePulse.cs#L179

compiling, debugging, and advancing time

the 'game' will continue to run and you'll think that nothing is wrong, except the planets wont orbit.

The project is a little complex and some people have problems getting it to work (you'll run into problems if your regional settings use commas instead of dot for decimals for example, and you need to clone the project so it has access to the git stuff since we're grabbing the commit version when we compile).

 

I'm not 100% sure I've not messed up the settings somewhere and this is just a dumb user error.

here's my breakpoints and exceptions settings:

 

0

Ok I figured out the logs, attached those in the issue you created, didn't realize you'd created one there as the link you posted takes me to a page to create a new one, as I was doing so however it showed up in the similar issues. if you have any issues building and running the project let me know.

https://youtrack.jetbrains.com/issue/RIDER-45737

 

0

Please sign in to leave a comment.