Mono embeded : NullReferenceException for a lock on a non-null object
Damien <[email protected]> Mon, 26 Jun 2017 12:56:55 +1100
| Newsgroups | gmane.comp.gnome.mono.general |
|---|---|
| Message-ID | <CADw1o24Pqvbw2ziBwimooqSsu0z6pArXGZLv06J9BW8jyxS6wg@mail.gmail.com> |
--===============7324165828588210911==
Content-Type: multipart/alternative; boundary="f403045c56fa030b8c0552d34449"
--f403045c56fa030b8c0552d34449
Content-Type: text/plain; charset="UTF-8"
Hi,
I am embedding mono in a qt application on Windows, and when executing
code, I have a SIGSEGV in managed code, that is a NullReferenceException,
but my variable is not null.
I am on Windows 10 x64.
I have installed Mono 5.0.1 (Visual Studio built mono) x86.
I code on Qt 5.3 with MinGW x86.
I have a native method that calls a managed method :
mono_runtime_invoke(method, obj, args, &exceptionObject).
In my managed method, I have a "lock" statement :
lock(this.myVar) { ... }
The SIGSEGV (or NullReferenceException) is raised only when the native
method is called on the second time. When called the first time, it works
well.
Between the two calls, nothing has changed.
What can be the source of the error ?
Thanks.
--f403045c56fa030b8c0552d34449
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hi,<br><br>I am embedding mono in a qt application on Wind=
ows, and when executing code, I have a SIGSEGV in managed code, that is a N=
ullReferenceException, but my variable is not null.<br><br>I am on Windows =
10 x64.<br>I have installed Mono 5.0.1 (Visual Studio built mono) x86.<br>I=
code on Qt 5.3 with MinGW x86.<br><br>I have a native method that calls a =
managed method :<br>mono_runtime_invoke(method, obj, args, &exceptionOb=
ject).<div><br></div><div>In my managed method, I have a "lock" s=
tatement :</div><div>lock(this.myVar) { ... }<br></div><div><br></div><div>=
The SIGSEGV (or NullReferenceException) is raised only when the native meth=
od is called on the second time. When called the first time, it works well.=
</div><div>Between the two calls, nothing has changed. </div><div><br></div=
><div>What can be the source of the error ?</div><div><br></div><div>Thanks=
.</div></div>
--f403045c56fa030b8c0552d34449--
--===============7324165828588210911==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTW9uby1saXN0
IG1haWxsaXN0ICAtICBNb25vLWxpc3RAbGlzdHMuZG90Lm5ldApodHRwOi8vbGlzdHMuZG90Lm5l
dC9tYWlsbWFuL2xpc3RpbmZvL21vbm8tbGlzdAo=
--===============7324165828588210911==--