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

"Adrian E. Feiguin" <[email protected]> Mon, 27 Sep 2004 11:35:38 -0700
Newsgroups gmane.comp.scigraphica.gtkextra
Message-ID <[email protected]>
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