Fabio da Silva | 23 Sep 2004 22:11
Favicon

Filling polygons using GTK-Extra.

Hello again!

I need to draw some figures in my application that will require the 
creation and
display of polygons on the screen. On the gtkplotdata.h file I found a 
few basic
shapes like, lines, rectangles and ellipses. Is there a similar function 
for general
polygons?

I tried to fill the region defined by a set of points using 
gtk_plot_data_fill_area, but
the filling is done with respect to the x-axis... I also looked at the 
gtkplotpc.h file,
but I am not sure whether or not I could use those functions into a 
canvas widget.
I checked the CVS repository, but  couldn't find a testgtkplotpc.c file 
for some
enlightening hints either. I can try it if that's the answer, but I want 
to check with
you guys first.

Any suggestion?

    Thank you,

        Fabio.

-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
(Continue reading)

Adrian E. Feiguin | 24 Sep 2004 00:51
Picon
Favicon

Re: Filling polygons using GTK-Extra.

Oi Fabio! This is what I would do:

1) Take a look at gtkplotbox.[ch] copy it into a new file gtkplotpoly.[ch].
2) Replace all the Box->Poly ; plot_box -> plot_poly
3) go to gtk_plot_poly_draw_symbol, and replace all the code for dawing 
your custom polygon. Example:

 GtkPlotPoint point[n];

 point[0].x = ...;
 point[0].y = ...;
....
 point[n-1].x = ...;
 point[n-1].y = ...;

 gtk_plot_pc_draw_polygon(plot->pc, TRUE,point, n);

and voila! compile together with your code.
BTW. to convert from actual (x,y) coordinates to GtkPlotPoint (pixel) 
coordinates, you should use:

gtk_plot_get_pixel(plot, x, y, &point.x, &point.y);

Good luck!,
Saludos,
<ADRIAN>

Fabio da Silva wrote

Hola, Adrian!
(Continue reading)

Prakash Bhurke | 24 Sep 2004 17:24
Picon
Favicon

Gdk-WARNING **: gdkgc-win32.c:898: SaveDC failed: Not enough

Hi,
 
    Few months ago, I downloaded gtkexrta2 from sourceforge's CVS server.
    I was able to build/run it successfully on Windows XP.
    Now, i have developed an application (uses gtkextra for plotting graph) which runs more than hour.
-------------------------------------------------------------------------------------------------------------------------------
    But after few mins , I got segmenation fault having following error messages.
-------------------------------------------------------------------------------------------------------------------------------
(sds/sds.exe:2976): Gdk-WARNING **: gdkgc-win32.c:898: SaveDC failed: Not enough
 storage is available to process this command.
(sds/sds.exe:2976): Gdk-WARNING **: gdkgc-win32.c:1048: RestoreDC failed:
The parameter is incorrect.
(sds/sds.exe:2976): Gdk-WARNING **: gdkgc-win32.c:895: CreateCompatibleDC failed
: The parameter is incorrect.
(sds/sds.exe:2976): Gdk-WARNING **: gdkdrawable-win32.c:1007: SelectObject failed
:The handle is invalid.
(sds/sds.exe:2976): Gdk-WARNING **: gdkgc-win32.c:1046: GetCurrentObject failed
:The handle is invalid.
(sds/sds.exe:2976): Gdk-WARNING **: gdkgc-win32.c:1048: RestoreDC failed
:The handle is invalid.
(sds/sds.exe:2976): Gdk-WARNING **: gdkgc-win32.c:1051: DeleteDC failed
: The handle is invalid.
-------------------------------------------------------------------------------------------------------------------------------
   
    Here is backtrace after segfault :
-------------------------------------------------------------------------------------------------------------------------------
Program received signal SIGSEGV, Segmentation fault.
Program received signal SIGSEGV, Segmentation fault.
0x006d7b29 in ?? ()
(gdb) bt
#0  0x006d7b29 in ?? ()
#1  0x0069518b in ?? ()
#2  0x0069518b in ?? ()
#3  0x006954b5 in ?? ()
#4  0x00695381 in ?? ()
#5  0x10037b2b in g_static_rw_lock_writer_lock () at gtkplotgdk.c:841
#6  0x1005a0a6 in g_get_home_dir () at gtkplotpc.c:249
#7  0x10031e32 in gdk_drawable_impl_win32_class_init () at gtkplot.c:1611
#8  0x10031d72 in gdk_drag_get_selection () at gtkplot.c:1597
#9  0x10030f03 in g_slist_sort () at gtkplot.c:1280
#10 0x1002f4d4 in gdk_cursor_new_from_pixmap () at gtkplot.c:702
#11 0x1002f097 in gtk_clist_unmap () at gtkplot.c:579
#12 0x10003c59 in g_utf8_get_char () at gtkplotcanvas.c:519
#13 0x00423ff2 in refresh_sds_gca_plot () at sr c/sds_plot_fun.c:638
#14 0x00422a9b in add_dataset_line () at src/sds_plot_fun.c:188
#15 0x00422569 in update_scr_plot (data=0x0) at src/sds_plot_fun.c:76
#16 0x0073c73b in ?? ()
#17 0x0073d07c in ?? ()
#18 0x0073d6e3 in ?? ()
#19 0x0073a21f in ?? ()
#20 0x00a1d119 in ?? ()
#21 0x0042100f in main (argc=1, argv=0xbc50d0) at src/main.c:205
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
error return ../../../BUILD/gdb-5.1.1/gdb/win32-nat.c:1352 was 5
Starting program: C:\home\user\daedalus\source\sds/sds.exe
Program received signal SIGSEGV, Segmentation fault.
0x006d03ea in ?? ()
(gdb) bt
#0  0x006d03ea in ?? ()
#1  0x006d06d2 in ?? ()
#2  0x0069837a in ?? ()
#3  0x1002cca1 in gtk_psfont_get_gdkfont (font=0x1006f570, height=13)
    at gtkpsfont.c:413
#4  0x100375d6 in drawstring (pc=0x14975c8, dest=0x2703f08, gc=0x2709300,
    dx=110, dy=15, psfont=0x1006f570, height=13, wc=91) at gtkplotgdk.c:521
#5  0x10037a51 in palette_drag_end () at gtkplotgdk.c:822
#6  0x1005a0a6 in g_get_home_dir () at gtkplotpc.c:249
#7  0x10031e32 in gdk_drawable_impl_win32_class_init () at gtkplot.c:1611
#8  0x10031d72 in gdk_drag_get_selection () at gtkplot.c:1597
#9  0x10030f03 in g_slist_sort () at gtkplot.c:1280
#10 0x1002f4d4 in gdk_cursor_new_from_pixmap () at gtkplot.c:702
#11 0x1002f097 in gtk_clist_unmap () at gtkplot.c:579
#12 0x10003c59 in g_utf8_get_char () at gtkplotcanvas.c:519
#13 0x00423ff2 in refresh_sds_gca_plot () at src/sds_plot_fun.c:638
#14 0x00422a9b in add_dataset_line () at src/sds_plot_fun.c:188
#15 0x00422569 in update_scr_plot (data=0x0) at src/sds_plot_fun.c:76
#16 0x0073c73b in ?? ()
#17 0x0073d07c in ?? ()
#18 0x0073d6e3 in ?? ()
#19 0x0073a21f in ?? ()
#20 0x00a1d119 in ?? ()
---Type <return> to continue, or q <return> to quit---
-------------------------------------------------------------------------------------------------------------------------------
 
I tried to build new CVS version gtkexrta2 .
I got some build error, but I successed to build gtkextra2 by modifying Makefile.win.
 
