Re: gtk+ crashes my X window system?!?!?

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

 



Hi,

thanks for replies.

> One possibility is that your program is running the system out of
> memory and that is causing the X server to be killed.

Yes, I suppose it too (I don't report all source code because it's too long)

It uses a simple algo to free single useless element between 2 array (absolute
and temporary)

variables used: GPtrArray *list_to_control, GPtrArray *list_controller,
generic_data_struct *elem
(arrays are filled with generic_data_struct typedef)

        l = list_controller->len;
	i = list_to_control->len -1;
	
	for (; i < 0; i--)
	{	
		
		elem = g_ptr_array_index(list_to_control, i);
		existent = FALSE;
		
		for (j=0; j<l; j++)
		{
			
			if (elem == g_ptr_array_index(list_controller, j))
			{
				existent = TRUE;
				j = l;
			}
		}
			
		if (existent == FALSE)
		{
			g_ptr_array_remove_index (list_to_control, i);
			g_free (elem);
		}
		
	}

at the end:

list_controller is free with g_free(list_controller);
I think that this part of code 'make crash' all.

Have you an idea?

Thank you very much (and sorry for my boring questions:))

France

__________________________________________________________________
Tiscali ADSL SENZA CANONE:
Attivazione GRATIS, contributo adesione GRATIS, modem GRATIS,
50 ore di navigazione GRATIS.  ABBONARTI TI COSTA SOLO UN CLICK!
http://point.tiscali.it/adsl/index.shtml



_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux