calculator doesn't calculate: parse error in math.js

Bug #1620333 reported by Jean-Baptiste Lallement
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Renato Araujo Oliveira Filho
Ubuntu Calculator App
Fix Released
Undecided
Renato Araujo Oliveira Filho

Bug Description

current build number: 31
device name: frieza_arm64
channel: ubuntu-touch/staging/ubuntu

com.ubuntu.calculator 2.0.304

It is not possible to calculate anything in the calculator

From calculator logs:
file:///opt/click.ubuntu.com/com.ubuntu.calculator/2.0.304/share/qml/engine/math.js:71: Parse error
qml: [LOG]: Unable to calculate formula : "7774587*36", math.js: SyntaxError: Parse error

Related branches

Changed in canonical-devices-system-image:
milestone: none → x1
Changed in canonical-devices-system-image:
assignee: nobody → Alan Pope ๎ƒฟ (popey)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Alan Pope ๐Ÿบ๐Ÿง๐Ÿฑ ๐Ÿฆ„ (popey) wrote :

Maybe re-produce this with a build of calculator that isn't nearly a year old ;)

You're using r233, please reproduce with r304.

Changed in canonical-devices-system-image:
status: Confirmed → Incomplete
Changed in ubuntu-calculator-app:
status: New → Incomplete
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

With 304 there is a parse error in math.js and you cannot calculate anything

From the logs:
file:///opt/click.ubuntu.com/com.ubuntu.calculator/2.0.304/share/qml/engine/math.js:71: Parse error
qml: [LOG]: Unable to calculate formula : "7774587*36", math.js: SyntaxError: Parse error

summary: - Cannot type characters in the calculator
+ calculator doesn't calculate: parse error in math.js
description: updated
Changed in canonical-devices-system-image:
status: Incomplete → Confirmed
importance: Medium → High
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Revision history for this message
Alan Pope ๐Ÿบ๐Ÿง๐Ÿฑ ๐Ÿฆ„ (popey) wrote :

FWIW, works fine on Xenial AMD64 desktop.

Revision history for this message
Alan Pope ๐Ÿบ๐Ÿง๐Ÿฑ ๐Ÿฆ„ (popey) wrote :

Can someone with a xeniel/aarch64/frieza device do a test for me?

This grabs the latest upstream math.js and replaces the one used by the calculator, ninja-style.

adb shell
wget http://cdnjs.cloudflare.com/ajax/libs/mathjs/3.5.0/math.min.js
sudo cp math.min.js /opt/click.ubuntu.com/com.ubuntu.calculator/2.0.304/share/qml/engine/math.js

Close the app, restart it and test again?

Revision history for this message
Bartosz Kosiorek (gang65) wrote :

It looks something weird happened with database:
file:///opt/click.ubuntu.com/com.ubuntu.calculator/2.0.304/share/qml/ubuntu-calculator-app.qml:366: TypeError: Cannot read property 'dbId' of null
file:///opt/click.ubuntu.com/com.ubuntu.calculator/2.0.304/share/qml/ubuntu-calculator-app.qml:435: TypeError: Cannot read property 'index' of null

which is based on QtQuick.LocalStorage.
http://doc.qt.io/qt-5/qtquick-localstorage-qmlmodule.html

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

getting the same error while trying to pack the calculator using the platform content share. My guess is that some file/library is missing or misplaced. Or a missing evn var.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

See bug #1582262 too I filed in May. But this bug is now more up-to-date.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Not related to platform snap, this is a general issue of something changed in Qt 5.6 versus what the calculator is expecting.

Changed in canonical-devices-system-image:
assignee: Alan Pope ๐Ÿบ๐Ÿง๐Ÿฑ (popey) → Renato Araujo Oliveira Filho (renatofilho)
Changed in ubuntu-calculator-app:
assignee: nobody → Renato Araujo Oliveira Filho (renatofilho)
status: Incomplete → In Progress
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-calculator-app at revision 312, scheduled for release in ubuntu-calculator-app, milestone Unknown

Changed in ubuntu-calculator-app:
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
status: Confirmed → Fix Committed
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Changed in ubuntu-calculator-app:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.