You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code causes arepl to hang indefinitely without giving any visual indicator that it crashed.
Opening up the dev console I see the following error:
ERR process exited with code 3221225477: Error: process exited with code 3221225477
at terminateIfNeeded (C:\Users\Almenon\.vscode\extensions\almenon.arepl-1.0.2\node_modules\python-shell\index.js:124:27)
at ChildProcess.<anonymous> (C:\Users\Almenon\.vscode\extensions\almenon.arepl-1.0.2\node_modules\python-shell\index.js:113:13)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
The text was updated successfully, but these errors were encountered:
I wrap excec in a try/catch BaseException, which is like the king 👑 of all try/catches. It will catch every possible exception no matter what. So I was confused as to why the segmentation fault generated by the numpy code didn't get caught by my kingly catch.
But apparently a segmentation fault is a signal (SIGSEGV) and signals ARE NOT caught by normal try/catches, as they are not technically exceptions. (even though they will happily crash your program just the same 💀)
In order to catch a signal you have to register a signal handler like so:
This code causes arepl to hang indefinitely without giving any visual indicator that it crashed.
Opening up the dev console I see the following error:
The text was updated successfully, but these errors were encountered: