After doing an
Code: Select all
strace xnviewmp &> /tmp/xnview_strace
, I noticed that XnViewMP tries to load libraries from a LOT of non existing paths. Which explains why it's so slow to start!
Then, I see this output regarding the missing fontconfig config:
Code: Select all
open("/etc/fonts/fonts.conf", O_RDONLY|O_CLOEXEC) = 10
read(10, "<?xml version=\"1.0\"?>\n<!DOCTYPE "..., 8192) = 2333
write(2, "Fontconfig error: line 30442431:"..., 33Fontconfig error: line 30442431: ) = 33
write(2, "syntax error", 12syntax error) = 12
[...]
write(2, "Fontconfig error: ", 18Fontconfig error: ) = 18
write(2, "Cannot load default config file", 31Cannot load default config file) = 31
What is it expecting from /etc/fonts/fonts.conf exactly? It's formatted
correctly for me.
I don't get what that "8192" number means in that "read" syscall. Any idea?
Also, that "error: line 30442431" is always a random number like that one every time I start the program.
After that, it scrapes all the fonts directories... and I noticed right after the Goudy font a strange "brk" syscall... which doesn't occur on other font files? That could explain why it's using that font eventually?
Code: Select all
munmap(0x7f675e9ed000, 110336) = 0
stat("/usr/share/fonts/TTF/GoudyBookletter1911.ttf", {st_mode=S_IFREG|0644, st_size=73496, ...}) = 0
open("/usr/share/fonts/TTF/GoudyBookletter1911.ttf", O_RDONLY) = 11
fcntl(11, F_SETFD, FD_CLOEXEC) = 0
fstat(11, {st_mode=S_IFREG|0644, st_size=73496, ...}) = 0
mmap(NULL, 73496, PROT_READ, MAP_PRIVATE, 11, 0) = 0x7f675e9f6000
close(11) = 0
brk(0x1fd2000) = 0x1fd2000
munmap(0x7f675e9f6000, 73496)
stat("/usr/share/fonts/TTF/Graduate-Regular.ttf", {st_mode=S_IFREG|0644, st_size=22732, ...}) = 0
[...]
If I remove the GoudtBookletter font from the /fonts directory, there is no "brk" and Unifraktur is (for some reason) the last font read after a bunch of tried in "cache" font files...
Could be that the problem is due to libfontconfig.so that Xnview uses to parse /etc/fonts/fonts.conf. Mine is "/usr/lib/fontconfig.so.1.9.2" and it seems XnView loads it into memory (although ldd doesn't display it, only shows an entry for libfreetype.so.6).
Code: Select all
open("/opt/xnviewmp/lib/libfontconfig.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/xnviewmp/Plugins/libfontconfig.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/opt/xnviewmp/lib/platforms/../../lib/libfontconfig.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libfontconfig.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300q\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=277960, ...}) = 0
mmap(NULL, 2373672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f674c8e4000
mprotect(0x7f674c922000, 2093056, PROT_NONE) = 0
mmap(0x7f674cb21000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3d000) = 0x7f674cb21000
close(3) = 0
Do I need an outdated version or something? Haha...
Any idea?