But I couldn't build my application with new cvs version gtkexrea2. I got following error :
src/plot_fun.c: In function `change_color_of_axis':
src/plot_fun.c:319: warning: passing arg 1 of `gtk_plot_axis_get_attributes' from incompatible pointer type
src/plot_fun.c:319: incompatible type for argument 2 of `gtk_plot_axis_get_attributes'
src/plot_fun.c:319: warning: passing arg 3 of `gtk_plot_axis_get_attributes' from incompatible pointer type
src/plot_fun.c:319: too many arguments to function `gtk_plot_axis_get_attributes'
src/plot_fun.c:322: warning: passing arg 1 of `gtk_plot_axis_set_attributes' from incompatible pointer type
src/plot_fun.c:322: incompatible type for argument 3 of `gtk_plot_axis_set_attributes'
src/plot_fun.c:322: too many arguments to function `gtk_plot_axis_set_attributes'
src/plot_fun.c: In function `create_plot1':
src/plot_fun.c:348: warning: passing arg 1 of `gtk_plot_axis_set_ticks' from incompatible pointer type
src/ plot_fun.c:348: too many arguments to function `gtk_plot_axis_set_ticks'
src/plot_fun.c:349: warning: passing arg 1 of `gtk_plot_axis_set_ticks' from incompatible pointer type
src/plot_fun.c:349: too many arguments to function `gtk_plot_axis_set_ticks'
src/plot_fun.c:351: warning: passing arg 1 of `gtk_plot_axis_set_labels_style' from incompatible pointer type
src/plot_fun.c:351: too many arguments to function `gtk_plot_axis_set_labels_style'
src/plot_fun.c:352: warning: passing arg 1 of `gtk_plot_axis_set_labels_style' from incompatible pointer type
src/plot_fun.c:352: too many arguments to function `gtk_plot_axis_set_labels_style'
src/plot_fun.c:353: warning: passing arg 1 of `gtk_plot_axis_set_visible' from incompatible pointer type
src/plot_fun.c:353: too many arguments to function `gtk_plot_axis_set_visible'
src/plot_fun.c:354: warning: passing arg 1 of `gtk_plot_axis_set_visible' from incompatible pointer type
src/plot_fun.c:354: too many argume nts to function `gtk_plot_axis_set_visible'
src/plot_fun.c:365: warning: passing arg 1 of `gtk_plot_axis_set_labels_attributes' from incompatible pointer type
src/plot_fun.c:365: warning: passing arg 3 of `gtk_plot_axis_set_labels_attributes' makes integer from pointer without a cast
src/plot_fun.c:365: warning: passing arg 7 of `gtk_plot_axis_set_labels_attributes' makes integer from pointer without a cast
src/plot_fun.c:365: too many arguments to function `gtk_plot_axis_set_labels_attributes'
src/plot_fun.c:375: warning: passing arg 1 of `gtk_plot_axis_set_labels_attributes' from incompatible pointer type
src/plot_fun.c:375: warning: passing arg 2 of `gtk_plot_axis_set_labels_attributes' makes pointer from integer without a cast
src/plot_fun.c:375: warning: passing arg 3 of `gtk_plot_axis_set_labels_attributes' makes integer from pointer without a cast
src/plot_fun.c:375: warning: passing arg 7 of `gtk_plot_axis_set_labels_attributes' makes integer fro m pointer without a cast
src/plot_fun.c:375: too many arguments to function `gtk_plot_axis_set_labels_attributes'
src/plot_fun.c:379: warning: passing arg 1 of `gtk_plot_axis_hide_title' from incompatible pointer type
src/plot_fun.c:379: too many arguments to function `gtk_plot_axis_hide_title'
src/plot_fun.c:380: warning: passing arg 1 of `gtk_plot_axis_hide_title' from incompatible pointer type
src/plot_fun.c:380: too many arguments to function `gtk_plot_axis_hide_title'
src/plot_fun.c:381: warning: passing arg 1 of `gtk_plot_axis_hide_title' from incompatible pointer type
src/plot_fun.c:381: too many arguments to function `gtk_plot_axis_hide_title'
src/plot_fun.c:393: warning: passing arg 1 of `gtk_plot_axis_title_set_attributes' from incompatible pointer type
src/plot_fun.c:393: warning: passing arg 3 of `gtk_plot_axis_title_set_attributes' makes integer from pointer without a cast
src/plot_fun.c:393: warning: passing arg 5 of `gt k_plot_axis_title_set_attributes' makes pointer from integer without a cast
src/plot_fun.c:393: warning: passing arg 7 of `gtk_plot_axis_title_set_attributes' makes integer from pointer without a cast
src/plot_fun.c:393: too many arguments to function `gtk_plot_axis_title_set_attributes'
src/plot_fun.c:395: warning: passing arg 1 of `gtk_plot_axis_set_title' from incompatible pointer type
src/plot_fun.c:395: too many arguments to function `gtk_plot_axis_set_title'
src/plot_fun.c:396: warning: passing arg 1 of `gtk_plot_axis_move_title' from incompatible pointer type
src/plot_fun.c:396: too many arguments to function `gtk_plot_axis_move_title'
src/plot_fun.c: In function `create_plot2':
src/plot_fun.c:466: warning: passing arg 1 of `gtk_plot_axis_set_ticks' from incompatible pointer type
src/plot_fun.c:466: too many arguments to function `gtk_plot_axis_set_ticks'
src/plot_fun.c:467: warning: passing arg 1 of `gtk_plot_axis_set_ticks' from incompatible poi nter type
src/plot_fun.c:467: too many arguments to function `gtk_plot_axis_set_ticks'
src/plot_fun.c:469: warning: passing arg 1 of `gtk_plot_axis_set_labels_style' from incompatible pointer type
src/plot_fun.c:469: too many arguments to function `gtk_plot_axis_set_labels_style'
src/plot_fun.c:470: warning: passing arg 1 of `gtk_plot_axis_set_labels_style' from incompatible pointer type
src/plot_fun.c:470: too many arguments to function `gtk_plot_axis_set_labels_style'
src/plot_fun.c:471: warning: passing arg 1 of `gtk_plot_axis_set_visible' from incompatible pointer type
src/plot_fun.c:471: too many arguments to function `gtk_plot_axis_set_visible'
src/plot_fun.c:472: warning: passing arg 1 of `gtk_plot_axis_set_visible' from incompatible pointer type
src/plot_fun.c:472: too many arguments to function `gtk_plot_axis_set_visible'
src/plot_fun.c:476: warning: passing arg 1 of `gtk_plot_axis_hide_title' from incompatible pointer type
src/plot_fun.c:476: too many arguments to function `gtk_plot_axis_hide_title'
src/plot_fun.c:477: warning: passing arg 1 of `gtk_plot_axis_hide_title' from incompatible pointer type
src/plot_fun.c:477: too many arguments to function `gtk_plot_axis_hide_title'
src/plot_fun.c:478: warning: passing arg 1 of `gtk_plot_axis_hide_title' from incompatible pointer type
src/plot_fun.c:478: too many arguments to function `gtk_plot_axis_hide_title'
src/plot_fun.c:489: warning: passing arg 1 of `gtk_plot_axis_set_labels_attributes' from incompatible pointer type
src/plot_fun.c:489: warning: passing arg 3 of `gtk_plot_axis_set_labels_attributes' makes integer from pointer without a cast
src/plot_fun.c:489: warning: passing arg 7 of `gtk_plot_axis_set_labels_attributes' makes integer from pointer without a cast
src/plot_fun.c:489: too many arguments to function `gtk_plot_axis_set_labels_attributes'
src/plot_fun.c:499: warni ng: passing arg 1 of `gtk_plot_axis_set_labels_attributes' from incompatible pointer type
src/plot_fun.c:499: warning: passing arg 2 of `gtk_plot_axis_set_labels_attributes' makes pointer from integer without a cast
src/plot_fun.c:499: warning: passing arg 3 of `gtk_plot_axis_set_labels_attributes' makes integer from pointer without a cast
src/plot_fun.c:499: warning: passing arg 7 of `gtk_plot_axis_set_labels_attributes' makes integer from pointer without a cast
src/plot_fun.c:499: too many arguments to function `gtk_plot_axis_set_labels_attributes'
src/plot_fun.c:511: warning: passing arg 1 of `gtk_plot_axis_title_set_attributes' from incompatible pointer type
src/plot_fun.c:511: warning: passing arg 3 of `gtk_plot_axis_title_set_attributes' makes integer from pointer without a cast
src/plot_fun.c:511: warning: passing arg 5 of `gtk_plot_axis_title_set_attributes' makes pointer from integer without a cast
src/plot_fun.c:511: warning: passing ar g 7 of `gtk_plot_axis_title_set_attributes' makes integer from pointer without a cast
src/plot_fun.c:511: too many arguments to function `gtk_plot_axis_title_set_attributes'
src/plot_fun.c:512: warning: passing arg 1 of `gtk_plot_axis_set_title' from incompatible pointer type
src/plot_fun.c:512: too many arguments to function `gtk_plot_axis_set_title'
src/plot_fun.c:513: warning: passing arg 1 of `gtk_plot_axis_move_title' from incompatible pointer type
src/plot_fun.c:513: too many arguments to function `gtk_plot_axis_move_title'
make: *** [src/plot_fun.o] Error 1
 
 Please suggest the solution to this problem.
 
