bugPSPP - Bugs: bug #23127, GUI crashes when importing large...

 
 

bug #23127: GUI crashes when importing large text files

Submitted by:  John Darrington <jmd>
Submitted on:  Thu 01 May 2008 09:25:05 AM UTC  
 
Category: Graphical User InterfaceSeverity: 5 - Average
Status: FixedAssigned to: None
Open/Closed: ClosedRelease: Before 0.6.0
Effort: 0.00

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 07 May 2008 12:18:04 AM UTC, comment #4:

I checked in these patches. John, I used your version because I agree that it is better. It is equally effective in my testing.

Ben Pfaff <blp>
Project Administrator
Tue 06 May 2008 12:36:42 AM UTC, comment #3:

I prefer to avoid doing stuff at the Gdk level wherever possible.

So instead of

parent_window = gtk_widget_get_parent_window (widget);
if (!parent_window || !gdk_window_is_viewable (parent_window))
return FALSE;

I think that
if ( ! GTK_WIDGET_MAPPED (widget))
return FALSE;

will have the same effect.

The other two patches look fine.

John Darrington <jmd>
Project Administrator
Mon 05 May 2008 10:10:03 PM UTC, comment #2:

Works for me.

Jason H Stover <jstover>
Project Member
Mon 05 May 2008 03:41:43 PM UTC, comment #1:

To start, here is a reproduction recipe for this problem that I found to be reliable. Start with any text import data file. On the page that selects delimiters, choose delimiters that causes missing trailing fields on some lines. On the final page, hover the mouse cursor over one of those missing fields and wait for the tool tip to appear. While the tool tip is visible, type Control+A to push the "Apply" button that completes the assistant.

To finish, here is a series of patches that fix this and a couple of other problems. Each patch file begins with an explanation.

(file #15608, file #15609, file #15610)

Ben Pfaff <blp>
Project Administrator
Thu 01 May 2008 09:25:05 AM UTC, original submission:

Information provided by Jason Stover:

...and still crashes on the desktop, right after pressing the final 'Apply' button.
Here is a backtrace from the segfault:

Program received signal SIGSEGV, Segmentation fault.
0x0808c3d7 in parse_field (ia=0xbfbdba08, row=<value optimized out>, column=5, outputp=0x0, tooltipp=0xbfbdc528)
at src/ui/gui/text-data-import-dialog.c:1690
1690 field = ia->separators.columns[column].contents[row];
(gdb) bt
#0 0x0808c3d7 in parse_field (ia=0xbfbdba08, row=<value optimized out>, column=5, outputp=0x0,
tooltipp=0xbfbdc528) at src/ui/gui/text-data-import-dialog.c:1690
#1 0x0808c8e6 in on_query_output_tooltip (widget=0x8445db0, wx=428, wy=57, keyboard_mode=0, tooltip=0x8429d48,
ia=0xbfbdba08) at src/ui/gui/text-data-import-dialog.c:1782
#2 0xb7d88106 in _gtk_marshal_BOOLEAN__INT_INT_BOOLEAN_OBJECT (closure=0x85c2b18, return_value=0xbfbdc6c0,
n_param_values=5, param_values=0xbfbdc7ac, invocation_hint=0xbfbdc6ac, marshal_data=0x808c8a0)
at gtkmarshalers.c:835
#3 0xb79a2e5c in IA__g_closure_invoke (closure=0x85c2b18, return_value=0xbfbdc6c0, n_param_values=5,
param_values=0xbfbdc7ac, invocation_hint=0xbfbdc6ac) at gclosure.c:490
#4 0xb79b37fa in signal_emit_unlocked_R (node=0x81be3c8, detail=0, instance=0x8445db0,
emission_return=0xbfbdc96c, instance_and_params=0xbfbdc7ac) at gsignal.c:2440
#5 0xb79b4ac2 in IA__g_signal_emit_valist (instance=0x8445db0, signal_id=69, detail=0,
var_args=0xbfbdca08 "4
patch=1, self=0x81c81a8)
at gmain.c:2694
#13 0xb7907918 in IA__g_main_loop_run (loop=0x840b708) at gmain.c:2898
#14 0xb7d83ba9 in IA__gtk_main () at gtkmain.c:1163
#15 0x08076584 in run_inner_loop (data=0x81c1848) at src/ui/gui/main.c:82
#16 0xb7d83d0a in IA__gtk_main () at gtkmain.c:2233
#17 0x08076523 in main (argc=136012152, argv=0x1) at src/ui/gui/main.c:131

Further information from Ben Paff:

John Darrington <john@cellform.com.au> writes:

> My guess is that on_query_output_tooltip is getting called after its
> data (the struct import_assistant) has been destroyed. So if I'm
> right, then we either need to set ia to NULL and test for this in the
> callback, or disconnect the callback before the data is destroyed.


This was my own tentative diagnosis, too, months ago when I
encountered it. I was never able to reproduce it under valgrind,
though, so I concluded that it was somehow timing sensitive.

John Darrington <jmd>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jstover (Posted a comment)
  • -unavailable- added by blp (Updated the item)
  • -unavailable- added by jmd (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 07 May 2008 12:18:04 AM UTCblpStatusReady for Test/Review=>Fixed
      Open/ClosedOpen=>Closed
    Mon 05 May 2008 03:41:43 PM UTCblpAttached File-=>Added text-import-make-easier-for-valgrind.patch, #15610
      StatusConfirmed=>Ready for Test/Review
    Mon 05 May 2008 03:41:42 PM UTCblpAttached File-=>Added text-import-use-after-free-fix.patch, #15608
      Attached File-=>Added gtksheet-use-after-free-fix.patch, #15609
    Thu 01 May 2008 09:25:34 AM UTCjmdReleaseNone=>Before 0.6.0

    Back to the top


    Powered by Savane 3.1-cleanup1