After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 335096 - Crash at font selection
Crash at font selection
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: win32
0.95-preX
Other All
: Normal critical
: 0.95
Assigned To: Steffen Macke
Dia maintainers
: 335334 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-03-19 10:10 UTC by Klaus Mezger
Modified: 2006-07-15 17:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Pango testfonts program (32.06 KB, application/octet-stream)
2006-03-22 21:01 UTC, Hans Breuer
Details
Fonts of a Dia-crashing win32 machine (67.67 KB, application/x-zip)
2006-03-23 07:16 UTC, Klaus Mezger
Details
Attempt to a more safe font selection (476.05 KB, application/octet-stream)
2006-03-23 12:17 UTC, Hans Breuer
Details

Description Klaus Mezger 2006-03-19 10:10:44 UTC
Steps to reproduce:
1. Select properties of an object in drawing
2. Select font - others - CRASH
3. Message Box "Runtime Error" appears an dia is dead


Stack trace:


Other information:
Comment 1 Hans Breuer 2006-03-19 15:34:14 UTC
This looks like Pango can't cope with one (or more) of the 
fonts installed on your system.
There should be file called dia-0.95-pre1.log in your 
$TEMP directory. Could you please attache it here or
paste the lines including 'font' here.
Comment 2 Klaus Mezger 2006-03-20 07:50:05 UTC
(In reply to comment #1)
> This looks like Pango can't cope with one (or more) of the 
> fonts installed on your system.
> There should be file called dia-0.95-pre1.log in your 
> $TEMP directory. Could you please attache it here or
> paste the lines including 'font' here.
> 
Sorry but i cannot find this file on my Win2k machine.
But I have some more informations:

Text in Error Window appearing after mouse over Select font - others:
Pango-Error**:file shape.c:line75(pango_shape: assertion failed(glyphs->num_glyphs >0)
aborting...

After clicking [OK]:
Message Window from Microsoft Visual C++ Runtime Library
Runtime Error!
Program D:\Programme\Dia\bin\diaw.exe
abnormal program termination

Same error happens on different machines: Win2k and WinXP SP1, SP2

Thanks for your rapid response!
Klaus
Comment 3 Hans Breuer 2006-03-21 21:47:33 UTC
*** Bug 335334 has been marked as a duplicate of this bug. ***
Comment 4 Steffen Macke 2006-03-22 05:46:33 UTC
Which GTK+ version are you using?
As the problem seems to be related to PANGO, upgrading the GTK+ version
might help.

http://prdownloads.sourceforge.net/gimp-win/gtk%2B-2.8.13-setup.zip?download
Comment 5 Klaus Mezger 2006-03-22 08:58:56 UTC
(In reply to comment #4)
Unfortunately, the problem persists with gtk+2.8.13.
Before, I used gtk+2.8.9.

Possibly, there is a compatibility problem with DLLs of drawing program "Inkskape"
http://www.inkskape.com 
It uses some same resources. I will try to remove Inkskape and check, if the problem remains. 

Comment 6 Klaus Mezger 2006-03-22 09:02:38 UTC
(In reply to comment #5)
CORRECTION OF LINK to Inkscape:
http://www.inkscape.org
> Unfortunately, the problem persists with gtk+2.8.13.
> Before, I used gtk+2.8.9.
> 
> Possibly, there is a compatibility problem with DLLs of drawing program
> "Inkscape"
> http://www.inkskape.com 
> It uses some same resources. I will try to remove Inkskape and check, if the
> problem remains. 
> 

Comment 7 Steffen Macke 2006-03-22 09:32:40 UTC
Just to make sure: Could you list all places where libpangowin32-1.0-0.dll is
found on your machine?

Is this the first time you installed dia?

I just had a case where a previous installation was causing problems.
In case you had a previous installation, try completely removing the old
installation folder and reinstalling the latest installer version.
Comment 8 Klaus Mezger 2006-03-22 10:07:53 UTC
libpangowin32-1.0-0.dll is placed at:
D:\Programme\Gemeinsame Dateien\GTK\2.0\bin
D:\Programme\Inkscape

It is the first time installation of dia.
Just before, I removed dia completely and reinstalled it (0.95 pre1).
The Problem remained.

Do you know of other win32 users having this bug (For me it is not disastrous, I can and like to work with Dia anyway) ?
If this problem does not exist at other win32 users, it may be caused by an other program present on my machine(s). 
Candidates for disturbing dia could be Inkscape, doxygen, LatTeX (MiKTeX distribution).

Comment 9 Hans Breuer 2006-03-22 21:01:24 UTC
Created attachment 61794 [details]
Pango testfonts program

The Pango 'behaviour' I was refering to is http://bugzilla.gnome.org/show_bug.cgi?id=304702
It is supposed to be fixed very recently, i.e. with 
Pango 1.12.0. But there should be one way or another
to work around the crash - one thing to be checked 
first is *which* font is causing the crash.

Klaus, if you could run the Pango provided testfonts 
program we may see the font name in question as
the last one printed. If all would work there should
be a huge bitmap pango-fonts.bmp showing all the 
available fonts rendered.
Comment 10 Klaus Mezger 2006-03-23 07:16:12 UTC
Created attachment 61825 [details]
Fonts of a Dia-crashing win32 machine

ou will find the resulting font drawing in the attachement. All seem to work fine... There are no error message generated by testfonts.exe.
Comment 11 Klaus Mezger 2006-03-23 07:23:13 UTC
You will find the resulting font drawing in the attachement. All seem to work fine... There are no error message generated by testfonts.exe.
(In reply to comment #10)
There are fonts left, that do not appear in the testfonts list! They are the crazy fonts wingdings, wingdings1 and wingdings2. 

Comment 12 Hans Breuer 2006-03-23 12:17:49 UTC
Created attachment 61839 [details]
Attempt to a more safe font selection

Strange. So Pango is able to load and render all the fonts but still crashes.
But I still can't reproduce with all the fonts from winxp (including the asian
ones). You still have some more (e.g.: dom casual, garrison, franklin cond. gothic, optimum, vag round, windsor) where I currently assume the problems.

Attached you'll find a new libdia.dll which has a fallback font code into
the font menu. Could you try if this workaround helps avoid the crash?
For me it at least reduces the number of warnings spit for fontnames which
can not be rendered by their font. [
(dia.exe:3748): Pango-WARNING **: Couldn't load font "vivaldi 8" falling back to
 "Sans 8"
(dia.exe:3748): Pango-WARNING **: Couldn't load font "vivante-dtc 8" falling back to "Sans 8"
]

So I will apply it to cvs anyway. But i really would like to have this issue fixed without requiring pango 1.12. Although it also would be useful to know
if the Pango 1.12 change does fix it as well.
Comment 13 Klaus Mezger 2006-03-23 14:01:07 UTC
(In reply to comment #12)
> Created an attachment (id=61839) [edit]
> Attempt to a more safe font selection
With this DLL (libdia.dll) the crashing bug is FIXED!
Crash arises only, if a font is chosen, that cannot be rendered by pango.
Compared with the attachment pango-fonts.zip from comment #10, only the non-dosplayable fonts lead to the crash of pango (dom casual, windsor etc).

Remark: for using the new libdia.dll, I had to rename (copy) the following dll's:
- libart_lgpl_2-2.dll to libart.dll
- libintl3.dll to libintl-1.dll
I did not remark side-effects by doing this dangerous operation.

Hans, thanks a lot for your efficient and powerful support. 
Klaus
Comment 14 Hans Breuer 2006-03-23 17:08:17 UTC
Thanks for your prompt and efficient testing.

2006-03-23  Hans Breuer  <hans@breuer.org>

	* lib/widgets.c : use original fontname and fallback 'sans' to
	render the font menu. Thus crashing (in Pango) is delayed until
	the point where one chooses a font, which can't be rendered by
	Pango. Fixes bug #335096 as far as Dia can.
	
Comment 15 Hans Breuer 2006-07-15 17:23:18 UTC
moving away form 0.95-pre1 to delete that label afterwards. Sorry for the noise.