QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 623|回复: 0

请教大虾们

[复制链接]
发表于 2003-2-26 17:15:39 | 显示全部楼层 |阅读模式
我在用gtk/gnome做界面,包含一个文档界面(有工具栏)和一个弹出式对话框(包括两个radio按钮和3个entrybutton),两者分开时编译运行都正常。但当把对话框放入文档中,即和菜单和工具栏做连接时,编译通过,但是执行却出问题了。是在对话框弹出后,点击“ok”或“cancel”都会出现错误对话框,如下显示:Application "./frame" (process 2889) has crashed due to a fatal error.(Segmentation fault)
但是点击“关闭”,却是好的。(“关闭”和“cancel”的程序代码是一样的)
代码是:
Angle *angle;
angle = (Angle *)user_data;
gtk_widget_destroy(GTK_WIDGET(angle->dialog);

Angle是我建的一个struct。

我用gdb来查错,输出结果是:


Breakpoint 1, main (argc=1, argv=0xbffff9f4) at frame.c:14
14                gnome_init("frame","1.0",argc,argv);
(gdb) s
0x4009eab4 in gnome_init () at eval.c:41
41        eval.c: No such file or directory.
        in eval.c
(gdb) n

GnomeUI-WARNING **: Could not open help topics file NULL

Program received signal SIGSEGV, Segmentation fault.
0x40245331 in gtk_type_check_object_cast () at eval.c:41
41        in eval.c
(gdb) n
0x4050566a in __wait4 () from /lib/i686/libc.so.6
(gdb) n
Single stepping until exit from function __wait4,
which has no line number information.
__libc_waitpid (pid=2993, stat_loc=0xbfffe9a0, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:27
27        ../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
        in ../sysdeps/unix/sysv/linux/waitpid.c
(gdb) n
26        in ../sysdeps/unix/sysv/linux/waitpid.c
(gdb) n
27        in ../sysdeps/unix/sysv/linux/waitpid.c
(gdb) n
0x4009ee88 in gnome_segv_handle () at eval.c:41
41        eval.c: No such file or directory.
        in eval.c
(gdb) n

Program exited with code 01.

实在是搞不懂到底是哪里错了,请各位大虾指教阿!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-16 10:19 , Processed in 0.041658 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表