[Cc:ed to lyx-devel] On Thu, Jan 17, 2002 at 02:00:30PM +1000, Allan Rae wrote:
> I ran the crash test through Insure and it only provides a backtrace > no extra info. So for now I will look at fixing the rendering error > from #174 and try to find some other test cases from Michaels list. I have found a problem, but I'm not sure if it's related. Trying njamd with these files crashes for me with a bad pointer inside libXpm anyway so it's hard for me to check the problems. But I think this is needed anyway : Index: graphics/ImageLoaderXPM.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/ImageLoaderXPM.C,v retrieving revision 1.12 diff -u -r1.12 ImageLoaderXPM.C --- graphics/ImageLoaderXPM.C 2001/09/21 16:24:28 1.12 +++ graphics/ImageLoaderXPM.C 2002/01/17 04:49:23 @@ -77,7 +77,7 @@ xpm_col.pixel = lyxColorHandler->colorPixel(LColor::graphicsbg); XpmAttributes attrib; - attrib.valuemask = XpmCloseness | XpmColorSymbols | XpmColorKey; + attrib.valuemask = XpmCloseness | XpmColorSymbols; attrib.closeness = 10000; (look at the warning below, did you get that warning ?) I am using libXpm 4.11 Anyway, I looked at the backtrace with gdb and the problem is : (converter.C) 643 lyxerr[Debug::FILES] << "Calling " << command << endl; 644 if (buffer) 645 ShowMessage(buffer, _("Executing command:"), command); ShowMessage assumes a BufferView has been generated. buffer->getUser() is 0 -> boom Now the question is, where to put the fix ? We could do above (buffer && buffer->getUser()), we could change ShowMessage to deal with it etc. Advice please ! I think the problem is converter.C was never really generalised enough for use by insetgraphics, there are other problems as well in this area. Also, with the fix to converter.C, the loaded document is all blue-language-line. The doc's language is english, which is my default. so that's another bug. insetgraphics still needs a lot of work IMHO, but I don't know who's going to do it. I had a trawl of freshmeat, and it looks like imlib2 and libafterimage are our best choices for implementing scaling etc. At least of one these offers line-by-line decoding, which we can do in an xforms idle callback I think. regards john -- "Hey, we could invent a programming paradigm where the program is expressed as a series of statements to be executed in a fixed order." - Khendon