help needed
- From: thomas joseph <thomascanny yahoo co nz>
- To: gtk-app-devel-list gnome org
- Subject: help needed
- Date: Tue, 12 Nov 2002 06:31:15 +1300 (NZDT)
Hi All,
I need a small hep from you.
I am developing a multithreaded application with
front end as gtk. when I make a call to g_thread_init
( if (!g_thread_supported ()) g_thread_ini ();)
just before gtk_init , the program gives segmentation
fault. If I comment the call to g_thread_init it runs
fine. Only my main thread deals with GUI. Do I still
need to protect the gtk calls ?
and I need to insert log messages in to my main
window.
I have the following code
int setLogLine (char *pszMes)
{
/* insert the text. using gtk_text_insert. */
/* get the adjustments for vertical scrollbar. */
pAdj = gtk_range_get_adjustment ((GtkRange*)
pvscrollBar);
/* set the value to point it down. */
gtk_adjustment_set_value (pAdj,
CLAMP (pAdj->upper - pAdj->page_size/2,
pAdj->lower,
(pAdj->upper - pAdj->page_size)));
/* generate the signal. */
gtk_adjustment_value_changed (pAdj);
return 0;
}
I am able to insert few messages but later the
application hangs. Can somebody tell me what am I
doing wrong here.
any suggestions are of great help.
Thanks and Regards,
thomas joseph
http://careers.yahoo.com.au - Yahoo! Careers
- 1,000's of jobs waiting online for you!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]