Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Crash on search

#218
Application Identifier: com.hardcoded_software.moneyguru
Application Version: 2.3.4

Traceback (most recent call last):
  File "/Applications/moneyGuru.app/Contents/Resources/mg_cocoa.plugin/Contents/Resources/mg_cocoa.py", line 595, in setQuery_
  File "core/gui/search_field.pyc", line 21, in query
  File "core/document.pyc", line 918, in filter_string
  File "hscommon/notify.pyc", line 19, in notify
  File "hscommon/notify.pyc", line 68, in dispatch
  File "hscommon/notify.pyc", line 64, in _repeat_message
  File "hscommon/notify.pyc", line 19, in notify
  File "core/gui/base.pyc", line 254, in dispatch
  File "hscommon/notify.pyc", line 68, in dispatch
  File "hscommon/notify.pyc", line 64, in _repeat_message
  File "hscommon/notify.pyc", line 19, in notify
  File "core/gui/base.pyc", line 158, in dispatch
  File "hscommon/notify.pyc", line 52, in dispatch
  File "core/gui/table.pyc", line 76, in _filter_applied
  File "hscommon/gui/table.pyc", line 251, in refresh
  File "core/gui/entry_table.pyc", line 43, in _fill
  File "core/gui/entry_table_base.pyc", line 396, in _get_account_rows
  File "core/gui/main_window.pyc", line 375, in visible_entries_for_account
  File "core/gui/main_window.pyc", line 168, in _visible_entries_for_account
  File "core/app.pyc", line 141, in parse_search_query
  File "core/app.pyc", line 123, in parse_amount
  File "core/model/amount.pyc", line 118, in parse_amount
TypeError: a float is required

I could reproduce the issue by searching for "()". Because it matches the regular expression of a valid expression, it is parsed by parse_amount, but because the result of the expression is not a number, there's a crash.

Two things to fix here:

  1. parse_amount() in the search should have the with_expression option off.
  2. parse_amount() should not crash on "()" when the with_expression option is on.

Reported by Virgil Dupras · January 3rd, 2011 @ 11:28 AM

State: fixed
Milestone: none
Assigned to: Virgil Dupras Virgil Dupras

Activity

  1. Virgil Dupras
    Virgil Dupras
    • Assigned user set to Virgil Dupras

    February 5th, 2011 @ 03:25 PM

  2. Virgil Dupras
    Virgil Dupras
    • State changed from accepted to fixed

    (from [0eabcd65dc00]) [#218 Crash on search state:fixed] Fixed crash on searching invalid amount expressions, like '()'. https://bitbucket.org/hsoft/moneyguru/changeset/0eabcd65dc00/

    February 5th, 2011 @ 03:44 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.