Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reports drill down 'Error: Attempt to invoke virtual method 'int.java.lang.integer.intValue()' #1213

Closed
ghost opened this issue Feb 26, 2018 · 10 comments

Comments

@ghost
Copy link

ghost commented Feb 26, 2018

Phone: Google Pixel 2XL
OS: Latest February patch 8.1.0
MMEX version: 2/26/18 Release (happened prior to this release also)
Screenshot: Attached

Reproduce: Options Triple Bar (upper left of screen), Choose reports, Choose (payees, or where the money goes, or where the money comes from, or categories), Touch an entry which I assume is supposed to drill into. Any entry will show the error: Error: Attempt to invoke virtual method 'int.java.lang.integer.intValue()' on a null object reference.

To be honest I didn't even think of having the drill down feature in the mobile version and found it by accident. If this feature doesn't exist maybe you could suppress the error. Working would be nice but realize the developers time constraints.

@alensiljak
Copy link

That's strange. I can drill down and get the list of underlying transactions for each option selected.

@ghost
Copy link
Author

ghost commented Feb 26, 2018

Might be on my end. Ran the db integrity check and came back ok. Ran the db schema and received the warning below:

I will export the data later and start with a new db, then re-import. I will update within the next 24 hours.

@alensiljak
Copy link

You don't need to do so much work. Check your schema and compare to the latest new database. Just create a new file from the database settings.
Missing tables would result in a different exception. Still a bit puzzled. Do you have a dev environment, perhaps?

@AC-T
Copy link

AC-T commented Feb 27, 2018

I'm seeing this as well - Nexus 5x Oreo 8.1.0, MMEX 2018.02.26 981-beta. Using MMEX 1.3.3 (DB v.7) on Windows 10/Mac Sierra.

Running check Schema, I get the Error about tables missing but also:

Table missing: SPLITTRANSACTIONS_V2

I do have developer options turned on.

Regards,

Art

@alensiljak
Copy link

alensiljak commented Feb 28, 2018

Table missing: SPLITTRANSACTIONS_V2

I don't have that table either so this should not be the cause. The only thing in the crash logs is this:

Fatal Exception: java.lang.IllegalStateException: Couldn't read row 0, col -1 from CursorWindow.  Make sure the Cursor is initialized correctly before accessing data from it.
       at android.database.CursorWindow.nativeGetString(CursorWindow.java)
       at android.database.CursorWindow.getString(CursorWindow.java:438)
       at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:51)
       at android.database.CursorWrapper.getString(CursorWrapper.java:137)
       at com.money.manager.ex.reports.PayeeReportAdapter.bindView(PayeeReportAdapter.java:55)
       at android.support.v4.widget.CursorAdapter.getView(CursorAdapter.java:273)

which references PayeeReportAdapter and is a possible candidate.
Which exact report(s) do you get the error on?

@AC-T
Copy link

AC-T commented Mar 1, 2018

"Which exact report(s) do you get the error on?"

I get the error when tapping on a category in the following reports:

  • Where the money goes
  • Where the money comes from
  • Category report

I do not get an error when tapping on a month in the Income and Expenses report - in that case, tapping on a month brings up a list of transactions.

Also, tapping on the Payee report crashes the app.

Art

@Li0n13
Copy link
Contributor

Li0n13 commented Nov 8, 2018

Phone: Xiaomi Redmi Note 5
OS: 8.1.0
MMEX version: 2018.02.26.981

I have the same error. Running "check schema", I got error "tables missing in the database".

Using "sqldiff" tool from https://www.sqlite.org/2018/sqlite-tools-win32-x86-3250300.zip, I got difference between my database and the new created with script https://github.com/moneymanagerex/android-money-manager-ex/blob/master/app/src/main/res/raw/tables_v1.sql.

After applying differences I run "check schema" and got message "db_check_schema_success". But I still have "Error: Attempt to invoke virtual method 'int.java.lang.integer.intValue()".

@vladimir-poleh
Copy link
Contributor

I have same problem on the OnePlus 5.

I have tried to debug this issue and have found that it is problem with the characters case - columns names in the cursor are not the same as expected (for example SubCategID instead of SubcategID). It seems to be an issue of the query_mobiledata.sql.

Will try to fix it.

vladimir-poleh added a commit to vladimir-poleh/android-money-manager-ex that referenced this issue Nov 9, 2018
…ual method 'int.java.lang.integer.intValue()'
Li0n13 added a commit to Li0n13/android-money-manager-ex that referenced this issue Nov 9, 2018
…ual method 'int.java.lang.integer.intValue()' moneymanagerex#1266

Fix: crash Payees report
Fix: error on category click in reports "Where the money goes", "Wgere the money comes from"
alensiljak pushed a commit that referenced this issue Nov 15, 2018
#1213 Reports drill down 'Error: Attempt to invoke virtual method 'int.java.lang.integer.intValue()' #1266
alensiljak pushed a commit that referenced this issue Nov 15, 2018
#1213 Reports drill down 'Error: Attempt to invoke virtual method 'int.java.lang.integer.intValue()'
@wolfsolver
Copy link
Contributor

Give a try to latest 202401 release series.

Copy link

This issue was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants