Re: which gtk-win32 version to use?
Thanks everybody for the answers. So far, I've only found that one call to pango_layout_get_pixel_size() in my app was followed by a segfault although the layout is valid, so this remains quite confusing (at least for me.) Now I have one more question: In the linux version, I use g_timeout_add_full() but in the win32 version, I have to use windows high resolution multimedia timers because the callback function has to be called every 5 ms (more exactly between 1 and 25 ms) and this doesn't work with g_timeout_add_full() under windows. Here is the code for this: ... GtkWidget *drawing_area gintdrawing_area_width, drawing_area_height; GdkDrawable *pixmap; ... static gint callback_function1(...) { ... gdk_draw_drawable( GDK_DRAWABLE(drawing_area-window), gc, pixmap, x, 0, 0, 0, drawing_area_width, drawing_area_height); ... return TRUE; } #ifdef G_OS_WIN32 static void CALLBACK callback_function2(...) { ... callback_function1(...); return: } #endif ... delay = 5; ... #ifndef G_OS_WIN32 g_timeout_add_full(G_PRIORITY_HIGH, delay, callback_function1, NULL, NULL); #else /* getting highest resolution */ mmr = timeGetDevCaps(tc, sizeof(TIMECAPS)); win32_mmtimer_highest_res = tc.wPeriodMin; /* setting highest resolution and some compatible delay */ timeBeginPeriod(win32_mmtimer_highest_res); delay = MAX((unsigned)delay, win32_mmtimer_highest_res); /* creating timer */ timer_id = timeSetEvent((unsigned int)delay, win32_mmtimer_highest_res, callback_function2, dwUser, TIME_PERIODIC); if (timer_id == 0) { error_message(Win32 mmtimer creation failed); exit(); } #endif ... Although I don't see why, could this be a reason for the segfault? (Again I'm trying to make sure that nothing else is involved.) Thanks. Manu On 09/30/2010 03:12 PM, Gabriele Greco wrote: On Tue, Sep 28, 2010 at 2:50 PM, Manu manutm...@gmail.com mailto:manutm...@gmail.com wrote: Thanks. I have just installed gdb for mingw. Another thing that helps to catch problems that you cannot reproduce easily is Dr.Mingw, you can find it in the mingw-utils package. It's a crash handler to be installed on the windows machine. If you compile your source code with -gstabs debug symbols is able to show you the stack trace of your program when it crashes. -- Bye, Gabry ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: which gtk-win32 version to use?
On Tue, Sep 28, 2010 at 2:50 PM, Manu manutm...@gmail.com wrote: Thanks. I have just installed gdb for mingw. Another thing that helps to catch problems that you cannot reproduce easily is Dr.Mingw, you can find it in the mingw-utils package. It's a crash handler to be installed on the windows machine. If you compile your source code with -gstabs debug symbols is able to show you the stack trace of your program when it crashes. -- Bye, Gabry ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: which gtk-win32 version to use?
Thanks for the quick answer. Actually, I got a ms visual c++ runtime error quite often saying: this app has requested the runtime to terminate it in an unusual way. Unfortunately, I don't know more about what was unusual... Manu TM On 09/28/2010 03:19 AM, Allin Cottrell wrote: On Tue, 28 Sep 2010, Manu wrote: I'm building an app for linux and windows. I use gtk-win32 with mingw for the windows version. The linux version is very stable but the windows version sometimes randomly crashes. My question is: which gtk-win32 version is best to use? On the gtk website, it's said that gtk+ 2.16 is older but more reliable than gtk+2.20. I can confirm that point. As GTK+ 3 emerges and matures things may change, but for now I'd still recommend 2.16 for production use on win32. (Of course, bugs in my port of the app are most likely the reason for these crashes but I'm trying to make sure that nothing else is involved.) Yep. In checking the performance of my own GTK app, I have almost invariably found that a problem of the form doing X works fine on Linux but (sometimes) crashes on Windows means there's a bug in my own code. A GTK-on-Windows problem is much more likely to manifest itself as some part of the GUI not working correctly, rather than an outright crash. Allin Cottrell ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: which gtk-win32 version to use?
Thanks. I have just installed gdb for mingw. Manu TM On 9/28/2010 1:41 PM, Tor Lillqvist wrote: this app has requested the runtime to terminate it in an unusual way. That is just the message you get when abort() is called. Not really any more or less informative than the single-word message Aborted that Unix shells typically print... To find out what is happening you need to use a debugger. --tml ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
which gtk-win32 version to use?
Hi everybody, I'm building an app for linux and windows. I use gtk-win32 with mingw for the windows version. The linux version is very stable but the windows version sometimes randomly crashes. My question is: which gtk-win32 version is best to use? On the gtk website, it's said that gtk+ 2.16 is older but more reliable than gtk+2.20. (Of course, bugs in my port of the app are most likely the reason for these crashes but I'm trying to make sure that nothing else is involved.) Thanks for any hint. Manu TM ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: which gtk-win32 version to use?
On Tue, 28 Sep 2010, Manu wrote: I'm building an app for linux and windows. I use gtk-win32 with mingw for the windows version. The linux version is very stable but the windows version sometimes randomly crashes. My question is: which gtk-win32 version is best to use? On the gtk website, it's said that gtk+ 2.16 is older but more reliable than gtk+2.20. I can confirm that point. As GTK+ 3 emerges and matures things may change, but for now I'd still recommend 2.16 for production use on win32. (Of course, bugs in my port of the app are most likely the reason for these crashes but I'm trying to make sure that nothing else is involved.) Yep. In checking the performance of my own GTK app, I have almost invariably found that a problem of the form doing X works fine on Linux but (sometimes) crashes on Windows means there's a bug in my own code. A GTK-on-Windows problem is much more likely to manifest itself as some part of the GUI not working correctly, rather than an outright crash. Allin Cottrell ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list