I guess I have to call it from the new thread, so I did that. If I call it
with mono_domain_get(), I get the same message as before. But if I call it
with domain (my pointer to the MonoDomain), then I get a huge stacktrace.
And now it becomes wired.

I use SDL to perform drawing and such tasks. If I call

screen = SDL_SetVideoMode(width, height, 0, SDL_HWSURFACE | SDL_DOUBLEBUF |
SDL_SRCALPHA);

then it creates a new window. If I call this before

mono_jit_exec(domain, assembly, argc  - 1, argv + 1);

then it creates the window, and everything works fine. But if I call the
method SetScreenParameters from managed code, which also calls
SDL_SetViedeoMode(...) then I get an error and the program crashes. I'm not
sure why, because before I used the multithreading, it worked (but
multithreading is necessary, everything before was just testing).
-- 
View this message in context: 
http://www.nabble.com/Calling-two-methods-from-two-seperate-threads-in-the-same-MonoDomain-%28mono-embedding%29-tp18568417p18577539.html
Sent from the Mono - General mailing list archive at Nabble.com.

_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to