[Freewx-maint] Bug#702378: libwxgtk2.8-0: segv printing postscript in a latin-1 locale
Olly Betts
olly at survex.com
Sun Jul 7 05:56:36 UTC 2013
On Wed, Mar 06, 2013 at 07:35:26AM +1100, Kevin Ryde wrote:
> gdb claims it to be in wxPostScriptDC::DoGetTextExtent() dcpsg.cpp line
> 2151 and has p==NULL. If my sources are up-to-date that line would be
>
> for(p=(unsigned char *)wxMBSTRINGCAST strbuf; *p; p++)
>
> Maybe it's something locale related. If I make a utf8 and switch to it
> like LC_ALL=en_US.UTF-8 then the print works. In that case it warns too
> that I don't have file /usr/share/wx/gs_afm/Helv.afm, if that makes a
> difference.
>
> Is that p strbuf thing a conversion to a locale string to measure the
> characters or something? Dunno what it should do if the locale is not
> enough for the string to be printed, but you'd hope it didn't crash.
I forwarded the bug upstream, who suggested just returning in this case,
and I came up with the attached patch which implements that.
My unstable chroot seems to have got in an odd state, so I haven't tried
building it yet, but if you have the setup to hand to reproduce the issue,
please give it a go and let me know if it fixes it.
Cheers,
Olly
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wx-2.8.12-print-ps-in-latin1-locale-segv.patch
Type: text/x-diff
Size: 942 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/freewx-maint/attachments/20130707/fd8a3ca2/attachment.patch>
More information about the Freewx-maint
mailing list