Regards,
Prakash.

Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
Adrian E. Feiguin | 27 Sep 2004 20:35
Picon
Favicon

Re: Gdk-WARNING **: gdkgc-win32.c:898: SaveDC failed: Not enough

Hi Prakash! This look like a problem with the font loading, maybe a 
memory leak. However, I rewrote that piece of code completely, to use 
Pango instead of gdk fonts. Why don't you try with the new CVS version, 
and let me know?
Thanks!,
<ADRIAN>

Prakash Bhurke wrote:

> Hi,
>  
>     Few months ago, I downloaded gtkexrta2 from sourceforge's CVS server.
>     I was able to build/run it successfully on Windows XP.
>     Now, i have developed an application (uses gtkextra for plotting 
> graph) which runs more than hour.
> -------------------------------------------------------------------------------------------------------------------------------
>     But after few mins , I got segmenation fault having following 
> error messages.
> -------------------------------------------------------------------------------------------------------------------------------
> (sds/sds.exe:2976): Gdk-WARNING **: gdkgc-win32.c:898: SaveDC failed: 
> Not enough
>  storage is available to process this command.
> (sds/sds.exe:2976): Gdk-WARNING **: gdkgc-win32.c:1048: RestoreDC failed:
> The parameter is incorrect.
> (sds/sds.exe:2976): Gdk-WARNING **: gdkgc-win32.c:895: 
> CreateCompatibleDC failed
> : The parameter is incorrect.
> (sds/sds.exe:2976): Gdk-WARNING **: gdkdrawable-win32.c:1007: 
> SelectObject failed
> :The handle is invalid.
> (sds/sds.exe:2976): Gdk-WARNING **: gdkgc-win32.c:1046: 
> GetCurrentObject failed
> :The handle is invalid.
> (sds/sds.exe:2976): Gdk-WARNING **: gdkgc-win32.c:1048: RestoreDC failed
> :The handle is invalid.
> (sds/sds.exe:2976): Gdk-WARNING **: gdkgc-win32.c:1051: DeleteDC failed
> : The handle is invalid.
> -------------------------------------------------------------------------------------------------------------------------------
>    
>     Here is backtrace after segfault :
> -------------------------------------------------------------------------------------------------------------------------------
> Program received signal SIGSEGV, Segmentation fault.
> Program received signal SIGSEGV, Segmentation fault.
> 0x006d7b29 in ?? ()
> (gdb) bt
> #0  0x006d7b29 in ?? ()
> #1  0x0069518b in ?? ()
> #2  0x0069518b in ?? ()
> #3  0x006954b5 in ?? ()
> #4  0x00695381 in ?? ()
> #5  0x10037b2b in g_static_rw_lock_writer_lock () at gtkplotgdk.c:841
> #6  0x1005a0a6 in g_get_home_dir () at gtkplotpc.c:249
> #7  0x10031e32 in gdk_drawable_impl_win32_class_init () at gtkplot.c:1611
> #8  0x10031d72 in gdk_drag_get_selection () at gtkplot.c:1597
> #9  0x10030f03 in g_slist_sort () at gtkplot.c:1280
> #10 0x1002f4d4 in gdk_cursor_new_from_pixmap () at gtkplot.c:702
> #11 0x1002f097 in gtk_clist_unmap () at gtkplot.c:579
> #12 0x10003c59 in g_utf8_get_char () at gtkplotcanvas.c:519
> #13 0x00423ff2 in refresh_sds_gca_plot () at src/sds_plot_fun.c:638
> #14 0x00422a9b in add_dataset_line () at src/sds_plot_fun.c:188*#15 
> 0x00422569 in update_scr_plot (data=0x0) at src/sds_plot_fun.c:76
> #16 0x0073c73b in ?? ()
> #17 0x0073d07c in ?? ()
> #18 0x0073d6e3 in ?? ()
> #19 0x0073a21f in ?? ()
> #20 0x00a1d119 in ?? ()
> #21 0x0042100f in main (argc=1, argv=0xbc50d0) at src/main.c:205
> (gdb) r
> The program being debugged has been started already.
> Start it from the beginning? (y or n) y*
> *error return ../../../BUILD/gdb-5.1.1/gdb/win32-nat.c:1352 was 5
> Starting program: C:\home\user\daedalus\source\sds/sds.exe*
> *Program received signal SIGSEGV, Segmentation fault.
> 0x006d03ea in ?? ()
> (gdb) bt
> #0  0x006d03ea in ?? ()
> #1  0x006d06d2 in ?? ()
> #2  0x0069837a in ?? ()
> #3  0x1002cca1 in gtk_psfont_get_gdkfont (font=0x1006f570, height=13)
>     at gtkpsfont.c:413
> #4  0x100375d6 in drawstring (pc=0x14975c8, dest=0x2703f08, gc=0x2709300,
>     dx=110, dy=15, psfont=0x1006f570, height=13, wc=91) at 
> gtkplotgdk.c:521
> #5  0x10037a51 in palette_drag_end () at gtkplotgdk.c:822
> #6  0x1005a0a6 in g_get_home_dir () at gtkplotpc.c:249
> #7  0x10031e32 in gdk_drawable_impl_win32_class_init () at gtkplot.c:1611
> #8  0x10031d72 in gdk_drag_get_selection () at gtkplot.c:1597
> #9  0x10030f03 in g_slist_sort () at gtkplot.c:1280
> #10 0x1002f4d4 in gdk_cursor_new_from_pixmap () at gtkplot.c:702
> #11 0x1002f097 in gtk_clist_unmap () at gtkplot.c:579
> #12 0x10003c59 in g_utf8_get_char ()! at gtkplotcanvas.c:519
> #13 0x00423ff2 in refresh_sds_gca_plot () at src/sds_plot_fun.c:638
> #14 0x00422a9b in add_dataset_line () at src/sds_plot_fun.c:188
> #15 0x00422569 in update_scr_plot (data=0x0) at src/sds_plot_fun.c:76
> #16 0x0073c73b in ?? ()
> #17 0x0073d07c in ?? ()
> #18 0x0073d6e3 in ?? ()
> #19 0x0073a21f in ?? ()
> #20 0x00a1d119 in ?? ()
> ---Type <return> to continue, or q <return> to quit---*
> *-------------------------------------------------------------------------------------------------------------------------------*
> * *
> *I tried to build new CVS version gtkexrta2 .*
> *I got some build error, but I successed to build gtkextra2 by 
> modifying Makefile.win.*
> * *
> *But I couldn't build my application with new cvs version gtkexrea2. I 
> got following error :*
> *src/plot_fun.c: In function `change_color_of_axis':
> src/plot_fun.c:319: warning: passing arg 1 of 
> `gtk_plot_axis_get_attributes' from incompatible pointer type
> src/plot_fun.c:319: incompatible type for argument 2 of 
> `gtk_plot_axis_get_attributes'
> src/plot_fun.c:319: warning: passing arg 3 of 
> `gtk_plot_axis_get_attributes' from incompatible pointer type
> src/plot_fun.c:319: too many arguments to function 
> `gtk_plot_axis_get_attributes'
> src/plot_fun.c:322: warning: passing arg 1 of 
> `gtk_plot_axis_set_attributes' from incompatible pointer type
> src/plot_fun.c:322: incompatible type for argument 3 of 
> `gtk_plot_axis_set_attributes'
> src/plot_fun.c:322: too many arguments to function 
> `gtk_plot_axis_set_attributes'
> src/plot_fun.c: In function `create_plot1':
> src/plot_fun.c:348: warning: passing arg 1 of 
> `gtk_plot_axis_set_ticks' from incompatible pointer type
> src/plot_fun.c:348: too many arguments to function 
> `gtk_plot_axis_set_ticks'
> src/plot_fun.! c:349: warning: passing arg 1 of 
> `gtk_plot_axis_set_ticks' from incompatible pointer type
> src/plot_fun.c:349: too many arguments to function 
> `gtk_plot_axis_set_ticks'
> src/plot_fun.c:351: warning: passing arg 1 of 
> `gtk_plot_axis_set_labels_style' from incompatible pointer type
> src/plot_fun.c:351: too many arguments to function 
> `gtk_plot_axis_set_labels_style'
> src/plot_fun.c:352: warning: passing arg 1 of 
> `gtk_plot_axis_set_labels_style' from incompatible pointer type
> src/plot_fun.c:352: too many arguments to function 
> `gtk_plot_axis_set_labels_style'
> src/plot_fun.c:353: warning: passing arg 1 of 
> `gtk_plot_axis_set_visible' from incompatible pointer type
> src/plot_fun.c:353: too many arguments to function 
> `gtk_plot_axis_set_visible'
> src/plot_fun.c:354: warning: passing arg 1 of 
> `gtk_plot_axis_set_visible' from incompatible pointer type
> src/plot_fun.c:354: too many arguments to function 
> `gtk_plot_axis_set_visible'
> src/plot_fun.c:365: warning: passing arg 1! of 
> `gtk_plot_axis_set_labels_attributes' from incompatible pointer type
> src/plot_fun.c:365: warning: passing arg 3 of 
> `gtk_plot_axis_set_labels_attributes' makes integer from pointer 
> without a cast
> src/plot_fun.c:365: warning: passing arg 7 of 
> `gtk_plot_axis_set_labels_attributes' makes integer from pointer 
> without a cast
> src/plot_fun.c:365: too many arguments to function 
> `gtk_plot_axis_set_labels_attributes'
> src/plot_fun.c:375: warning: passing arg 1 of 
> `gtk_plot_axis_set_labels_attributes' from incompatible pointer type
> src/plot_fun.c:375: warning: passing arg 2 of 
> `gtk_plot_axis_set_labels_attributes' makes pointer from integer 
> without a cast
> src/plot_fun.c:375: warning: passing arg 3 of 
> `gtk_plot_axis_set_labels_attributes' makes integer from pointer 
> without a cast
> src/plot_fun.c:375: warning: passing arg 7 of 
> `gtk_plot_axis_set_labels_attributes' makes integer from pointer 
> without a cast
> src/plot_fun.c:375: too many arguments to function 
> `gtk_plot_axis_set_labels_attributes'
> src/plot_fun.c:379: warning: passing arg 1 of 
> `gtk_plot_axis_hide_title' from incompatible pointer type
> src/plot_fun.c:379: too many arguments to function 
> `gtk_plot_axis_hide_title'
> src/plot_fun.c:380: warning: passing arg 1 of 
> `gtk_plot_axis_hide_title' from incompatible pointer type
> src/plot_fun.c:380: too many arguments to function 
> `gtk_plot_axis_hide_title'
> src/plot_fun.c:381: warning: passing arg 1 of 
> `gtk_plot_axis_hide_title' from incompatible pointer type
> src/plot_fun.c:381: too many arguments to function 
> `gtk_plot_axis_hide_title'
> src/plot_fun.c:393: warning: passing arg 1 of 
> `gtk_plot_axis_title_set_attributes' from incompatible pointer type
> src/plot_fun.c:393: warning: passing arg 3 of 
> `gtk_plot_axis_title_set_attributes' makes integer from pointer 
> without a cast
> src/plot_fun.c:393: warning: passing arg 5 of 
> `gtk_plot_axis_title_set_attributes' makes pointer from integer 
> without a cast
> src/plot_f! un.c:393: warning: passing arg 7 of 
> `gtk_plot_axis_title_set_attributes' makes integer from pointer 
> without a cast
> src/plot_fun.c:393: too many arguments to function 
> `gtk_plot_axis_title_set_attributes'
> src/plot_fun.c:395: warning: passing arg 1 of 
> `gtk_plot_axis_set_title' from incompatible pointer type
> src/plot_fun.c:395: too many arguments to function 
> `gtk_plot_axis_set_title'
> src/plot_fun.c:396: warning: passing arg 1 of 
> `gtk_plot_axis_move_title' from incompatible pointer type
> src/plot_fun.c:396: too many arguments to function 
> `gtk_plot_axis_move_title'
> src/plot_fun.c: In function `create_plot2':
> src/plot_fun.c:466: warning: passing arg 1 of 
> `gtk_plot_axis_set_ticks' from incompatible pointer type
> src/plot_fun.c:466: too many arguments to function 
> `gtk_plot_axis_set_ticks'
> src/plot_fun.c:467: warning: passing arg 1 of 
> `gtk_plot_axis_set_ticks' from incompatible pointer type
> src/plot_fun.c:467: too many arguments to function 
> `gtk_plot_axis_set_ticks'
> src/plot_fun.c:469: warning: passing arg 1 of 
> `gtk_plot_axis_set_labels_style' from incompatible pointer type
> src/plot_fun.c:469: too many arguments to function 
> `gtk_plot_axis_set_labels_style'
> src/plot_fun.c:470: warning: passing arg 1 of 
> `gtk_plot_axis_set_labels_style' from incompatible pointer type
> src/plot_fun.c:470: too many arguments to function 
> `gtk_plot_axis_set_labels_style'
> src/plot_fun.c:471: warning: passing arg 1 of 
> `gtk_plot_axis_set_visible' from incompatible pointer type
> src/plot_fun.c:471: too many arguments to function 
> `gtk_plot_axis_set_visible'
> src/plot_fun.c:472: warning: passing arg 1 of 
> `gtk_plot_axis_set_visible' from incompatible pointer type
> src/plot_fun.c:472: too many arguments to function 
> `gtk_plot_axis_set_visible'
> src/plot_fun.c:476: warning: passing arg 1 of 
> `gtk_plot_axis_hide_title' from incompatible pointer type
> src/plot_fun.c:476: too many arguments to function 
> `gtk_plot_axis_hide_title'
> src/plot_fun.c:477: warning: passing arg 1 of 
> `gtk_plot_axis_hide_title' from incompatible pointer type
> src/plot_fun.c:477: too many arguments to function 
> `gtk_plot_axis_hide_title'
> src/plot_fun.c:478: warning: passing arg 1 of 
> `gtk_plot_axis_hide_title' from incompatible pointer type
> src/plot_fun.c:478: too many arguments to function 
> `gtk_plot_axis_hide_title'
> src/plot_fun.c:489: warning: passing arg 1 of 
> `gtk_plot_axis_set_labels_attributes' from incompatible pointer type
> src/plot_fun.c:489: warning: passing arg 3 of 
> `gtk_plot_axis_set_labels_attributes' makes integer from pointer 
> without a cast
> src/plot_fun.c:489: warning: passing arg 7 of 
> `gtk_plot_axis_set_labels_attributes' makes integer from pointer 
> without a cast
> src/plot_fun.c:489: too many arguments to function 
> `gtk_plot_axis_set_labels_attributes'
> src/plot_fun.c:499: warning: passing arg 1 of 
> `gtk_plot_axis_set_labels_attributes' from incompatible pointer type
> src/plot_fun.c:499: warning: passing arg 2 of 
> `gtk_plot_axis_set_labels_attributes' makes pointer from integer 
> without a cast
> src/plot_fun.c:499: warning: passing arg 3 of 
> `gtk_plot_axis_set_labels_attributes' makes integer from pointer 
> without a cast
> src/plot_fun.c:499: warning: passing arg 7 of 
> `gtk_plot_axis_set_labels_attributes' makes integer from pointer 
> without a cast
> src/plot_fun.c:499: too many arguments to function 
> `gtk_plot_axis_set_labels_attributes'
> src/plot_fun.c:511: warning: passing arg 1 of 
> `gtk_plot_axis_title_set_attributes' from incompatible pointer type
> src/plot_fun.c:511: warning: passing arg 3 of 
> `gtk_plot_axis_title_set_attributes' makes integer from pointer 
> without a cast
> src/plot_fun.c:511: warning: passing arg 5 of 
> `gtk_plot_axis_title_set_attributes' makes pointer from integer 
> without a cast
> src/plot_fun.c:511: warning: passing arg 7 of 
> `gtk_plot_axis_title_set_attributes' makes integer from pointer 
> without a cast
> src/plot_fun.c:511: too many arguments to function 
> `gtk_plot_axis_title_set_attributes'
> src/plot_fun.c:512: warning: passing arg 1 of 
> `gtk_plot_axis_set_title' from incompatible pointer type
> src/plot_fun.c:512: too many arguments to function 
> `gtk_plot_axis_set_title'
> src/plot_fun.c:513: warning: passing arg 1 of 
> `gtk_plot_axis_move_title' from incompatible pointer type
> src/plot_fun.c:513: too many arguments to function 
> `gtk_plot_axis_move_title'
> make: *** [src/plot_fun.o] Error 1*
> * *
> * Please suggest the solution to this problem.*
> * *
> *Regards,*
> *Prakash.*
>
> * *
>
> ------------------------------------------------------------------------
> *Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out! 
> <http://us.rd.yahoo.com/mail_us/taglines/new/*http://promotions.yahoo.com/new_mail> 
> *

