From owner-freebsd-gnome Tue Jan 29 10: 4:44 2002 Delivered-To: freebsd-gnome@freebsd.org Received: from shumai.marcuscom.com (rdu57-28-046.nc.rr.com [66.57.28.46]) by hub.freebsd.org (Postfix) with ESMTP id D6CD637B419; Tue, 29 Jan 2002 10:04:39 -0800 (PST) Received: from localhost (marcus@localhost) by shumai.marcuscom.com (8.11.6/8.11.6) with ESMTP id g0TI4rh41967; Tue, 29 Jan 2002 13:04:54 -0500 (EST) (envelope-from marcus@marcuscom.com) X-Authentication-Warning: shumai.marcuscom.com: marcus owned process doing -bs Date: Tue, 29 Jan 2002 13:04:53 -0500 (EST) From: Joe Clarke To: Maxim Sobolev Cc: Anders Andersson , Subject: Re: deskutils/mrproject In-Reply-To: <1012276850.45588.30.camel@notebook> Message-ID: <20020129130314.H41290-100000@shumai.marcuscom.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-gnome@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 29 Jan 2002, Maxim Sobolev wrote: > Just FYI. I did some digging to identify the real source of the problem > with shared modules. It seems that some fundamental assumptions are > broken. Particularly the software assumes that all shared modules when > loaded share the same namespace, while in fact it isn't always true. For > example, all shared objects share gtk+ namespace, because they are all > linked with it dynamically, but they don't share namespace of > mrproject's utility libraries linked statically. This leads to various > crash patterns, some of them I have fixed, but gave up because there are > many more. > > The typical crash scenario looks like the following: > > 1. The application loads foo.so shared module. The module registers its > custom types with the gtk+ using some utility function linked statically > into each module. This function keeps a state to prevent registering the > same type twice, which is prohibited by gtk+. > > 2. The application loads bar.so shared module. It also tries to register > itself with gtk+ using its own copies of those utility functions. > However, since bar's copy of utility functions aren't shared, bar.so > knows nothing about the fact that some of its types already registered > with gtk+ (gtk+ is shared between foo.so and bar.so), thus leading to a > crash. > > This is one of the most obvious problems. Perhaps there are some more > subtle ones, because even after fixing those ones the software is still > non-functional. > > I think that the problem should be reported to developers, because it > isn't trivial to fix properly. Attached please find some patches to fix > some early startup crashes described above - they should give idea what > I'm talking about. Maxim, I wrote to the Mr.Project mailing list, and sent your patches. In the meantime, I've been playing with the modules, and found a good linking order to get mrproject to work without statically linking the modules into the main binary. As soon as I finish testing, I'll send you the patches. Joe > > -Maxim > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-gnome" in the body of the message