severity 366512 important thanks I wrote: >> I would have loved to investigate this problem further, BUT I COULD >> NOT, SINCE I COULD NOT GET TED TO BUILD WITH DEBUGGING SYMBOLS.
On Sun, Aug 27, 2006 at 03:53:08PM +0100, Ben Hutchings wrote: > This will give you debugging symbols: Thanks a lot, I've finally looked at it again. The problem is that the RTF file needs fonts the x server can't provide (Helvetica Latin15 in this case), and ted handles that situation not very well. The error is detected at appFont.c:812. However you can't do a popup there since you don't have (EditApplication*)ea, which you need for a popup. Now I print some (more or less) helpful messages to the console and later do a popup telling the user to look there. Unfortunately the patch doesn't work for "New File", as the program just exits because of an X error :-/ However this bug isn't release critical, installing proper font packages (xfonts-{75,100}dpi{,-transcoded}) on the machine with the x server fixes the problem. It just looked like "doesn't work at all", since there was no error reporting in place. Thus I'm downgrading to important. The patch which crashes when you press "New File" (but which displays an error msg for "Open File") is attached. Cheers, Christian Aichinger
--- ted-2.17.orig/Ted/tedMain.c +++ ted-2.17/Ted/tedMain.c @@ -189,6 +189,10 @@ APP_RESOURCE( "fileMakeIt", offsetof(AppFileMessageResources,afmrMakeItQuestion), "There is no such file. Make it?" ), + APP_RESOURCE( "fileFontNotFound", + offsetof(AppFileMessageResources,afmrFontNotNotFound), + "A font needed by the file could not be found. " + "Please check the messages on the commandline." ), }; --- ted-2.17.orig/appFrame/appDocument.c +++ ted-2.17/appFrame/appDocument.c @@ -749,7 +749,14 @@ { return (EditDocument *)0; } if ( appSetupDocument( ea, ed ) ) - { SDEB(filename); return (EditDocument *)0; } + { + appQuestionRunSubjectErrorDialog( ea, + relative, option, + filename, afmr->afmrFontNotNotFound); + + SDEB(filename); + return (EditDocument *)0; + } appSetDocument( ea, ed ); @@ -761,6 +768,7 @@ { const int read_only= 0; const char * title= filename; + AppFileMessageResources * afmr= &(ea->eaFileMessageResources); EditDocument * ed; @@ -772,7 +780,13 @@ { SDEB(title); return -1; } if ( appSetupDocument( ea, ed ) ) - { SDEB(title); return -1; } + { + appQuestionRunSubjectErrorDialog( ea, + (void *)0, (void *)0, + filename, afmr->afmrFontNotNotFound); + SDEB(title); + return -1; + } appSetDocument( ea, ed ); only in patch2: unchanged: --- ted-2.17.orig/appFrame/appFont.c +++ ted-2.17/appFrame/appFont.c @@ -809,9 +809,19 @@ if ( ! afe->afeXfontFamilies ) { + appDebug("Font could not be found:\n" + "Font name: %s\n" + "Font Registry: %s\n" + "Font Encoding: %s\n\n", + aff->affFontFamilyName, + PS_Encodings[encoding].fcX11Registry, + PS_Encodings[encoding].fcX11Encoding); + + /* SXDEB(aff->affFontFamilyName,afe->afeXfontFamilies); LSDEB(encoding,PS_Encodings[encoding].fcX11Registry); LSDEB(encoding,PS_Encodings[encoding].fcX11Encoding); + */ return -1; } --- ted-2.17.orig/appFrame/appFrame.h +++ ted-2.17/appFrame/appFrame.h @@ -56,6 +56,7 @@ char * afmrNoSuchFileMessage; char * afmrFileNotWritable; char * afmrMakeItQuestion; + char * afmrFontNotNotFound; } AppFileMessageResources; /************************************************************************/
signature.asc
Description: Digital signature