-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
Prakash Bhurke | 28 Sep 2004 08:33
Picon
Favicon

Re: Gdk-WARNING **: gdkgc-win32.c:898: SaveDC failed: Not enough


Hi Adrian
 
    Thanks for reply.
 
>>>    Why don't you try with the new CVS version,
and let me know?
 
--> I got some compile time errors with new version gtkextra2 on windows XP.
But I succeseeded to build it by modifing Makefile.win32. I have attached Makefile.win32.
 
 I tried to build my application with new cvs version gtkextra, but I got compile time errors, ( since you have changed prototype of some  gtkextra APIs ).
     Please read my previous mail completely. I sent output of compile time errors in that mail.
 
Reagards,
Prakash

"Adrian E. Feiguin" <afeiguin <at> uci.edu> wrote:
Hi Prakash! This look like a problem with the font loading, maybe a
memory leak. However, I rewrote that piece of code completely, to use
Pango instead of gdk fonts. Why don't you try with the new CVS version,
and let me know?
Thanks!,


Prakash Bhurke wrote:

> Hi,
>
> Few months ago, I downloaded gtkexrta2 from sourceforge's CVS server.
> I was able to build/run it successfully on Windows XP.
> Now, i have developed an application (uses gtkextra for plotting
> graph) which runs more than hour.
> -------------------------------------------------------------------------------------------------------------------------------
> But after few mins , I got segmenation fault having following
> error mess ages.
> ----------------------------------------------------------------------------------------------------------------

Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
#
# Makefile for mingw environment (native win32 no cygwin dll
# dependencies). Requires mingw gcc release >= 2.95.2-1 and of
# course a version of make.
#
###########################################################################

