problem with gtk view
- From: "Rajesh kumar" <rajesh_drdo rediffmail com>
- To: <gtk-app-devel-list gnome org>
- Subject: problem with gtk view
- Date: 30 Aug 2006 04:27:33 -0000
hi
I have created textview widget through GLADE application and showing
char strings on text view which is created by glade interface designer 2.0
available with Fedorra-1
The problem is that sometimes it is working correctly but
other times segfault is coming. There are two threads are running One for main
thread transmitting and other continuously looking for message
As I think it is a problem with showing window with
textviwew widget bcoz with other window problem is not there
The part of code with problem:
ReceiveWindow=create_rcv_FreetextWindow
();
GtkTextBuffer
*buffer;
printf(\"\\n
window created\\n\"); //sleep(5);//every time when it fails it is failing after showing printf
statement
gdk_threads_enter();//for
making thread safe
//sleep(5);
printf(\"\\n
thread entered\\n\");
gtk_widget_show(ReceiveWindow);
printf(\"\\n window
showed\\n\");
gdk_threads_leave();//for
making thread safe
printf(\"\\n
theread leave\\n\");
for (i=0;
i<100;i++) printf(\"\\a\");//for sound alert on receing the message
printf(\"\\n
window showed\\n\");
buffer =
gtk_text_view_get_buffer(GTK_TEXT_VIEW
(lookup_widget(GTK_WIDGET(ReceiveWindow),\"textview1\")));
gtk_label_set_text(GTK_LABEL(lookup_widget(ReceiveWindow,\"Fromnamelabel\")),\"\");
printf(\"\\nText
Message is %s\\n\",x_fields->val);
This is errors
coming before giving segfault in run time
(fot:19108): Gtk-CRITICAL **: file
gtktexttag.c: line 1932 (gtk_text_attributes_ref): assertion `values != NULL\'
failed
(fot:19108): Gtk-CRITICAL **: file
gtktexttag.c: line 1932 (gtk_text_attributes_ref): assertion `values != NULL\'
failed
window created
Segmentation fault
any help is greatly appriciated
rajesh
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]