Hello, See the documentation on using 'mono_jit_exec' at http://www.mono-project.com/docs/advanced/embedding/
Even if you are embedding and just invoking methods in a library, you need a dummy Main method. Invoking this is the only way to setup some internals within the runtime. I can't say this is definitely your issue, but it sounds similar to issues I've had in the past. Thanks, Jonathan On Sun, Sep 14, 2014 at 2:38 PM, tbrooks <t...@taitale.com> wrote: > Robert Jordan wrote > > You did not show us how you're initializing the runtime. > > Much of this code was wrapped in a facade mechanism, here is the > initialization code (directories are the build path + "\\lib" and "\\etc") > > mono_config_parse( NULL ); // Use the standard configuration... > mono_set_dirs( GetLibDirectory().c_str(), GetConfigDirectory().c_str() ); > // > Setup the default directories for mono use here for now the directories of > your Mono installation > m_Domain = mono_jit_init_version( m_AppName.c_str(), "v4.0.30319" ); // > Init > the JIT Engine > m_Assembly = mono_domain_assembly_open( m_Domain, > m_DomainAssemblyName.c_str() ); // Open the Assembly with your scripts > m_Image = mono_assembly_get_image( m_Assembly ); // Get the Image > > > > Robert Jordan wrote > > Under Windows you could also end up with compiling your app > > for the Windows subsystem which doesn't have a console. > > There is an active console, in this case I can sometimes see output. Even > without recompiling, sometimes it crashes and sometimes it doesn't. It > seems > to changed based on the execution, regardless of how many times it's called > in that process instance. > > I did some more testing and now I think it's tied to the ToString() > function. If I remove the Console.Writeline and add: > > string test = ID.ToString(); > > I get the same random crashing behavior. > > > > -- > View this message in context: > http://mono.1490590.n4.nabble.com/mono-runtime-invoke-crash-tp4663860p4663866.html > Sent from the Mono - General mailing list archive at Nabble.com. > _______________________________________________ > Mono-list maillist - Mono-list@lists.ximian.com > http://lists.ximian.com/mailman/listinfo/mono-list >
_______________________________________________ Mono-list maillist - Mono-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-list