#
# User variables, change for your local system
#

# comment out for no debugging 
DEBUGGING_ON = 1

# Put the path to where your gtk libraries are kept
GTK_PATH = c:/mingw

################## Try not to edit ############################
CC = gcc
CXX = g++

DEBUG = -g -Wall 
CXXFLAGS = 

ifdef DEBUGGING_ON
CFLAGS = $(DEBUG) -O2  -mwindows -mms-bitfields -mcpu=pentium
else
CFLAGS = -O2  -mwindows -fexpensive-optimizations  -ffast-math\
-mms-bitfields -mcpu=pentium
endif

CPPFLAGS = -I.

DLL_CFLAGS = -DHAVE_CONFIG_H -I ..
exeext = .exe

#
# Various targets to build.
#
DLL_NAME = libgtkextra-win32-2.0.dll
DLL_EXP_LIB = libgtkextra-win32-2.0.dll.a
DLL_EXP_DEF = gtkextra.def
LIBA=libgtkextra-win32-2.0.a

TESTAPPS = testgtksheet testgtkiconlist testgtkfilesel testgtkplot \
     testbubbles testgtkfont testrealtime testgtkplot3d \
     testcontour testpolar testflux testboxes testimage
TESTEXE = $(TESTAPPS:=.exe)
TESTOBJ = $(TESTAPPS:=.o)

#
# sources, objects, etc. 
#

SRCS = \
gtkbordercombo.c  gtkfontcombo.c    gtkplotcanvas.c    gtkplotprint.c \
gtkcharsel.c      gtkiconfilesel.c  gtkplotcsurface.c  gtkplotps.c \
gtkcheckitem.c    gtkiconlist.c     gtkplotdata.c      gtkplotsurface.c \
gtkcolorcombo.c   gtkitementry.c    gtkplotflux.c      gtkpsfont.c \
gtkcombobox.c     gtkplot.c         gtkplotgdk.c       gtksheet.c \
gtkdirtree.c      gtkplot3d.c       gtkplotpc.c        gtktogglecombo.c \
gtkextra.c        gtkextra-marshal.c gtkplotbar.c      gtkplotpixmap.c \
gtkfilelist.c     gtkplotbox.c      gtkplotpolar.c     gtkplotdt.c \
gtkplotcandle.c   gtkplotarray.c  gdk-pixbuf-hacks.c gtkplotcanvasplot.c \
gtkplotcanvastext.c  gtkextratypebuiltins.c  gtkplotbubble.c \
gtkplotcanvasellipse.c gtkplotcanvasline.c gtkplotcanvaspixmap.c \
gtkplotcanvasrectangle.c gtkplotdtriangle.c gtkplotsegment.c 

#gdk-pixbuf-rotate.c gtkplotcanvaspolygon.c

# $(wildcard *.cc *.c)
OBJS  = $(SRCS:.cc=.o)
OBJS := $(OBJS:.c=.o)

#
# DLL related variables. These are used when building the DLL. See later.
#
#

INC= -I . -I $(GTK_PATH)/include/glib-2.0\
     -I $(GTK_PATH)/include/glib-2.0/gmodule \
     -I $(GTK_PATH)/lib/glib-2.0/include \
     -I $(GTK_PATH)/lib/gtk-2.0/include \
     -I $(GTK_PATH)/include/gtk-2.0 \
     -I $(GTK_PATH)/include/pango-1.0 \
     -I $(GTK_PATH)/include/atk-1.0 \
     -I ..

LIB = -L . -L $(GTK_PATH)/lib/ \
     -L $(GTK_PATH)/lib/glib-2.0  \
     -L $(GTK_PATH)/lib/glib-2.0/gmodule

