GNOME Bugzilla – Bug 533507
sumproduct issues
Last modified: 2018-05-22 13:27:22 UTC
Version: r16573 + Attachment 110945 [details] (from Bug 533247) OS: Ubuntu Hardy Steps to reproduce: - Enter '=sumproduct(Q1:P141,D119,1)' (no quotes) into A1 Console output: ** (gnumeric:28222): CRITICAL **: value_area_get_width: assertion `v' failed ** (gnumeric:28222): CRITICAL **: value_area_get_height: assertion `v' failed ** (gnumeric:28222): CRITICAL **: value_release: assertion `value != NULL' failed Backtrace: Breakpoint 1, 0xb72aae66 in g_log () from /usr/lib/libglib-2.0.so.0 (gdb) bt
+ Trace 197926
Created attachment 111058 [details] [review] proposed patch The criticals happen because cell D119 was probably empty.
Hmm... What is sumproduct of two empty cells supposed to be? I can see either 0 or an error as reasonable results.
sumproduct(empty,empty) --> #VALUE The general case with an empty argument appears to be that it is of a higher priority that errors in the data set. Hence it is not a size_error. If e1=empty and f1=1/0, then sumproduct(f1:f2,e1)=#VALUE sumproduct(f1:f1,e1)=#DIV/0 sumproduct(f1:f2,e1:e2)=#DIV/0 sumproduct(f1:f1,e1:e2)=#DIV/0 I'm sure there is some interaction with implicit iteration going on.
Patch committed. We now get #DIV/0 in all four cases above. That's better than criticals, I guess. Leaving open to fix error handling issues.
Morten, specifically which error handling issues do you see?
Excel: sumproduct(f1:f2,e1)=#VALUE Gnumeric: sumproduct(f1:f2,e1)=#DIV/0
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnumeric/issues/100.