lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] wx assertion failure: invalid font


From: Vadim Zeitlin
Subject: Re: [lmi] wx assertion failure: invalid font
Date: Tue, 2 Oct 2018 18:11:54 +0200

On Tue, 2 Oct 2018 14:30:37 +0000 Greg Chicares <address@hidden> wrote:

GC> If I experimentally apply the patch below and run a default
GC> group private placement illustration:
GC>   File | New | Illustration
GC>   change "Policy" to "sample2gpp"
GC>   OK
GC>   File | Print to PDF
GC> then I observe this message box a few dozen times:
GC> 
GC>   Assertion '"IsOk"' failed
GC>   (invalid font).
GC>   [file cache_for_lmi/vcs/wxWidgets/src/msw/font.cpp, line 981]

 The previously promised pull request fixing this is here:

        https://github.com/vadz/lmi/pull/97

 I think it's simple enough to be applied immediately in order to fix the
problem, even though I admit that I don't completely understand what's
going on here, i.e. where exactly is the invalid font being used before
another one is being set, but it's clear that it is and there doesn't seem
to be any good reason to set an invalid font in the first place (I had my
doubts about doing it when writing this code, but somehow convinced myself
that it was fine because the font was always going to be changed to
something valid immediately afterwards by wxHTML -- which just shows that I
shouldn't trust myself). Also, I'm almost sure that the changes to
pdf_writer_wx.cpp are not actually needed, but I've done them nevertheless
for consistency with ledger_pdf_generator_wx.cpp.

 Please let me know if you have any questions about this fix and/or
suggestions for further improvements.

 Thanks in advance,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]