Re: wired problem with Gtk::FileChooserDialog
- From: VLG <3rdshift comcast net>
- To: oedipus <alexander arnoldt gmx de>
- Cc: gtkmm-list gnome org
- Subject: Re: wired problem with Gtk::FileChooserDialog
- Date: Mon, 04 Dec 2006 22:23:42 -0500
Alexander,
if nothing else works, try running your program with valgrind - you are
clearly
experiencing *out of bound write* error.
If that doesn't work. surround your FileChooserDialog var with 4K
buffers
before and after the var declaration. Fill the buffer with say 'a's and
'b's
and then examine the content after the crash.
-Vlad
On Mon, 2006-12-04 at 02:06 -0800, oedipus wrote:
> Hi,
>
> I am using in my application the Gtk::FileChooserDialog. So far I had no
> problems. But when I made some changes to another part in my program I
> suddenly recived segmentation faults. And allways at the same part. At the
> execution of the Gtk::FileChooserDialog. When I run it the first time to
> open a file it works fine. But at the second run I get the segmentation
> fault. While compiling I have no errors or warnings.
> I made at the initialization of the dialog one change to the book. I don't
> use
> dialog.set_transient_for(main_window);
> , because I excluded all my dialogs in a seperate class.
>
> Here is an example of my code:
> Gtk::FileChooserDialog dlg("Please choose a file",
> Gtk::FILE_CHOOSER_ACTION_OPEN);
>
> dlg.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
> dlg.add_button("Select", Gtk::RESPONSE_OK);
>
> // Filter for special file ending/-s
> Gtk::FileFilter filter_imr;
> filter_imr.set_name("IMR files");
> filter_imr.add_pattern("*.imr");
> dlg.add_filter(filter_imr);
>
> Gtk::FileFilter filter_any;
> filter_any.set_name("Any files");
> filter_any.add_pattern("*");
> dlg.add_filter(filter_any);
>
> int result = dlg.run(); // run file choosing dialog
> switch (result)
> {...
>
> Thank you in advance for your help.
> Greets Alexander
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]