On Wed, Sep 17, 2003 at 09:36:28AM +0200, Lars Gullik Bjønnes spake thusly:
> 
> Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> | On Tue, Sep 16, 2003 at 09:49:52PM +0000, Angus Leeming spake thusly:
> |  
> >> Martin Vermeer wrote:
> >> > Hmmmm... is it possible that lang_ is being accessed after the
> >> > containing class Messages::Pimpl has been destroyed?
> >> 
> >> If so, I guess that this is the kludge. Thereafter we'd have to 
> >> ascertain _why_?
> >> 
> >> string const Messages::get(string const & msg) const
> >> {
> >>         return pimpl_.get() ? pimpl_->get(msg) : msg;
> >> }
> 
> And you are sure that this is what happens?

No...
 
> Do we have any static objects? (we shouldn't) Global objects?

Yes! in gettext.C:

     24 Messages & getLyXMessages()
     25 {
     26     static Messages lyx_messages;
     27 
     28     return lyx_messages;
     29 }
     30 
     31 } // anon namespace

 
> | It turns out that the trouble is caused by three localized strings:
> >
> | 1) in frontends/xforms/dialogs.C the build() routine:
> >
> |    153     dialog->bc().view(new xformsBC(dialog->bc()));
> >
> | The call to xformsBC has two default string parameters, see
> | frontends/xforms/xformsBC.h:
> >
> |      22 class xformsBC : public GuiBC<FL_OBJECT, FL_OBJECT> {
> |      23 public:
> |      24     ///
> |      25     xformsBC(ButtonController const &,
> |      26          string const & = _("Cancel"), string const & = _("Close"));
> 
> this is potentially bad... might be called too early.
> 
> | BTW the above kludge does *not* work. No difference. So the
> | Messages::Pimpl instantiation is existing, but lang_ is messed up.
> 
> And the value of lang_?

 From the first three bytes, I would say 0xff, 0xff, 0xff, ... in other
words, junk.

> -- 
>       Lgb
> 

- Martin

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to