Skip to content

Getting StackOverflowException on windows. #5

@Cynede

Description

@Cynede

In Samples.

they are compiling but only HelloWorld.exe works w/o StackOverflowException

minimal code for Exception:

main = withCLR $ do
    hSetBuffering stdout NoBuffering

    -- Make an MVar to hold the result of the download when it has completed
    done <- newEmptyMVar 


    -- Create a delegate that accepts a single argument and puts it into the
    -- MVar when called
    finished <- delegate _ParameterizedThreadStart (putMVar done)
    return ()

in bindings:

--
-- Delegate: ParameterizedThreadStart
--

type Type_wrap_stub_53 = ObjectId -> IO ()
foreign import ccall "wrapper" wrap_stub_53 :: Type_wrap_stub_53 -> (IO (FunPtr Type_wrap_stub_53))

{-# NOINLINE stub_53 #-}
stub_53 :: Type_wrap_stub_53 -> IO ObjectId
stub_53 = unsafePerformIO $ getDelegateConstructorStub
    "System.Threading.ParameterizedThreadStart, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
    wrap_stub_53

instance Delegate ParameterizedThreadStart_ where
    type DelegateT ParameterizedThreadStart_ = (Obj Object_) -> IO ()
    delegate _ handler = stub_53 (marshalFn1 handler) >>= unmarshal

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions