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

QIF export crashes due to illegal denominator #771

Closed
rivaldi8 opened this issue Mar 12, 2018 · 2 comments
Closed

QIF export crashes due to illegal denominator #771

rivaldi8 opened this issue Mar 12, 2018 · 2 comments
Labels
Milestone

Comments

@rivaldi8
Copy link
Collaborator

GnuCash Android crashes a few seconds after starting to export my transactions to a QIF file, either local or in Dropbox. File is created, but empty. I've been exporting my mobile transactions to desktop app this way for a long time, and it had worked last time with the same database.

I've checked Android logs with CatLog and found this error message:

01-18 09:59:44.314 W/System.err(23088): org.gnucash.android.export.Exporter$ExporterException: Failed to generate export with parameters: Export all transactions created since 2017-11-22 01:36:43.359 UTC as QIF to DROPBOX - split quantity has illegal denominator: 1000000

I've searched Google for this error message, and found source code (QifExporter.java) that throws it if a split has the QUANTITY_DENOM column set to an unsupported value. It seems that allowed values are only 10, 100 or 1000.

Then I've opened the current book's database file with SQLite and ran a query to find out which transactions had the unsupported 1.000.000 value as QUANTITY_DENOM, and found a few of them, as shown in the attached screenshot. These were transactions created with GnuCash Desktop and imported to GnuCash Android 2 months ago, with a recent beta version of the mobile app (not sure which of them).

After deleting those few transactions (didn't try to fix them in the database, as they're already in GnuCash Desktop), export works fine.

I don't know GnuCash internals to tell if setting the denominator column to 1.000.000 was a mistake of the desktop or the mobile app, but I believe it should be properly handled at export time.

GnuCash Android 2.3.0 (from Play Store, not sure if it's beta1 or beta3, but also happened before last update).

Reported through Google Plus.

@rivaldi8 rivaldi8 added the bug label Mar 12, 2018
@codinguser
Copy link
Owner

screenshot_20180118-104213

@codinguser codinguser added this to the v2.4.0 milestone Mar 14, 2018
gregwalters pushed a commit to gregwalters/gnucash-android that referenced this issue Apr 25, 2018
codinguser added a commit that referenced this issue May 2, 2018
Allow denominators up to 1000000 in QIF export - fixes #771
@rivaldi8
Copy link
Collaborator Author

Fixed in develop (a55ec29).

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

No branches or pull requests

2 participants