[Kmymoney-devel] [kmymoney4] [Bug 333236] Illegal Instruction 4 when touching any part of the code dealing with scheduled transactions

Alvaro Soliverez asoliverez at kde.org
Thu Apr 10 11:28:57 UTC 2014


https://bugs.kde.org/show_bug.cgi?id=333236

--- Comment #4 from Alvaro Soliverez <asoliverez at kde.org> ---
Based on the original trace, there's something weird happening. Here's the
relevant snippet of code.

      MyMoneyMoney balance;
      if (balances.count() == 0)
        balance = MyMoneyFile::instance()->balance(acc.id(),
dueDate.addDays(-1));
      else
        balance = balances[acc.id()];

      // FIXME: for now, we only support interest calculation at the end of the
period
      calc.setBep();
      // FIXME: for now, we only support periodic compounding
      calc.setDisc();

      calc.setPF(MyMoneySchedule::eventsPerYear(schedule.occurrence()));
      MyMoneySchedule::occurrenceE compoundingOccurrence =
static_cast<MyMoneySchedule::occurrenceE>(acc.interestCompounding());
      if (compoundingOccurrence == MyMoneySchedule::OCCUR_ANY)
        compoundingOccurrence = schedule.occurrence();

      calc.setCF(MyMoneySchedule::eventsPerYear(compoundingOccurrence));

      calc.setPv(balance.toDouble());   <--- this is line 1264.

I think the only way this might happen, is if QMap balances does not actually
contain acc.id(), but it should still return a default MyMoneyMoney value,
which is 0, and is a normal case

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list