On Tue, 03 Jan 2012 08:45:38 -0800
Matthew Brush <mbr...@codebrainz.ca> wrote:

> On 12/31/2011 02:57 AM, Frank Lanitz wrote:
> > Hi folks,
> >
> > Since about GtkBuilder come in into Geany core we are experiencing
> > some issue with GeanyLaTeX in terms of in some cases the toolbar is
> > not able tobe loaded and Geany is ending up inside a segfault. Most
> > likely its repreducable by activating the toolbar and restarting
> > Geany having a tex-file loaded. The issue seems to be located in
> > near of line
> > https://github.com/geany/geany-plugins/blob/master/geanylatex/src/geanylatex.c#L168
> > unfortunately I don't have any bloody idea, what might is going
> > wrong. Anyone else could jump in here?
> >
> 
> Attached is a patch to fix the issue.  It's the same bug in Geany
> where this code was probably copied from, so I'll fix Geany and leave
> it to you to apply this patch to the plugin. If either Geany or
> GeanyLatex is fixed the plugin will be fixed, but for correctness I
> guess they should both be fixed.
> 
> IIUC what's happening is Geany's variable (toolbar.c:toolbar_markup)
> is declared const but not static so it's global to the entire
> program. When the plugin is loaded (at runtime with dlopen) with the
> same variable name also declared const, the one previously defined in
> Geany is used instead. If Geany's is declared static, GeanyLatex uses
> it's own variable because it can't see Geany's, if it's declared
> static in GeanyLatex, the local scope wins I guess.
> 
> So what was happening was GeanyLatex was loading Geany's toolbar XML 
> string constant instead of it's own (which obviously is a problem).

Yepp. Sounds legit. 
 
> I'd love to know why this changed all of the sudden though, why it's 
> different from before.

Me too ;)
-- 
http://frank.uvena.de/en/

Attachment: pgpIsINMArm48.pgp
Description: PGP signature

_______________________________________________
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Reply via email to