有时不同的应用程序会崩溃,系统会通知我崩溃的应用程序使用了第三方库(libz
)并建议尝试不使用该文件。
我总是可以通过在 Gimp 中将 PNG 文件导出为 JPEG 格式来重现它:
(全尺寸屏幕截图)
当我第一次遇到这个问题时,我在系统中安装了 libz 1.2.5,然后我将其更新到 1.2.7,但问题仍然存在。
我不知道这个库是什么时候、为了什么目的安装的。
===========更新 2013 年 7 月 4 日===========
在查看 strace 输出后,我认为我的问题与 zlib 无关。所以我更改了问题标题
这是斯特拉斯·吉普输出(启动器图标大小 = 36,“Radiance” Gnome 主题)
futex(0x15b3434, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x15b3430, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x15b0fb0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x1c4a560, FUTEX_WAKE_PRIVATE, 1) = 1
lstat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/usr/share/icons/Humanity/devices/16/drive-harddisk.svg", {st_mode=S_IFREG|0644, st_size=7338, ...}) = 0
open("/usr/share/icons/Humanity/devices/16/drive-harddisk.svg", O_RDONLY) = 19
fstat(19, {st_mode=S_IFREG|0644, st_size=7338, ...}) = 0
read(19, "<?xml version=\"1.0\" encoding=\"UT"..., 65536) = 7338
read(19, "", 65536) = 0
close(19) = 0
write(2, "\n(gimp:19027): Gtk-CRITICAL **: "..., 106
(gimp:19027): Gtk-CRITICAL **: IA__gtk_tree_model_get: assertion `GTK_IS_TREE_MODEL (tree_model)' failed
) = 106
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
(script-fu:19034): LibGimpBase-WARNING **: script-fu: gimp_wire_read(): error
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)
我尝试重新安装这些软件包,但没有帮助。
$ file /usr/local/lib/libz.so.1.2.7
/usr/local/lib/libz.so.1.2.7: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=0x4b579c2bcc6eb41c0dc9c473e8298e5249fedbe1, not stripped
$ md5sum /usr/local/lib/libz.so.1.2.7
65ffc4f5f7b943cd569ba2136cd49f7b /usr/local/lib/libz.so.1.2.7
$ ls -lh /usr/local/lib/libz.so.1.2.7
-rwxr-xr-x 1 root root 99K лют 9 19:54 /usr/local/lib/libz.so.1.2.7
系统:Ubuntu 12.04 x64_86
Gimp 2.6.12
答案1
我自己回答我的问题。
我认为一开始我的问题有点误导。
系统报告我崩溃可能是由于 Gimp 使用了第三方库 (/usr/local/lib/libz.so.1.2.7) 造成的。
我删除了 /usr/local/lib/libz.so.1 符号链接到 /usr/local/lib/libz.so.1.2.7,并使用 strace 跟踪到使用了默认库
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libz.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/x86_64/libz.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7fff82fc2f00) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/libz.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls", 0x7fff82fc2f00) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/libz.so.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/x86_64", 0x7fff82fc2f00) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libz.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\0P \0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=92720, ...}) = 0
mmap(NULL, 2187824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f99b8b30000
mprotect(0x7f99b8b46000, 2093056, PROT_NONE) = 0
mmap(0x7f99b8d45000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f99b8d45000
close(3)
这并没有解决问题。
但经过一些额外的研究,我想我已经找到了相关错误报告。