Opened 9 years ago

Closed 9 years ago

#2870 closed defect (fixed)

d.fontlist crashes on Windows

Reported by: annakrat Owned by: martinl
Priority: blocker Milestone: 7.0.3
Component: Display Version: svn-releasebranch70
Keywords: d.fontlist, font, wingrass Cc: grass-dev@…
CPU: Unspecified Platform: MSWindows 8

Description

When changing default font for display commands in GUI settings, the underlying command d.fontlist crashes. This is what I get when running d.fontlist from terminal (with d.mon wx0):

D1/5: G_set_program_name(): d.fontlist
D2/5: G_file_name(): path = C:\Users\akratoc\grassdata/nc_spm_08_grass7/user1
D1/5: D_open_driver():
D1/5: cairo: GRASS_RENDER_TRANSPARENT=FALSE
D1/5: cairo: GRASS_RENDER_ANTIALIAS=FALSE
D1/5: cairo: GRASS_RENDER_FILE=map.png
D1/5: cairo: file type=3
D1/5: cairo: GRASS_RENDER_FILE_MAPPED=0
D1/5: cairo: GRASS_RENDER_FILE_READ=0
D1/5: init_cairo
D1/5: Cairo_Erase
D1/5: Cairo_Set_window: 0.000000 480.000000 0.000000 640.000000
Fontconfig error: Cannot load default config file
Fontconfig error: Cannot load default config file

Happens with cairo and png driver. tested on several computers with Windows 8 and 10. This works in 7.0.2.

Change History (19)

comment:1 by martinl, 9 years ago

Keywords: wingrass added

comment:2 by martinl, 9 years ago

Confirmed on my Windows 7 machine.

comment:3 by neteler, 9 years ago

See also #2448

in reply to:  2 comment:4 by hellik, 9 years ago

Replying to martinl:

Confirmed on my Windows 7 machine.

here also in OSGeo4W-g7

System Info                                                                     
GRASS version: 7.0.3RC1                                                         
GRASS SVN Revision: 67443                                                       
Build Date: 2015-12-31                                                          
Build Platform: x86_64-w64-mingw32                                              
GDAL/OGR: 1.11.3                                                                
PROJ.4: 4.9.2                                                                   
GEOS: 3.5.0                                                                     
SQLite: 3.7.17                                                                  
Python: 2.7.5                                                                   
wxPython: 2.8.12.1                                                              
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)   

comment:5 by annakrat, 9 years ago

Could it be related to any changes done for #2448?

in reply to:  5 comment:6 by hellik, 9 years ago

Replying to annakrat:

Could it be related to any changes done for #2448?

I can't see this connex, as it also fails in OSGeo4W-g7 (see above); changes done for #2448 doesn't do anything in OSGeo4W-g7.

Fontconfig error: Cannot load default config file

any idea in the code where this default config file is searched

in reply to:  5 ; comment:7 by hellik, 9 years ago

Replying to annakrat:

Could it be related to any changes done for #2448?

trying here:

g.mkfontcap -s                                                                  
cyrilc|Cyrillic|0|C:\OSGEO4~1\apps\grass\grass-7.0.3RC1\fonts\cyrilc.hmp|0|utf-8|
gothgbt|Gothic Great Britain triplex|0|C:\OSGEO4~1\apps\grass\grass-7.0.3RC1\fonts\gothgbt.hmp|0|utf-8|
gothgrt|Gothic German triplex|0|C:\OSGEO4~1\apps\grass\grass-7.0.3RC1\fonts\gothgrt.hmp|0|utf-8|
gothitt|Gothic Italian triplex|0|C:\OSGEO4~1\apps\grass\grass-7.0.3RC1\fonts\gothitt.hmp|0|utf-8|
[...]

so correctly updated fontcap file is found here by g.mkfontcap.

the question is if the fontcap file is the same as the default config file?

in reply to:  7 comment:8 by hellik, 9 years ago

Replying to hellik:

Replying to annakrat:

Could it be related to any changes done for #2448?

trying here:

g.mkfontcap -s                                                                  
cyrilc|Cyrillic|0|C:\OSGEO4~1\apps\grass\grass-7.0.3RC1\fonts\cyrilc.hmp|0|utf-8|
gothgbt|Gothic Great Britain triplex|0|C:\OSGEO4~1\apps\grass\grass-7.0.3RC1\fonts\gothgbt.hmp|0|utf-8|
gothgrt|Gothic German triplex|0|C:\OSGEO4~1\apps\grass\grass-7.0.3RC1\fonts\gothgrt.hmp|0|utf-8|
gothitt|Gothic Italian triplex|0|C:\OSGEO4~1\apps\grass\grass-7.0.3RC1\fonts\gothitt.hmp|0|utf-8|
[...]

