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

[bug] On one given note, its image is not shown #414

Open
charlescanato opened this issue Dec 3, 2023 · 3 comments
Open

[bug] On one given note, its image is not shown #414

charlescanato opened this issue Dec 3, 2023 · 3 comments
Assignees
Labels

Comments

@charlescanato
Copy link

Problem
On one given note of mine, I have an image inside the note. However, when I open the note, it's not shown.
It must be noted that all other notes which have images (based on shown thumbnail on note list), when opened, have their images shown. I found this on only a specific note.
There's no crash or other side effects, apparently.

Steps to reproduce the problem

  1. Click on note in the note list, which has a thumbnail (indicating it has an image)
  2. The note is automatically opened on a tab, if it isn't already opened - go to the top of note, scroll it down entirely
  3. The image should be at the end of the note, but nothing is shown there

Expected behavior
The image included in this note should be shown there

Environment info
Please provide the information about the environment in which Quentier is run:

  1. OS - Windows
  2. Which version of Quentier do you use - last unstable (30-Nov), setup.exe version
  3. Where did you install Quentier from - downloaded from GitHub releases

Screenshots
Screenshots of Evernote Android client and Quentier, showing the end of the same note. I've added them to that shared folder of mine.

Additional context
I've also added a trace log, containing exactly this clicking on the note, with it being opened.
This is not that important for me, I'm reporting it 'cause maybe there's some special edge case which might be considered or not. Every other note with a thumbnail I've tested, had its image shown.

@d1vanov
Copy link
Owner

d1vanov commented Dec 4, 2023

Definitely seems to be some edge case, there's an exception in the log:

2023-12-03 06:45:00.785 E. South America Standard Time libquentier\libquentier\src\utility\QuentierApplication.cpp:43 [Error]: Caught unhandled exception: qevercloud::Optional: nonexistent value access, backtrace: Stack trace obtaining is not implemented on Windows, patches are welcome

I'll try to find out what it is. It would be helpful though if you could export this note into ENEX and add it to that shared folder as well. To export the note you need to right-click on it in the list of notes and choose "Export to enex" option.

@d1vanov
Copy link
Owner

d1vanov commented Dec 4, 2023

Actually, it seems that this note got corrupted somehow: I can see that it has two distinct attachments but they refer to the same sourceURL i.e. they both seem to represent the same file. But one of these attachments for some reason is missing the actual binary data. Didn't you by any chance have app crashes when working with this note previously? It could explain how the corruption could happen.

@d1vanov
Copy link
Owner

d1vanov commented Dec 4, 2023

A big problem in itself is the fact that such a resource/attachment without the actual data body managed to get stored in the local storage - in essence it qualifies as Quentier's local storage database corruption. With current local storage implementation in Quentier I believe I know how this could happen in case of a crash occurring in a particularly bad moment of time. If it wasn't a crash but a logical error, it's even worse and I'll double check the new local storage implementation for the theoretical possibility of such corruptions.

Right now there are no convenient instruments inside Quentier to work with note's resources as a list of items i.e. outside of the note editor. And I won't be able to invent such instruments quickly enough (although perhaps it would be a good feature to consider in general). So the most I can do for now is to provide you with instructions on how to fix this particular issue using raw SQL:

  1. Quit from Quentier app
  2. Go to C:\Users\%USERNAME%\AppData\Roaming\Quentier, there you should see EvernoteAccounts folder and inside it - the folder for your particular account, go into it
  3. There you should see a file called qn.storage.sqlite (and maybe a couple of similarly called files with different file extensions). This file is the SQLite database representing Quentier's local storage. I'd advice to backup these files before proceeding, just in case.
  4. Open this database file either via SQLite terminal client (you can download it here) or via some GUI app like DB Browser for SQLite.
  5. Execute the following SQLite query: DELETE FROM Resources WHERE resourceLocalUid='31a5b3e4-9aa9-475f-aac1-81d5ec0d15d9';

This action would get rid of this problematic resource without the body in this note. I'd also advise to modify something in this note (anything really, just to make Quentier mark it as locally modified for further sync) and sync it with Evernote to make sure this problematic resource won't return again with the next sync.

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