-
Notifications
You must be signed in to change notification settings - Fork 136
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
Unable to export: Failed to parse attachment row: Integer -51 out of range at index 0 #390
Comments
What is the output of |
|
Interesting, so this only happens when you use an end date filter with that specific date? Can you try and replicate the crash after running The only thing we parse as unsigned is this field:
I'm not sure how an attachment might get a negative size, so I'd like to know more about what happens when we get the crash. I don't think we serialize anything differently when querying with a filter, so the fact that it works without |
It also happens with earlier dates, i.e. 2011-12-31, 2011-10-01, or 2012-06-01. The integer value is different for each of those dates (but always negative).
I just did this, but it won’t give me additional output (tried the brew version and the binary from the releases section). |
No problem, you'd probably have to The fact that it says "at index 0" suggests to me that it might be failing to parse the ROWID (but also, these access the field by name, not index, so maybe not):
But that field is |
Even when running from the repo, I don’t get the stack trace:
Any idea why not? |
The only place we apply query filters is here: imessage-exporter/imessage-database/src/tables/attachment.rs Lines 260 to 294 in e7d5ba0
All it does is sum the |
Did you run I think it may occur here, because we do access an index 0: imessage-exporter/imessage-database/src/tables/attachment.rs Lines 291 to 293 in e7d5ba0
but I am not sure why it would be negative–but if it was, that line would fail with the error you mentioned. |
Yes (just realized it was missing in the output I pasted). |
If you replace this: imessage-exporter/imessage-exporter/src/main.rs Lines 29 to 31 in e7d5ba0
with app.start().unwrap(); it should avoid the exception handler and crash "normally". |
The problem is probably that you have some old row in the The field is currently |
It does:
|
If you change imessage-exporter/imessage-exporter/src/app/runtime.rs Lines 333 to 334 in e7d5ba0
to: Attachment::get_total_attachment_bytes(&self.db, &self.options.query_context)
.unwrap_or(0); Does that resolve the crash for you? |
Better yet, can you check if this branch (diff) resolves the crash? |
Yes, it does! |
Thank you for the report and going through the trouble to test the changes! |
No worries at all! This is such a great tool and I was happy to help! Thanks for all your work on this and also for the amazingly fast response to my bug report. |
I’m getting an error when running imessage-exporter with an end date before 2012-07-23:
It works fine when I use 2012-07-23 as the end date. Apparently, all newer dates also work fine: I tried 2013-01-01, and also omitted the date to export all messages, which worked fine, too.
Maybe also worth nothing:
The text was updated successfully, but these errors were encountered: