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
I've recently figured out that SBCL and .NET runtimes, while working in one process, are not particularly fond of each other, and i'm interested if there's anything anyone can do about that.
While this function(OpenWindow) works perfectly when called from either C, unmanaged C++ or .NET, when called from lisp, it causes .NET runtime(and consequently, entire lisp process) to crash with ''Process terminated due to StackOverflowException" error message.
I suppose the reason of crashes is somehow related to cooperation(or rather, contention) of lisp and .NET garbage collectors in STA environment because:
When this function is called from MTA, it causes no crashes(it catches InvalidOperationException, complains about invalid apartment state to stderr an quits).
When this function is modified to simply create a window, but not to show it, there is no crash until lisp garbage collector is run(until you call sb-ext:gc, for example)
I've also tried calling this function from Clozure CL. Again, it doesn't work, but instead of simply terminating the process, CCL runtime enters low-level debugger and complains about an exception on foreign stack.
Although resolving this issue is not a matter of urgent need, it would allow better integration of SBCL and Windows platform by opening .NET BCL and libraries for lisp.
The text was updated successfully, but these errors were encountered:
btw, SBCL version i'm currently using is "1.0.52.1.mswinmt.969-6acb698", and .NET runtime i'm talking about is "4.0.30319" (the latest version, for this moment)
Hello there.
I've recently figured out that SBCL and .NET runtimes, while working in one process, are not particularly fond of each other, and i'm interested if there's anything anyone can do about that.
Consider the following code (C++/CLI)
Here's an example of usage of this function for SBCL:
While this function(OpenWindow) works perfectly when called from either C, unmanaged C++ or .NET, when called from lisp, it causes .NET runtime(and consequently, entire lisp process) to crash with ''Process terminated due to StackOverflowException" error message.
I suppose the reason of crashes is somehow related to cooperation(or rather, contention) of lisp and .NET garbage collectors in STA environment because:
I've also tried calling this function from Clozure CL. Again, it doesn't work, but instead of simply terminating the process, CCL runtime enters low-level debugger and complains about an exception on foreign stack.
Although resolving this issue is not a matter of urgent need, it would allow better integration of SBCL and Windows platform by opening .NET BCL and libraries for lisp.
The text was updated successfully, but these errors were encountered: