Re: gtk_file_chooser page faults (win32)



On Sat, Aug 14, 2004 at 11:54:43AM +0600, Amin wrote:
David wrote:

Did the original source I provided crash?  If so, which OS are
you running?  (I'm running Win98 - wondering if that has
something to do with it).

The original didn't crash either. However, it did output this:

(gtktest3:1888): Gtk-CRITICAL **: file gtkfilesystemwin32.c: line
578 (gtk_file_
system_win32_get_parent): assertion `g_path_is_absolute
(filename)' failed

When I commented out the line

gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog),"");

it didn't output any warnings at all. Either way, it didn't crash.

Yes, when I got the program that far, I got that error, too.  That's a
line I added to see if it would help.

I'm using Windows XP Pro, and my %HOME% variable is not set.

Someone in the bugtrack sent me a message.  In it, he stated that this
HOME issue is a problem in Win98 and Win 95.  I'm not very knowledgable
in the workings of Windows, but from what he said, later versions of
Windows takes care of this.  If you'd like to check what he said, it is
a comment in this 

http://bugzilla.gnome.org/show_bug.cgi?id=150007

What libraries do you use?  My libraries come from links on
Tor's page, and I compile under msys/mingw with gcc.

I'm using the precompiled libraries from Tor's page.

Same here.

If my original crashed on your system, and you are using the
same libraries I do, then it would appear that this problem
might be in the way the program is compiled/linked, because it
appears that your successful program is identical to mine
except for the entry point name. It appears that you don't use
any of the parameters passed to WinMain within the program.

Some explanation is in order here. I embellished the original to
make it run as a GUI-only program (no console) because I thought 
you were targeting Windows.

Actually, for what I'm trying to do, I want to target all systems,
especially Linux and Windows.

As for WinMain, I think command-line 
argument handling using the traditional Windows API is a little 
different. IIRC they have a parseCmdLine function which takes the 
entire command line as a single string and extracts the options 
and arguments from it. As for GTK+, it requires the args in the 
form int*, char***, so I had to use the ones defined by stdlib.h.

hInstance and hPrevInstance are handles to the current instance
and the previous instance of the program (that are running at the
same time), and are also used in the Win32 API.

nCmdShow is basically a boolean -- should we show the window now
or not? Again, something that fits inside the Windows API. I think
GTK+ probably has other ways of dealing with this same issue.

Yes, I have the documentation on the Windows API.  I just meant that you
didn't use the parameters in the program and that this wouldn't have
been a factor in making it work.

Again, from what I've been able to gather, the later versions of Windows
provide some facility to handle the %HOME% issue, but the older systems
like mine don't.

Tor has stated that this is an issue that needs to be dealt with and
that he intends to take care of it.  The one I mentioned above stated
that the goal of the gtk-win32 project is to support Windows back to 95,
which I think is a good idea.  I believe that there still is a large
number of Windows 98 machines still out there.



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