I haven't been able to devote much time over the past couple of weeks to
building mono with the patch and testing my app.  My apologies for not being
able to help out more.

I've just noticed Sledge Ham's stack trace in the bug
(https://bugzilla.novell.com/show_bug.cgi?id=537764) and since the
notification in the stack is dealloc, I've been reading about monobjc's
method swizzling on dealloc.

How about this hypothesis: In Snow Leopard, there are some foreign threads
created by the ObjectiveC runtime which do some stuff with NSObjects, and
eventually their NSObject:dealloc method is called, this is swizzled by
monobjc which runs the managed NSObjectImposter.dealloc method to maintain
the managed wrapper class instances.  This is a managed method, so mono
kicks into gear and mono_jit_thread_attach and friends are called to add the
thread to the GC_threads-array.  This is a peculiar thread, it goes away
later without notification to the mono runtime, and causes the crash.

It would be cool if we could swizzle for only the threads we care about.  Or
perhaps we should swizzle with native code first...

I realize this is probably the wrong place to be asking, but does anyone
know if the other mono-objectiveC bridges have the same problem?

I'm very new to understanding swizzling and the mono GC, so if what I've
written above sounds like nonsense, it probably is :-)

Many thanks for everyone's efforts here.

Anthony

-----Original Message-----
From: Franky De Meyer [mailto:f...@eazign.be] 
Sent: Monday, October 12, 2009 2:07 PM
To: users@lists.monobjc.net
Subject: RE: [us...@lists.monobjc.net] Re: [us...@lists.monobjc.net] Feeback
Wanted on Snow Leopard

Thanks for the extra tips Kenny, but I must admit I've now given up on
trying to build Mono on Snow Leopard myself.
This seems like a rather specialized matter, and requires more insight in
the Mono build process (+ related Linux tools) than I can handle.

I noticed the new installer for OSX today (on mono-project), version
2.4.2.3_6, so I was anxious to try it out on the SimpleCocoaApp on Snow
Leopard, but unfortunately it still crashes, so it looks like the proposed
patch is not in it yet...

This is all quite depressing. Just as I was finally getting ready to release
my app for OSX, it turns out that many of the potential users have already
upgraded to Snow Leopard, so it's back to zero now. Sometimes I wonder
whether I shouldn't have just taken the plunge and should have ported the
entire app to XCode. Of course that would mean that none of my code would
have been shared between Windows and Mac, while with the mono/monobjc
solution I can have 70% common code.

In any case, thanks again to Laurent for the great work and trying to help
us out with this Mono problem. And thanks to you Kenny, for your efforts and
guidance.
Let's hope we can soon join the Snow Leopard gang ...

Franky



-----Original Message-----
From: Kenny Clement [mailto:psyki...@gmail.com] 
Sent: vrijdag 2 oktober 2009 15:23
To: users@lists.monobjc.net
Subject: Re: [us...@lists.monobjc.net] Re: [us...@lists.monobjc.net] Feeback
Wanted on Snow Leopard

Franky,

For glib, I'm using the following:

CC="cc -L/Users/fdm/Mono/lib" CFLAGS="-I/Users/fdm/Mono/include -m32"  
PATH=/Users/fdm/Mono/bin:$PATH ./configure --prefix=/Users/fdm/Mono

sorry, I forgot that CC and extra CFLAGS in my previous mail.
When I got your gettext error, it was because my mono prefix was not in 
the path, however, you say it is.

I also did an upgrade from leopard to Snow.

My application is now working without crashes, however, on a certain 
window in my app, CPU spikes to 100% whenever something on the form is 
changed.
This CPU spike only occurs after a few hours (or lots of activity), it 
seems to 'build up' and after a while, the app is no longer usable.

Still investigating, trying to turn off some bindings, ... seeing if 
that helps or not.
I didn't get this behaviour on Leopard / old mono, so it must be 
something in either Snow Leopard, or the new Mono (after all, it is an 
svn build, not an official release).

I also see some issues when building my app with integrated mono, it 
fails a lot more than on regular leopard.

I don't think either of those issues is related to the patch from 
Laurent/Sledge Ham, but we're still testing...

mvg,

- Kenny


Franky De Meyer wrote:
> Thanks for the extra info for the Snow Leopard build.
>
> It helped me get a little further now: "GNU Gettext" and "pkg-config" now
> both build OK on Snow Leopard.
> The "glib" configure however stops with following error:
>
> (After installing Gettext and pkg-config in /Users/fdm/Mono)
> When I execute:
>
> cd glib-2.22.0
> CFLAGS="-m32"
> CXXFLAGS="-m32"
> CC="cc -L/Users/fdm/Mono/lib"
> ./configure --prefix=/Users/fdm/Mono
>
> I get the following output: (only the last few lines shown)
> ----------------
> ...
> checking for libintl.h... yes
> checking for ngettext in libc... no
> checking for bindtextdomain in -lintl... no
> checking if -liconv is needed to use gettext...
> checking for ngettext in -lintl... no
> configure: error:
> *** You must have either have gettext support in your C library, or use
the
> *** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
> ------------------
>
> So, there must still be something I'm doing wrong. The install of
> gettext-0.17 was OK, and was built with the same settings as glib.
> I can just type gettext at the command prompt however, and it is found.I
> have the latest XCode version. I did do an upgrade from Leopard to Snow
> Leopard and not a fresh install. Maybe that has something to do with it.
>
> In any case, thanks for your help.
>
> BTW, does your app work OK on Snow Leopard, with the latest patch from
> Laurent?
>
> Regards,
> Franky
>
>
>
>
>
> From: Kenny Clement [mailto:psyki...@gmail.com]
> Sent: donderdag 1 oktober 2009 9:56
> To: users@lists.monobjc.net
> Subject: Re: [us...@lists.monobjc.net] Re: [us...@lists.monobjc.net]
Feeback
> Wanted on Snow Leopard
>
> Franky,
>
> I've struggled with the same issues.
> In order to build Mono on Snow Leopard, you need the CFLAGS and CXXFlags
set
> to -m32 for Mono and all the components required for it (gettext,
> pkg-config, libiconv, glib):
> example:
>
> CFLAGS="-m32" CXXFLAGS="-m32" ./configure --prefix=/mono
> make
> make install
>
> (note that the prefix should be changed to where-ever you want to install
> it.)
> Add the prefix path to your envvar PATH if it is not yet in there.
> (otherwise it will complain about not finding gettext, ...)
>
> In case you get 'deprecated' errors in ucontext, add the following line at
> the top in /usr/include/ucontext.h:
> #define _XOPEN_SOURCE 500
>
> (I'm sure there is a better way, but this works for me.)
>
> nant is a separate install (build) if you compile Mono:
>
> http://www.mono-project.com/NAnt_Installation
>
> Hope this helps!
>
> - Kenny
>    


Reply via email to