[Mono-list] NullReferenceException when calling thunk

tomason tom at creamysoft.com
Wed Jan 23 17:16:37 UTC 2013


Hi, Robert

Thanks for the response!  I am running on linux (sorry I didn't mention
that), so the __stdcall thing doesn't apply then, right?  I'll file a bug.

That's interesting that the thunks are a seldom-used feature.  The
documentation says that they're more efficient AND they're way easier to
use than mono_runtime_invoke.  Is the latter really more popular or is
there a 3rd way that I don't know about yet?

Thanks!
-Tom


On Wed, Jan 23, 2013 at 2:57 AM, Robert Jordan [via Mono] <
ml-node+s1490590n4658237h75 at n4.nabble.com> wrote:

> Hi,
>
> On 23.01.2013 06:43, tomason wrote:
> > Where MonoAddFunc is defined like this:
> > typedef float (*MonoAddFunc)(MonoObject*, float, float);
>
> You you're testing under Windows, the typedef must be stdcall:
>
> typedef float (__stdcall *MonoAddFunc)(MonoObject*, float, float);
>
>
> A note on thunks: this is a seldom used feature, so odds are
> that the code got a little bitrotten. Please file a bug if
> you can rule out the stdcall issue, and I'll take a look
> at it.
>
> Robert
>
>
> _______________________________________________
> Mono-list maillist  -  [hidden email]<http://user/SendEmail.jtp?type=node&node=4658237&i=0>
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://mono.1490590.n4.nabble.com/NullReferenceException-when-calling-thunk-tp4658230p4658237.html
>  To unsubscribe from NullReferenceException when calling thunk, click here<http://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4658230&code=dG9tQGNyZWFteXNvZnQuY29tfDQ2NTgyMzB8LTE3MTUxMzM0Nzg=>
> .
> NAML<http://mono.1490590.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://mono.1490590.n4.nabble.com/NullReferenceException-when-calling-thunk-tp4658230p4658243.html
Sent from the Mono - General mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130123/7076333c/attachment.html>


More information about the Mono-list mailing list