Re: gtk_file_chooser page faults (win32)



On Thu, Aug 12, 2004 at 05:50:18AM +0000, Tor Lillqvist wrote:
David writes:
 > This crash could be caused by something I'm doing, and not by
 > gtk_file_chooser,  but it doesn't show up under msys [or Linux].  I wonder
 > if anyone else has encountered anything like this?

It is, of course, quite possible and even probable that there are bugs
in the Win32 implementation of GtkFileChooser et al. It definitely
seems to be broken at least on systems with multi-byte code pages, see
Bugzilla bug #141124. But that bug has been reported only on
Chinese/Japanese/Korean machines. You aren't using such a system, are
you?

No, it's an English/US setup.  I am using Win98, if that would make a
difference.

I don't understand what you mean when you say that the crash occurs
only when "executing the program in DOS window", but not "under
msys".

When go to a window created by "MS-Dos Prompt" and run it from the
command line, it crashes.  If I run it from the command line in the msys
window, it executes seemingly correctly.

It shouldn't make any difference at all to GTK whether the
program has been started from a console window's command prompt
(cmd.exe), or MSYS's shell in a rxvt window (doesn't MSYS use a port
of rxvt?), or the Windows Explorer.

I do believe it is rxvt.  It does seem odd that it's working this way.
I get 4 lines of error messages (I'll go into windows and get the exact
filenames and line #'s when I get the chance) - but surely at least
_someone_ else should be getting the same errors.  These messages all
appear to be caused by the fact that pointers to strings - filename and
pathnames - are supposed to be passed but a NULL pointer is getting
passed instead.

Please open a bug report on Bugzilla and attach a minimal but complete
sample program that exhibits the bug.

Please excuse my ignorance, but where is this bugzilla.  I scanned your
webpage looking for a bug list but didn't find one.

I'll include a rudimentary program I wrote to test this problem.

------------------ cut --------------------------
#include <gtk/gtk.h>

int main(int argc, char * argv[])
{
    GtkWidget *window;
    GtkWidget *dialog;
    
    gtk_init(&argc, &argv);

    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    g_signal_connect(G_OBJECT(window), "destroy",
                     G_CALLBACK(gtk_main_quit), NULL);

    dialog = gtk_file_chooser_dialog_new("File Chooser dialog",
                                         GTK_WINDOW(window),
                                         GTK_FILE_CHOOSER_ACTION_OPEN,
                                         GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                                         GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
                                         NULL);
    /* This line added to see if it would help - it didn't */
    gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog),"");
    gtk_dialog_run(GTK_DIALOG(dialog));
    gtk_widget_destroy(dialog);
                                         
}

------------------ cut --------------------------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]