Random crashes when printing on OS X

2010-02-04 Thread Shawn Bakhtiar



I am using the GtkPrint* functions to print. However at what seems to be random 
occurrences the application crashes with the following error:

Gdk:ERROR:gdkeventloop-quartz.c:559:select_thread_collect_poll: assertion 
failed: (ufds[i].fd == current_pollfds[i].fd)

Abort trap
 


When the user clicks on the print button a signal is generated and the 
application comand function executes based on the following case statement:


...

case ISI_PERM_MENU_COMPONENT_FORMULA_PRINT:

if( isi_app_check_permission(prev_self, 
ISI_PERM_MENU_COMPONENT_FORMULA_PRINT) && prev_self->component != NULL){

isi_display_page_setup( prev_self->display, 
prev_self->component,FALSE);
isi_display_print(prev_self->display);

} else {

isi_user_message(NULL,"Not Allowed","You do not have 
permission to print formulas.",0);
}

break;

...


void isi_display_print(IsiDisplay *self){

   
GtkPrintOperation *print = NULL;
GtkPrintSettings *printer_settings = NULL;
GtkPageSetup *page_setup = NULL;
GtkPaperSize *paper_size = NULL;
guint ctype;

/* Sanity Check */
g_return_if_fail(self != NULL);
g_return_if_fail(ISI_IS_DISPLAY(self) != FALSE);
g_return_if_fail(self->priv != NULL);
g_return_if_fail(self->priv->dispose_has_run != TRUE);

/* Create a new print operation */
print = gtk_print_operation_new();

/* Create new page setup and paper size */
page_setup = gtk_page_setup_new();
paper_size = gtk_paper_size_new(GTK_PAPER_NAME_LETTER);
gtk_page_setup_set_paper_size(page_setup,paper_size);

/* Set the default to the new page setup */
gtk_print_operation_set_default_page_setup(print,page_setup);


/* Make sure we always do full page printing*/
gtk_print_operation_set_unit(print,GTK_UNIT_INCH);
gtk_print_operation_set_use_full_page(print,TRUE);
gtk_print_operation_set_n_pages (print, self->priv->page_count);

g_signal_connect(print, "draw-page", 
G_CALLBACK(isi_display_print_event),(gpointer)self);



/* SOMEWHERE IN THIS FUNCTION THE DIALOG BLOWS UP!! */

gtk_print_operation_run(print,GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,NULL,NULL);


return;}


Any help would be greatly appreciated.

The problem is pervasive will most printer types, but is exacerbated with the 
HP CP3525 Color Laserjet printer. 
Shawn






 EMAILING FOR THE GREATER GOOD
Join me   ___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


RE: Random crashes when printing on OS X

2010-02-04 Thread Shawn Bakhtiar



I am now also getting this when I print, after having added a cairo_clip() to 
bound my drawings into a (0,0),(1,1) region. But I do not get it when I am 
displaying to screen, only printing, and I use the same function for both, one 
simply gets the cairo_t from the drawing area, the other retrieves it from the 
printer.

Any ideas?

Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFont: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFontSize: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetTextMatrix: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextClearRect: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetRGBFillColor: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextShowGlyphsAtPoint: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFont: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFontSize: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetTextMatrix: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextClearRect: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetRGBFillColor: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextShowGlyphsAtPoint: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFont: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFontSize: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetTextMatrix: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextClearRect: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetRGBFillColor: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextShowGlyphsAtPoint: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFont: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFontSize: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetTextMatrix: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextClearRect: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetRGBFillColor: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextShowGlyphsAtPoint: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFont: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFontSize: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetTextMatrix: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextClearRect: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetRGBFillColor: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextShowGlyphsAtPoint: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFont: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFontSize: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetTextMatrix: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextClearRect: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetRGBFillColor: invalid context 0x0
Thu Feb  4 17:04:16 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextShowGlyphsAtPoint: invalid context 0x0
Thu Feb  4 17:04:18 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFont: invalid context 0x0
Thu Feb  4 17:04:18 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetFontSize: invalid context 0x0
Thu Feb  4 17:04:18 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetTextMatrix: invalid context 0x0
Thu Feb  4 17:04:18 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextClearRect: invalid context 0x0
Thu Feb  4 17:04:18 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextSetRGBFillColor: invalid context 0x0
Thu Feb  4 17:04:18 Shawn-Bakhtiars-iMac.local orderdesk[39199] : 
CGContextShowGlyphsAtPoint: invalid context 0x0
Thu Feb  4 17:04:18 Shawn-Bakhtiars-iMa

Re: State of GTK3 (especially the theme api)

2010-02-04 Thread Javier Jardón
2010/2/1 Clemens Eisserer :
> Hi,

Hello Clemens

> Does anybody know whats the state of GTK3? Whats the estimated release date?
> I am especially interested in what the theme api looks like?

A gtk-2-90 branch already exist in gnome git [1].
The work was started to remove all deprecated code, patches welcomed
to help in this or other tasks, take a look here: [2]

> All wiki pages I found were quite outdate :-(

Did you see [3] ?

> I ask because about 2 years ago I proposed changes to GTK's theme api
> (bug 515600) allowing non-gtk applications (like FireFox and Java) to
> efficiently use it, and was told I should wait for GTK-3. That was 2
> years ago and it still doesn't look like GTK3 is arround the corner.
> The changes were completly backward-compatible.

I think you may be interested in project monet [4]

> Thank you in advance, Clemens

Best Regards,

[1] http://git.gnome.org/browse/gtk+?h=gtk-2-90
[2] http://live.gnome.org/GTK%2B/3.0/Tasks
[3] http://live.gnome.org/GTK+/3.0/
[4] http://live.gnome.org/GnomeArt/Monet

-- 
Javier Jardón Cabezas
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list