DLL_CFLAGS =
# The default entry point defined by dllwrap; the default user callback
# is DllMain
DLL_LDFLAGS = 
# any extra libraries that your DLL may depend on.

DLL_LDLIBS =  -L $(GTK_PATH)/lib \
     -lgtk-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lpango-1.0 -latk-1.0 \
	 -lglib-2.0 \
     -lgmodule-2.0 \
     -lgobject-2.0 \
     -lgthread-2.0 \
     -lm -luser32 -ladvapi32 -lwsock32

DLL_SRCS  =  $(SRCS)

DLL_OBJS  = $(DLL_SRCS:.cc=.o)
DLL_OBJS := $(DLL_OBJS:.c=.o)

all: config $(LIBA) $(DLL_NAME) tests

static:$(LIBA)

dll:$(DLL_NAME) 

config:
	copy ..\config.h.win32 ..\config.h

$(LIBA):$(DLL_OBJS)
	ar rc $ <at>  $^

#
# Build the dll using the shared switch
#
$(DLL_NAME):
	$(CC) --shared $(DLL_OBJS) $(DLL_LDFLAGS) $(DLL_LDLIBS) \
	 -o $ <at>  -Wl,--out-implib,$(DLL_EXP_LIB)
#
# Here we build the test executeables
#

tests:\
testboxes    testflux         testgtkplot    testpixmap \
testbubbles  testgtkfilesel   testgtkplot3d  testpolar \
testcharsel  testgtkfont      testgtksheet   testrealtime \
testcontour  testgtkiconlist  

testgtkfilesel: testgtkfilesel.o
	$(CC)  $(INC) $(LIB) testgtkfilesel.o -o $ <at>  -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0

testgtkplot: testgtkplot.o
	$(CC)  $(INC) $(LIB) testgtkplot.o -o $ <at>  -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 

testboxes: testboxes.o
	$(CC)  $(INC) $(LIB) testboxes.o -o $ <at>  -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 

testflux: testflux.o
	$(CC)  $(INC) $(LIB) testflux.o -o $ <at>  -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 

testbubbles: testbubbles.o
	$(CC)  $(INC) $(LIB) testbubbles.o -o $ <at>   -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 

testpolar: testpolar.o 
	$(CC)  $(INC) $(LIB) testpolar.o -o $ <at>   -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 

testcontour: testcontour.o 
	$(CC)  $(INC) $(LIB) testcontour.o -o $ <at>  -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 

testgtkplot3d: testgtkplot3d.o
	$(CC)  $(INC) $(LIB) testgtkplot3d.o -o $ <at>   -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 

testgtksheet: testgtksheet.o
	$(CC)  $(INC) $(LIB)  -o $ <at>  testgtksheet.o -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 

testgtkfont: testgtkfont.o
	$(CC)  $(INC) $(LIB) testgtkfont.o -o $ <at>  -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 

testrealtime: testrealtime.o
	$(CC)  $(INC) $(LIB) -o $ <at>  testrealtime.o -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 

testgtkiconlist: testgtkiconlist.o
	$(CC)  $(INC) $(LIB) -o $ <at>  testgtkiconlist.o -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 

testpixmap: testpixmap.o
	$(CC)  $(INC) $(LIB) -o $ <at>  testpixmap.o -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 

testcharsel: testcharsel.o
	$(CC)  $(INC) $(LIB) -o $ <at>  testcharsel.o -lm \
         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
#
# default rules for building DLL objects. Note that client programs (ie.,
# the ones that *use* the DLL) have to be compiled without the DLL_CFLAGS
# flags.
#

.cc.o:
	$(CXX) -c $(DLL_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) -o $ <at>  $<
