GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Oct 02, 2014 10:25 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: GTK stops working after some time
PostPosted: Wed Jul 03, 2013 11:24 am 
Offline
Familiar Face

Joined: Wed Jan 23, 2013 5:18 pm
Posts: 26
Hi,
I am developing a application in gtk (gtk+-2.15.5) for powerpc,
I have created a front end screen using glade.
My application comps properly in beaning as expected, but after some time the console throws a error as below and application got killed.
Quote:
(gtkdisplay:1238): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed
(gtkdisplay:1238): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GdkWindow'
(gtkdisplay:1238): Gdk-CRITICAL **: IA__gdk_window_process_updates: assertion `GDK_IS_WINDOW (window)' failed
(gtkdisplay:1238): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed


Please help me what is going wrong.
Thanks.

_________________
Thanks,
Arief.
None of us is stronger than all of us


Top
 Profile  
 
 Post subject: Re: GTK stops working after some time
PostPosted: Wed Jul 03, 2013 12:35 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 750
Location: UK
Hello,

Why are you using GTK+ 2.15.5? This is a development release not for general use (testing only) and is also very old with 2.16 being initially released in March 2009. The last 2 series of GTK is v2.24.xx which is what you should be using.

With regard to your error it is almost impossible to say what is going wrong. It is like showing me some smoke and asking me what is wrong with my car.

The best thing is to compile your application with debugging symbols enabled and use a debugger to monitor your application so that it can get a back trace to the exact line where it crashes in your code. Have a look at variables, especially any are used but not be initialised . Also when compiling your code try enabling extra warnings which may point out potential errors in your code.

_________________
E.


Top
 Profile  
 
 Post subject: Re: GTK stops working after some time
PostPosted: Wed Jul 03, 2013 1:33 pm 
Offline
Familiar Face

Joined: Wed Jan 23, 2013 5:18 pm
Posts: 26
Quote:
Why are you using GTK+ 2.15.5? This is a development release not for general use (testing only) and is also very old with 2.16 being initially released in March 2009. The last 2 series of GTK is v2.24.xx which is what you should be using.


I am using frambuffer as back end , that is the reason I took 2.15.5 and i am not aware of development release , and i tried so many gtk versions for my cross platform (Power PC) and the one which compiled is GTK+ 2.15.5 so I started working on it. will v2.24.xx work with frambuffer?

Quote:
The best thing is to compile your application with debugging symbols enabled and use a debugger to monitor your application so that it can get a back trace to the exact line where it crashes in your code


I will try to enable the debug and post the results.

Thanks for your help.

_________________
Thanks,
Arief.
None of us is stronger than all of us


Top
 Profile  
 
 Post subject: Re: GTK stops working after some time
PostPosted: Wed Jul 03, 2013 1:46 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 750
Location: UK
GTK+ 2.24.xx is the last version to work with frame buffer. If has now been dropped with GTK+ v3.xx due to lack of support/developers.

_________________
E.


Top
 Profile  
 
 Post subject: Re: GTK stops working after some time
PostPosted: Thu Jul 04, 2013 12:23 pm 
Offline
Familiar Face

Joined: Wed Jan 23, 2013 5:18 pm
Posts: 26
Hi Errol Thanks a lot, as you suggested
I have installed GTK v2.24.19 with glib 2.34.3.

The sample program of GTK v2.24.19 Helloworld and progress bar is running fine (with some font error).

But now the problem in loading glade file in my program.

I am using glade 3.6(also tried 3.8) to create UI screens

my code as below

Code:
int main( int argc, char **argv )
{
   GError *error = NULL;

   //Initialise GTK+
   gtk_init( &argc, &argv );

   //Create new GtkBuilder object
   builder = gtk_builder_new();

   //Load UI from file. If error occurs, report it and quit application.
   if( ! gtk_builder_add_from_file( builder, "/jem/tested.glade", &error ) )
      {
         g_warning( "%s", error->message );
         g_free( error );
         return( 1 );
      }



I am getting the following error in target when i execute the application and application get killed.
looks like if( ! gtk_builder_add_from_file( builder, "/jem/tested.glade", &error ) ) throwing error

Quote:
~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.6.3 |~~~~~~~~~~~~~~~~~~~~~~~~~~
(c) 2012-2013 DirectFB integrated media GmbH
(c) 2001-2013 The world wide DirectFB Open Source Community
(c) 2000-2004 Convergence (integrated media) GmbH
----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2013-05-06 09:43)
(*) Direct/Memcpy: Using ppcasm_memcpy()
(*) Direct/Thread: Started 'Fusion Dispatch' (1268) [MESSAGING OTHER/OTHER 0/0] <8388608>...
(*) Direct/Thread: Started 'VT Switcher' (1273) [CRITICAL OTHER/OTHER 0/0] <8388608>...
(*) Direct/Thread: Started 'VT Flusher' (-1) [DEFAULT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/FBDev: Found 'Panel0' (ID 0) with frame buffer at 0x007fe000, 255k (MMIO 0x00000000, 0k)
(*) Direct/Thread: Started 'Keyboard Input' (1275) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Keyboard 0.9 (directfb.org)
(*) Direct/Thread: Started 'Hotplug with Linux Input' (1276) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Hot-plug detection enabled with Linux Input Driver
(*) DirectFB/Graphics: Generic Software Rasterizer 0.7 (directfb.org)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) FBDev/Mode: Setting 480x272 RGB16
(*) FBDev/Mode: Switched to 480x272 (virtual 480x272) at 16 bit (RGB16), pitch 960
(*) FBDev/Mode: Setting 480x272 RGB16
(*) FBDev/Mode: Switched to 480x272 (virtual 480x272) at 16 bit (RGB16), pitch 960
(!!!) *** UNIMPLEMENTED [fusion_get_fusionee_pid] *** [fusion.c:3517]
(*) Direct/Thread: Started 'EventBufferFeed' (1277) [MESSAGING OTHER/OTHER 0/0] <8388608>...

** (jem2:1266): WARNING **: Invalid object type `GtkWindow'



