Re: [gtk-list] Weird problem I had.



Am Sun, 31 Jan 1999 schrieb Yoni Elhanani:
>Hi all.
>
>I have made a program that a certain callback of it reads from a file
>(same file all the time, but its being written by another program before
>this).
>The first time it reads the file is ok and it functions correctly.
>
>However, the second time I try to read from the file it gives me that:
>
>GLib-CRITICAL **: file ghook.c: line 335 (g_hook_list_marshal_check):
>assertion `hook_list->is_setup' failed.
>Segmentation fault (core dumped)
>
>(I use glib-1.1.13)
>Whats wrong???
>
>Here is a part of the problematic code, when it is removed, then the
>program doesnt dump core.
>
>  fp = fopen("/tmp/output.temp","r");
>  for(counter=0; counter<6; counter++)
>    fscanf(fp,"%s",output_text); /*skipping useless info */
>/* parsing the info, blah blah, doesnt matter for this error */  
>  fclose(fp);
>
>If you need some more of the code, i can send it too, but i dont think
>it is important anyway.
>
>Yoni.
>
>-- 
>
>Windows 2000 will probably be delayed until 1901.
>
>-- 
>To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null

Hello Yoni,
it seems to be a problem with output text ?!
It seems that is is a char * output_text; ?
have you got the memory with :output_text=(char *)g_malloc (size of textstring);
or have you didn cleaned up the memory exactly with g_free (output_text); ??

Please send me the whole code with the memory part on it if i´m wrong ..
Have a nice day

Andreas Scherf
+-------------------------------------------+
I EMail   : scherfa@fh-trier.de             I  
I Homepage: http://www.fh-trier.de/~scherfa I
+-------------------------------------------+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]