.c.o:
	$(CC) -c $(DLL_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(INC) -o  $ <at>  $<

clean:
	-rm -f $(OBJS) $(DLL_NAME) $(DLL_EXP_LIB) $(LIBA) \
               $(TESTEXE) $(TESTOBJ)

Adrian E. Feiguin | 28 Sep 2004 19:51
Picon
Favicon

Re: Gdk-WARNING **: gdkgc-win32.c:898: SaveDC failed: Not enough

Hi Prakash,
 Your problem is with gtkplotaxis. GtkPlotAxis is now a GtkObject, so 
all the gtkplotaxis methods have a GtkPlotAxis as first argument. To 
modify an axis in a plot, you should do something like:

GtkPlotAxis *my_axis;

my_axis = gtk_plot_get_axis(plot, GTK_PLOT_AXIS_LEFT);
gtk_plot_axis_set_visible(my_axis, FALSE);
...

The API will freeze after the release, so don't worry about any changes 
hereafter.
Keep me posted, and thank you for the Makefile.
saludos,
<ADRIAN>

Prakash Bhurke wrote:

>
> Hi Adrian
>  
>     Thanks for reply.
>  
> >>>    Why don't you try with the new CVS version,
> and let me know?
>  
> --> I got some compile time errors with new version gtkextra2 on 
> windows XP.
> But I succeseeded to build it by modifing Makefile.win32. I have 
> attached Makefile.win32.
>  
>  I tried to build my application with new cvs version gtkextra, but I 
> got compile time errors, ( since you have changed prototype of some  
> gtkextra APIs ).
>      Please read my previous mail completely. I sent output of compile 
> time errors in that mail.
>  
> Reagards,
> Prakash
>
> */"Adrian E. Feiguin" <afeiguin <at> uci.edu>/* wrote:
>
>     Hi Prakash! This look like a problem with the font loading, maybe a
>     memory leak. However, I rewrote that piece of code completely, to use
>     Pango instead of gdk fonts. Why don't you try with the new CVS
>     version,
>     and let me know?
>     Thanks!,
>
>
>     Prakash Bhurke wrote:
>
>     > Hi,
>     >
>     > Few months ago, I downloaded gtkexrta2 from sourceforge's CVS
>     server.
>     > I was able to build/run it successfully on Windows XP.
>     > Now, i have developed an application (uses gtkextra for plotting
>     > graph) which runs more than hour.
>     >
>     -------------------------------------------------------------------------------------------------------------------------------
>     > But after few mins , I got segmenation fault having following
>     > error messages.
>     >
>     ----------------------------------------------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> vote.yahoo.com <http://vote.yahoo.com> - Register online to vote today!
>
>------------------------------------------------------------------------
>
>#
># Makefile for mingw environment (native win32 no cygwin dll
># dependencies). Requires mingw gcc release >= 2.95.2-1 and of
># course a version of make.
>#
>###########################################################################
>
>#
># User variables, change for your local system
>#
>
># comment out for no debugging 
>DEBUGGING_ON = 1
>
># Put the path to where your gtk libraries are kept
>GTK_PATH = c:/mingw
>
>################## Try not to edit ############################
>CC = gcc
>CXX = g++
>
>DEBUG = -g -Wall 
>CXXFLAGS = 
>
>ifdef DEBUGGING_ON
>CFLAGS = $(DEBUG) -O2  -mwindows -mms-bitfields -mcpu=pentium
>else
>CFLAGS = -O2  -mwindows -fexpensive-optimizations  -ffast-math\
>-mms-bitfields -mcpu=pentium
>endif
>
>CPPFLAGS = -I.
>
>DLL_CFLAGS = -DHAVE_CONFIG_H -I ..
>exeext = .exe
>
>#
># Various targets to build.
>#
>DLL_NAME = libgtkextra-win32-2.0.dll
>DLL_EXP_LIB = libgtkextra-win32-2.0.dll.a
>DLL_EXP_DEF = gtkextra.def
>LIBA=libgtkextra-win32-2.0.a
>
>TESTAPPS = testgtksheet testgtkiconlist testgtkfilesel testgtkplot \
>     testbubbles testgtkfont testrealtime testgtkplot3d \
>     testcontour testpolar testflux testboxes testimage
>TESTEXE = $(TESTAPPS:=.exe)
>TESTOBJ = $(TESTAPPS:=.o)
>
>
>
>#
># sources, objects, etc. 
>#
>
>SRCS = \
>gtkbordercombo.c  gtkfontcombo.c    gtkplotcanvas.c    gtkplotprint.c \
>gtkcharsel.c      gtkiconfilesel.c  gtkplotcsurface.c  gtkplotps.c \
>gtkcheckitem.c    gtkiconlist.c     gtkplotdata.c      gtkplotsurface.c \
>gtkcolorcombo.c   gtkitementry.c    gtkplotflux.c      gtkpsfont.c \
>gtkcombobox.c     gtkplot.c         gtkplotgdk.c       gtksheet.c \
>gtkdirtree.c      gtkplot3d.c       gtkplotpc.c        gtktogglecombo.c \
>gtkextra.c        gtkextra-marshal.c gtkplotbar.c      gtkplotpixmap.c \
>gtkfilelist.c     gtkplotbox.c      gtkplotpolar.c     gtkplotdt.c \
>gtkplotcandle.c   gtkplotarray.c  gdk-pixbuf-hacks.c gtkplotcanvasplot.c \
>gtkplotcanvastext.c  gtkextratypebuiltins.c  gtkplotbubble.c \
>gtkplotcanvasellipse.c gtkplotcanvasline.c gtkplotcanvaspixmap.c \
>gtkplotcanvasrectangle.c gtkplotdtriangle.c gtkplotsegment.c 
>
>#gdk-pixbuf-rotate.c gtkplotcanvaspolygon.c
>
># $(wildcard *.cc *.c)
>OBJS  = $(SRCS:.cc=.o)
>OBJS := $(OBJS:.c=.o)
>
>#
># DLL related variables. These are used when building the DLL. See later.
>#
>#
>
>INC= -I . -I $(GTK_PATH)/include/glib-2.0\
>     -I $(GTK_PATH)/include/glib-2.0/gmodule \
>     -I $(GTK_PATH)/lib/glib-2.0/include \
>     -I $(GTK_PATH)/lib/gtk-2.0/include \
>     -I $(GTK_PATH)/include/gtk-2.0 \
>     -I $(GTK_PATH)/include/pango-1.0 \
>     -I $(GTK_PATH)/include/atk-1.0 \
>     -I ..
>
>LIB = -L . -L $(GTK_PATH)/lib/ \
>     -L $(GTK_PATH)/lib/glib-2.0  \
>     -L $(GTK_PATH)/lib/glib-2.0/gmodule
>
>DLL_CFLAGS =
># The default entry point defined by dllwrap; the default user callback
># is DllMain
>DLL_LDFLAGS = 
># any extra libraries that your DLL may depend on.
>
>DLL_LDLIBS =  -L $(GTK_PATH)/lib \
>     -lgtk-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lpango-1.0 -latk-1.0 \
>	 -lglib-2.0 \
>     -lgmodule-2.0 \
>     -lgobject-2.0 \
>     -lgthread-2.0 \
>     -lm -luser32 -ladvapi32 -lwsock32
>
>DLL_SRCS  =  $(SRCS)
> 
>DLL_OBJS  = $(DLL_SRCS:.cc=.o)
>DLL_OBJS := $(DLL_OBJS:.c=.o)
>
>all: config $(LIBA) $(DLL_NAME) tests
>
>static:$(LIBA)
>
>dll:$(DLL_NAME) 
>
>config:
>	copy ..\config.h.win32 ..\config.h
>
>$(LIBA):$(DLL_OBJS)
>	ar rc $ <at>  $^
>
>#
># Build the dll using the shared switch
>#
>$(DLL_NAME):
>	$(CC) --shared $(DLL_OBJS) $(DLL_LDFLAGS) $(DLL_LDLIBS) \
>	 -o $ <at>  -Wl,--out-implib,$(DLL_EXP_LIB)
>#
># Here we build the test executeables
>#
>
>tests:\
>testboxes    testflux         testgtkplot    testpixmap \
>testbubbles  testgtkfilesel   testgtkplot3d  testpolar \
>testcharsel  testgtkfont      testgtksheet   testrealtime \
>testcontour  testgtkiconlist  
>
>
>testgtkfilesel: testgtkfilesel.o
>	$(CC)  $(INC) $(LIB) testgtkfilesel.o -o $ <at>  -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0
>
>testgtkplot: testgtkplot.o
>	$(CC)  $(INC) $(LIB) testgtkplot.o -o $ <at>  -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>
>testboxes: testboxes.o
>	$(CC)  $(INC) $(LIB) testboxes.o -o $ <at>  -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>
>testflux: testflux.o
>	$(CC)  $(INC) $(LIB) testflux.o -o $ <at>  -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>
>testbubbles: testbubbles.o
>	$(CC)  $(INC) $(LIB) testbubbles.o -o $ <at>   -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>
>testpolar: testpolar.o 
>	$(CC)  $(INC) $(LIB) testpolar.o -o $ <at>   -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>
>testcontour: testcontour.o 
>	$(CC)  $(INC) $(LIB) testcontour.o -o $ <at>  -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>
>testgtkplot3d: testgtkplot3d.o
>	$(CC)  $(INC) $(LIB) testgtkplot3d.o -o $ <at>   -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>
>testgtksheet: testgtksheet.o
>	$(CC)  $(INC) $(LIB)  -o $ <at>  testgtksheet.o -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>
>testgtkfont: testgtkfont.o
>	$(CC)  $(INC) $(LIB) testgtkfont.o -o $ <at>  -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>
>
>testrealtime: testrealtime.o
>	$(CC)  $(INC) $(LIB) -o $ <at>  testrealtime.o -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>
>testgtkiconlist: testgtkiconlist.o
>	$(CC)  $(INC) $(LIB) -o $ <at>  testgtkiconlist.o -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>
>testpixmap: testpixmap.o
>	$(CC)  $(INC) $(LIB) -o $ <at>  testpixmap.o -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>
>testcharsel: testcharsel.o
>	$(CC)  $(INC) $(LIB) -o $ <at>  testcharsel.o -lm \
>         -lgtkextra-win32-2.0 -lgdk-win32-2.0 -lgdk_pixbuf-2.0 -lgtk-win32-2.0 -lgmodule-2.0
-lgobject-2.0 -lgthread-2.0 \
>         -lglib-2.0  -luser32 -ladvapi32 -lwsock32 -lpango-1.0 -latk-1.0 
>#
># default rules for building DLL objects. Note that client programs (ie.,
># the ones that *use* the DLL) have to be compiled without the DLL_CFLAGS
># flags.
>#
>
>.cc.o:
>	$(CXX) -c $(DLL_CFLAGS) $(CPPFLAGS) $(CXXFLAGS) -o $ <at>  $<
>.c.o:
>	$(CC) -c $(DLL_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(INC) -o  $ <at>  $<
>
>
>clean:
>	-rm -f $(OBJS) $(DLL_NAME) $(DLL_EXP_LIB) $(LIBA) \
>               $(TESTEXE) $(TESTOBJ)
>
>  
>

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
Prakash Bhurke | 29 Sep 2004 19:07
Picon
Favicon

Memory leak in testrealtime

Hi Adrian,
 
  I have made changes as per instructions in my
application.
  I got one link error ..undefined refrence to 
 gtk_plot_canvas_add_plot(GTK_PLOT_CANVAS(canvas), gtk_plot_canvas_plot_new(GTK_PLOT(active_plot1)),
0.15, 0.01);
 
I changed above line as follows :
 gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), \
 gtk_plot_canvas_plot_new(GTK_PLOT(active_plot1)),
0.15, 0.01, 0.15+.65, 0.01+.45);

Is  this correct?
 
After that change , I built my application
successfully. But during runtime, I got following
errors. Also it doesn't show plot on screen.
(Please read complete mail. Sorry for sending too
large mail :) ).
----------------------------------------------------
Console errors of my applcation :
(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 644 (gdk_draw_drawable
): assertion `src != NULL' failed

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:300: CreateDIBSection fail
ed: The parameter is incorrect.

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:111: DeleteObject failed:
The parameter is incorrect.

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 643 (gdk_draw_drawable
): assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed
-----------------------------------------------------

Also i tried testrealtime.exe. For first few mins it
works fine, but after  25 mins it crashed.
From WindowsXP task manager I found following status
of testrealtime.exe.:
After 1 min memory status of testrealtime.exe was :
Memory usage = 11,900k
Peak Mem usage = 14,000k
VM Size = 12,764k

After 25 mins (i.e. after crash) memory status of
testrealtime.exe was :
Memory usage = 7,756k
Peak Mem usage = 89,260k
VM Size = 87,996k
----------------------------------------------------
Also, on console I got following errors for
testrealtime.exe :
(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 644 (gdk_draw_drawable
): assertion `src != NULL' failed

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:300: CreateDIBSection fail
ed: The parameter is incorrect.

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:111: DeleteObject failed:
The parameter is incorrect.

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 643 (gdk_draw_drawable
): assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 644 (gdk_draw_drawable
): assertion `src != NULL' failed

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:300: CreateDIBSection fail
ed: The parameter is incorrect.

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:111: DeleteObject failed:
The parameter is incorrect.

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 643 (gdk_draw_drawable
): assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 644 (gdk_draw_drawable
): assertion `src != NULL' failed

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:300: CreateDIBSection fail
ed: The parameter is incorrect.

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:111: DeleteObject failed:
The parameter is incorrect.

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 643 (gdk_draw_drawable
): assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 644 (gdk_draw_drawable
): assertion `src != NULL' failed

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:300: CreateDIBSection fail
ed: The parameter is incorrect.

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:111: DeleteObject failed:
The parameter is incorrect.

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 643 (gdk_draw_drawable
): assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 644 (gdk_draw_drawable
): assertion `src != NULL' failed

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:300: CreateDIBSection fail
ed: The parameter is incorrect.

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:111: DeleteObject failed:
The parameter is incorrect.

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 643 (gdk_draw_drawable
): assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
line 526 (gdk_draw_layout)
: assertion `GDK_IS_DRAWABLE (drawable)' failed

(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
line 644 (gdk_draw_drawable
): assertion `src != NULL' failed

(ios/ios.exe:1436): Gdk-WARNING **:
gdkpixmap-win32.c:300: CreateDIBSection fail
ed: The parameter is incorrect.

-------------------------------------------------

I don't know how to use pango font, I will read
documents related pango font & I will try it.

Thanks,

Regards,
Prakash.

		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
Adrian E. Feiguin | 29 Sep 2004 20:26
Picon
Favicon

Re: Memory leak in testrealtime

Hi!
What you are doing is correct. I guss you forgot to show the widget with

gtk_widget_show(GTK_WIDGET(active_plot1));

This is not a problem with pango. All the font management API in 
gtkextra is the same, you shouldn't worry about that, since pango is in 
an inner layer invisible to the user.

Once you are able to dispplay the plots, tell me more about that memory 
leak, I can anticipate it is in gtkplotps, in the text drawing routine. 
If you can help me to pinpoint it, I will really appreciate it. Thanks a 
lot!

Keep me updated.
Saludos,
<ADRIAN>

Prakash Bhurke wrote:

>Hi Adrian,
> 
>  I have made changes as per instructions in my
>application.
>  I got one link error ..undefined refrence to 
> gtk_plot_canvas_add_plot(GTK_PLOT_CANVAS(canvas), gtk_plot_canvas_plot_new(GTK_PLOT(active_plot1)),
>0.15, 0.01);
> 
>I changed above line as follows :
> gtk_plot_canvas_put_child(GTK_PLOT_CANVAS(canvas), \
> gtk_plot_canvas_plot_new(GTK_PLOT(active_plot1)),
>0.15, 0.01, 0.15+.65, 0.01+.45);
>
>Is  this correct?
> 
>After that change , I built my application
>successfully. But during runtime, I got following
>errors. Also it doesn't show plot on screen.
>(Please read complete mail. Sorry for sending too
>large mail :) ).
>----------------------------------------------------
>Console errors of my applcation :
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 644 (gdk_draw_drawable
>): assertion `src != NULL' failed
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:300: CreateDIBSection fail
>ed: The parameter is incorrect.
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:111: DeleteObject failed:
>The parameter is incorrect.
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 643 (gdk_draw_drawable
>): assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>-----------------------------------------------------
>
>Also i tried testrealtime.exe. For first few mins it
>works fine, but after  25 mins it crashed.
>>From WindowsXP task manager I found following status
>of testrealtime.exe.:
>After 1 min memory status of testrealtime.exe was :
>Memory usage = 11,900k
>Peak Mem usage = 14,000k
>VM Size = 12,764k
>
>After 25 mins (i.e. after crash) memory status of
>testrealtime.exe was :
>Memory usage = 7,756k
>Peak Mem usage = 89,260k
>VM Size = 87,996k
>----------------------------------------------------
>Also, on console I got following errors for
>testrealtime.exe :
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 644 (gdk_draw_drawable
>): assertion `src != NULL' failed
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:300: CreateDIBSection fail
>ed: The parameter is incorrect.
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:111: DeleteObject failed:
>The parameter is incorrect.
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 643 (gdk_draw_drawable
>): assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 644 (gdk_draw_drawable
>): assertion `src != NULL' failed
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:300: CreateDIBSection fail
>ed: The parameter is incorrect.
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:111: DeleteObject failed:
>The parameter is incorrect.
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 643 (gdk_draw_drawable
>): assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 644 (gdk_draw_drawable
>): assertion `src != NULL' failed
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:300: CreateDIBSection fail
>ed: The parameter is incorrect.
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:111: DeleteObject failed:
>The parameter is incorrect.
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 643 (gdk_draw_drawable
>): assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 644 (gdk_draw_drawable
>): assertion `src != NULL' failed
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:300: CreateDIBSection fail
>ed: The parameter is incorrect.
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:111: DeleteObject failed:
>The parameter is incorrect.
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 643 (gdk_draw_drawable
>): assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 644 (gdk_draw_drawable
>): assertion `src != NULL' failed
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:300: CreateDIBSection fail
>ed: The parameter is incorrect.
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:111: DeleteObject failed:
>The parameter is incorrect.
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 643 (gdk_draw_drawable
>): assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkpango.c:
>line 526 (gdk_draw_layout)
>: assertion `GDK_IS_DRAWABLE (drawable)' failed
>
>(ios/ios.exe:1436): Gdk-CRITICAL **: file gdkdraw.c:
>line 644 (gdk_draw_drawable
>): assertion `src != NULL' failed
>
>(ios/ios.exe:1436): Gdk-WARNING **:
>gdkpixmap-win32.c:300: CreateDIBSection fail
>ed: The parameter is incorrect.
>
>-------------------------------------------------
>
>I don't know how to use pango font, I will read
>documents related pango font & I will try it.
>
>Thanks,
>
>Regards,
>Prakash.
>
>
>
>		
>__________________________________
>Do you Yahoo!?
>Yahoo! Mail is new and improved - Check it out!
>http://promotions.yahoo.com/new_mail
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
>Use IT products in your business? Tell us what you think of them. Give us
>Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
>http://productguide.itmanagersjournal.com/guidepromo.tmpl
>_______________________________________________
>Scigraphica-gtkextra mailing list
>Scigraphica-gtkextra <at> lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/scigraphica-gtkextra
>
>.
>
>  
>

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

Gmane