After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 617469 - wrong refresh calcs when duplicate worksheet
wrong refresh calcs when duplicate worksheet
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Main System
git master
Other All
: High critical
: ---
Assigned To: Morten Welinder
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2010-05-02 20:09 UTC by Esteban
Modified: 2010-05-03 18:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test worksheet (21.09 KB, application/x-gnumeric)
2010-05-02 20:11 UTC, Esteban
  Details
proposed patch (680 bytes, patch)
2010-05-03 16:27 UTC, Andreas J. Guelzow
rejected Details | Review

Description Esteban 2010-05-02 20:09:56 UTC
when i duplicate a whorksheet, some calculations dont duplicate well

I attach the file that have problems

1 - duplicate sheet "especie"
2 - look at cell c96 in "especie" and "especie(2)", there are different.

I suppose the problem begins with a matrix calculation in cells (AA72:AD75)

in especie was

21	15	10	10
15	15	10	10
10	10	10	10
10	10	10	20

after duplicate it, will appear in "especie(2)" like this

		10	
15	15	10	10
10	10	10	10
10	10	10	20

Another problem (i suppose it was linked) is if you want to add two columns right from N column, Gnumeric crashes.


Regards


Esteban
Comment 1 Esteban 2010-05-02 20:11:28 UTC
Created attachment 160165 [details]
test worksheet
Comment 2 Andreas J. Guelzow 2010-05-03 05:35:44 UTC
I can replicate this. I also note the large number of Criticals printed upon duplication of the sheet:

** (/home/aguelzow/gnumeric/bin/gnumeric:21303): CRITICAL **: gnm_cell_set_value: assertion `!gnm_cell_is_nonsingleton_array (cell)' failed.

Asking for recalculation on the duplicated sheet indeed leads to a crash. 

Increasing the severity to critical because of the crash.
Comment 3 Morten Welinder 2010-05-03 13:00:20 UTC
First critical here:

  • #1 cb_sheet_cell_copy
    at sheet.c line 5425
  • #2 g_hash_table_foreach
    from /usr/lib64/libglib-2.0.so.0
  • #3 sheet_dup
    at sheet.c line 5443
  • #4 wbcg_clone_sheet
    at wbc-gtk.c line 459

Comment 4 Morten Welinder 2010-05-03 13:16:59 UTC
Criticals fixed.  Still crashes:

Program received signal SIGSEGV, Segmentation fault.

Thread 140527372580592 (LWP 11251)

  • #0 LUPDecomp
    at go-regression.c line 231
  • #1 go_matrix_invert
    at go-regression.c line 346
  • #2 gnumeric_minverse
    at functions.c line 2662
  • #3 function_call_with_exprs
    at func.c line 1447

Comment 5 Morten Welinder 2010-05-03 13:28:34 UTC
Andreas, I am seeing this on load, i.e., before the duplicate.  I don't
think it is related to the crash, but worrying nonetheless.

==11363== Invalid read of size 8
==11363==    at 0x4F264F6: gnm_matrix_eigen_max_index (mathfunc.c:7804)
==11363==    by 0x4F268D7: gnm_matrix_eigen (mathfunc.c:7855)
==11363==    by 0x130DDCB1: gnumeric_eigen (functions.c:3099)
==11363==    by 0x4EEB285: function_call_with_exprs (func.c:1447)
==11363==    by 0x4EDF1A9: gnm_expr_eval (expr.c:1399)
==11363==    by 0x4EDF56E: gnm_expr_eval (expr.c:1460)
==11363==    by 0x4EE2F30: gnm_expr_top_eval (expr.c:2994)
==11363==    by 0x4ED7F2B: gnm_cell_eval_content (dependent.c:1511)
==11363==    by 0x4EDF6AB: gnm_expr_eval (expr.c:1485)
==11363==    by 0x4EE2F30: gnm_expr_top_eval (expr.c:2994)
==11363==    by 0x4ED7F2B: gnm_cell_eval_content (dependent.c:1511)
==11363==    by 0x4ED81E7: dependent_eval (dependent.c:1607)
==11363==  Address 0xc5f6000 is 0 bytes after a block of size 32 alloc'd
==11363==    at 0x4C2560E: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==11363==    by 0xA581C12: g_malloc (in /usr/lib64/libglib-2.0.so.0.1600.3)
==11363==    by 0x130DDA59: value_to_matrix (functions.c:2621)
==11363==    by 0x130DDB3F: gnumeric_eigen (functions.c:3086)
==11363==    by 0x4EEB285: function_call_with_exprs (func.c:1447)
==11363==    by 0x4EDF1A9: gnm_expr_eval (expr.c:1399)
==11363==    by 0x4EDF56E: gnm_expr_eval (expr.c:1460)
Comment 6 Morten Welinder 2010-05-03 13:48:17 UTC
Crash fixed.  (In goffice.)
Comment 7 Morten Welinder 2010-05-03 14:05:30 UTC
Another cause of crash fixed, this time in gnumeric.  This is very, very
likely to be the cause of the observed crash.  Leak fixed.
Comment 8 Andreas J. Guelzow 2010-05-03 16:27:38 UTC
Created attachment 160203 [details] [review]
proposed patch

Proposed patch to fix duplication of array formulas when sheets are duplicated.
Comment 9 Morten Welinder 2010-05-03 16:51:57 UTC
Fixed differently.
Comment 10 Andreas J. Guelzow 2010-05-03 17:31:00 UTC
Review of attachment 160203 [details] [review]:

fixed differently
Comment 11 Morten Welinder 2010-05-03 17:58:50 UTC
For those keeping track: all serious problems here are fixed.  I have a
font/rendering issue that needs looking into.
Comment 12 Morten Welinder 2010-05-03 18:44:42 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.