Here is my Makefile

Code:
CC = powerpc-linux-gnu-gcc

CFLAGS= -pthread -I/opt/gtkdfb-al-1/usr/local/include/glib-2.0 -I/opt/gtkdfb-al-1/usr/local/lib/glib-2.0/include -I/opt/gtkdfb-al-1/usr/local/include/pango-1.0 -I/opt/gtkdfb-al-1/usr/local/include/cairo -I/opt/gtkdfb-al-1/usr/local/include -I/opt/gtkdfb-al-1/usr/local/freetype2 -I/opt/gtkdfb-al-1/usr/local/libpng12 -I/opt/gtkdfb-al-1/usr/local/include/gtk-2.0 -I/opt/gtkdfb-al-1/usr/local/include/gio-unix-2.0 -I/opt/gtkdfb-al-1/usr/local/lib/gtk-2.0/include -I/opt/gtkdfb-al-1/usr/local/include/gdk-pixbuf-2.0 -I/opt/gtkdfb-al-1/usr/local/include/gtk-unix-print-2.0 -I/opt/gtkdfb-al-1/usr/local/include/gail-1.0 -D_REENTRANT -D_GNU_SOURCE -I/opt/gtkdfb-al-1/usr/include/directfb
CLIBS = -L/opt/gtkdfb-al-1/usr/local/lib  -lpthread -lpangocairo-1.0 -lpangoft2-1.0 -lpango-1.0 -ldirectfb -lfusion -ldirect -lxml2 -latk-1.0 -lgobject-2.0 -lgmodule-2.0 -lgio-2.0 -ldl -lglib-2.0 -lcairo -lgthread-2.0 -lpng15 -lz -lm -lpixman-1 -lgdk_pixbuf-2.0  -export-dynamic -lgdk-directfb-2.0 -lgtk-directfb-2.0 -lgtk-directfb-2.0 -lgailutil -lfontconfig -lfreetype -pthread -lrt -lffi -lm

helloworld: main_gtk.cpp
    $(CC) main_gtk.cpp -o jem2 $(CFLAGS) $(CLIBS) `pkg-config gtk+-2.0 --cflags --libs`



Please let me know what is wrong.

_________________
Thanks,
Arief.
None of us is stronger than all of us


Top
 Profile  
 
 Post subject: Re: GTK stops working after some time
PostPosted: Fri Jul 05, 2013 2:18 am 
Offline
Familiar Face

Joined: Wed Jan 23, 2013 5:18 pm
Posts: 26
There was a problem in my download which make gtkwindow Invalid , I am trying fresh gtk download.
So closing this thread.
Thanks for your support.

_________________
Thanks,
Arief.
None of us is stronger than all of us


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group