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 681048 - Evaluator 'remaining operands' error
Evaluator 'remaining operands' error
Status: RESOLVED FIXED
Product: aravis
Classification: Other
Component: Genicam
git master
Other Linux
: Normal normal
: ---
Assigned To: aravis-maint
aravis-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-02 09:04 UTC by Emmanuel Pacaud
Modified: 2012-08-07 08:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Emmanuel Pacaud 2012-08-02 09:04:22 UTC
Le mercredi 01 août 2012 à 14:43 +0000, tom.cobb@diamond.ac.uk a écrit :
> Ok, found the problem, but need help with the solution:
> 
> --- src/arvevaluator.c        (revision 80561)
> +++ src/arvevaluator.c        (working copy)
> @@ -888,7 +888,7 @@
>                                       status = ARV_EVALUATOR_STATUS_PARENTHESES_MISMATCH;
>                                       goto CLEANUP;
>                               }
> -                             arv_evaluator_token_free (token);
> +                             //arv_evaluator_token_free (token);
>                               arv_evaluator_token_free (operator_stack->data);
>                               operator_stack = g_slist_delete_link (operator_stack, operator_stack);
>                       } else {
> 
> This arv_evaluator_token_free is freeing token, which is passed (as
> previous_token) to arv_get_next_token. This causes
> arv_evaluator_token_is_right_parenthesis(previous_token) to return
> False, which causes "+" to be interpreted as a unary plus instead of a
> binary plus, causing our remaining operands error. There is a similar
> arv_evaluator_token_free in the code dealing with ",". Not quite sure
> where we should free this token, but I guess it needs to be delayed!

Thanks Tom.

I guess the right solution would be to free the token just after the
call to arv_get_next_token. Or store the ones that need to be freed in a
garbage slist, and free this list and its content before exiting
parse_expression.
Comment 1 Emmanuel Pacaud 2012-08-02 09:04:52 UTC
[Evaluator::evaluate_as_int64] Expression = '(BINNING & 0x00060000)=0?((TO & 0xFF)+1):1'
(BINNING & 0x00060000)=0?((TO & 0xFF)+1):1
[Evaluator::evaluate_as_int64] Parsing status = 0
(var) BINNING = 0
(int64) 393216
(operator) &
(int64) 0
(operator) =
(var) TO = 0
(int64) 255
(operator) &
(int64) 1
(operator) plus
(int64) 1
(operator) :
(operator) ?
[Evaluator::evaluate] Error 'remaining operands'
Comment 2 Emmanuel Pacaud 2012-08-07 08:03:59 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.