so correctly updated fontcap file is found here by g.mkfontcap.

the question is if the fontcap file is the same as the default config file?

tested with font types listes by g.mkfontcap -s, all vector labels are displayed correctly; e.g.:

d.vect map=firestations@PERMANENT width=1 attribute_column=CITY font=georgiab
d.vect map=firestations@PERMANENT width=1 attribute_column=CITY font=FRADMCN

comment:9 by martinl, 9 years ago

Version 0, edited 9 years ago by martinl (next)

comment:10 by martinl, 9 years ago

Hopefully fixed in r67630. Will check next build.

comment:11 by martinl, 9 years ago

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Priority: majorblocker
Status: newassigned

in reply to:  10 ; comment:12 by hellik, 9 years ago

Replying to martinl:

Hopefully fixed in r67630. Will check next build.

tested here locally by copying

C:\OSGeo4W\etc\fonts\fonts.conf

to

C:\OSGeo4W64\apps\grass\grass-7.0.3RC1\etc

and by adding

set FONTCONFIG_FILE=%GISBASE%\etc\fonts.conf

in the winGRASS windows console.

C:\>d.fontlist -l
Unable to update the static FcBlanks: 0x0600
Unable to update the static FcBlanks: 0x0601
Unable to update the static FcBlanks: 0x0602
Unable to update the static FcBlanks: 0x0603
Unable to update the static FcBlanks: 0x06dd
Unable to update the static FcBlanks: 0x070f
Unable to update the static FcBlanks: 0x2028
Unable to update the static FcBlanks: 0x2029
Unable to update the static FcBlanks: 0xfff9
Unable to update the static FcBlanks: 0xfffa
Unable to update the static FcBlanks: 0xfffb
cyrilc
gothgbt
gothgrt
gothitt
greekc
greekcs
greekp
greeks
italicc
italiccs
italict
romanc
romancs
romand
romans
romant
scriptc
scripts
AGENCYB
[...]

basically it seems to work, though some error messages.

so let's test next build.

in reply to:  12 ; comment:13 by martinl, 9 years ago

Replying to hellik:

basically it seems to work, though some error messages.

so let's test next build.

Please try the last build (no.53 64bit or no.216 32bit). Do you still see error messages?

Last edited 9 years ago by martinl (previous) (diff)

in reply to:  13 ; comment:14 by hellik, 9 years ago

Replying to martinl:

Replying to hellik:

basically it seems to work, though some error messages.

so let's test next build.

Please try the last build (no.53 64bit or no.216 32bit). Do you still see error messages?

tested with

System Info                                                                     
GRASS version: 7.1.svn                                                          
GRASS SVN revision: 67634                                                       
Build date: 2016-01-23                                                          
Build platform: x86_64-w64-mingw32                                              
GDAL: 1.11.3                                                                    
PROJ.4: 4.9.2                                                                   
GEOS: 3.5.0                                                                     
SQLite: 3.7.17                                                                  
Python: 2.7.5                                                                   
wxPython: 2.8.12.1                                                              
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)   
C:\>d.fontlist -l
cyrilc
gothgbt
gothgrt
gothitt
greekc
greekcs
greekp
greeks
italicc
italiccs
italict
romanc
romancs
romand
romans
romant
scriptc
scripts
AGENCYB
AGENCYR
ahronbd
[...]

d.fontlist and change preferences within wxGUI works now. ready for backporting.

in reply to:  14 ; comment:15 by martinl, 9 years ago

Replying to hellik:

d.fontlist and change preferences within wxGUI works now. ready for backporting.

good, done in r67642. Let's test the next grass70 build.

comment:16 by annakrat, 9 years ago

Thanks for working on this. Do we have an idea how did this bug happen? If yes, it would be good to have it documented here.

comment:17 by martinl, 9 years ago

GRASS OSGeo4W package since 7.0.3 doesn't depend on msys package. WinGRASS is built using completely fresh environment based on msys2 which is not shipped in osgeo4w framework. So the fontconfing file was just missing.

in reply to:  17 comment:18 by annakrat, 9 years ago

Replying to martinl:

GRASS OSGeo4W package since 7.0.3 doesn't depend on msys package. WinGRASS is built using completely fresh environment based on msys2 which is not shipped in osgeo4w framework. So the fontconfing file was just missing.

Thanks for clarifying!

in reply to:  15 comment:19 by martinl, 9 years ago

Resolution: fixed
Status: assignedclosed

Replying to martinl:

Replying to hellik:

d.fontlist and change preferences within wxGUI works now. ready for backporting.

good, done in r67642. Let's test the next grass70 build.

Tested, seems to work. Closing the ticket.

Note: See TracTickets for help on using tickets.