Re: Bug in Mono
Status: Inactive
Brought to you by:
manyoso
|
From: Adam T. <ma...@ya...> - 2003-01-18 17:07:24
|
On Saturday 18 January 2003 07:04 am, Adam Treat wrote:
> On Saturday 18 January 2003 05:50 am, Marcus wrote:
> > Okay. By the way, I think might we still have some problems, but Paolo
> > was around a while ago, and we did find one thing that is a bug in mono.
> > I changed hello.cs further so that the constructor just created a
> > QPushButton with no label or anything, i.e. QPushButton(null), and ilrun
> > wasn't crashing but mono was.
> >
> > If you want to fix it, change line 2186 in marshal.c to
> >
> > if (t->data.klass && t->data.klass->delegate) {
> >
> > Paolo said that he would fix it properly (presumably in CVS) later today.
>
> Oh thanks for finding this!
>
> > Also, I noticed that you were passing "this" pointers into C++ functions.
> > You probably know this already, but you really aren't supposed to do
> > that. The addresses of managed objects can move, so you should store a
> > GCHandleRef instead. (It's explicitly convertible to an IntPtr.)
>
> Actually, 'this' is implicitly converted to a GCHandle and then returned
> as an IntPtr. I know, I know, implicit conversion isn't the way togo I was
> just doing it temporarily ... i'll set it up so that is uses
> ICustomMarshaller today...
>
> _If_ we have an implicit conversion of a QtSharp object to an IntPtr it
> should probably be to the QtSharp.RawObject ...
|