Page 1 of 1

Attachment changes lost on exiting current database

Posted: Thu Dec 24, 2015 8:34 pm
by date
Hi
I have a few .xls and .txt attachments with data that needs to be imported in my CN notebook. I have added this file to a note, I edit the contents, and CN will update the attachment in the note upon saving.
I wanted to create a new .db notebook-file, but the .xls attachment that was being edited was still sitting in the background. I clicked File-> New, and CN asked me 'The file is still being edited, close anyway Y/N?' or something along those lines, and I clicked No. I got these messages (not necessarily in this order):
class err::LogicException Postcondition failed:app::model::data::NoteMapper::getNoten
Postcondition failed: app::model::data::NoteMapper::getNoten class err::InvalidArgumentException Precondition failed:app::model::data::NoteRepository::addNote sectionMapper ->sectionExists(n.getSectionId())
class err::InvalidArgumentException Precondition failed: app::model::Notebook::setSectionFilter sf.getMax(sectionsCount) < sectionsCount
trying to switch to another .db:
class err::InvalidStateException ui::Window::getHwnd class ui:Window const *: Cinta.ModelessDialog,

The notebook suddenly appeared to be empty, and saving the .xls file leads to another message, because CN still detected the file had been changed but could not update the note.
I had to exit CN, and restart, and the notebook was just fine. But upon trying to redo these steps, apparently the changes made to the opened file will not update.
Also tried to redo this with a .txt file, and in this case CN will silently discard the file. This could be due to notepad++ not locking the file.

Re: Attachment changes lost on exiting current database

Posted: Fri Dec 25, 2015 9:38 am
by CintaNotes Developer
Hi date,
Thanks for the report!

I still couldn't reproduce the issue - could you please tell me the exact steps needed? Thanks!

Re: Attachment changes lost on exiting current database

Posted: Fri Dec 25, 2015 4:04 pm
by date
Here is a debug log, if that is helpful.

Just open an attachment in a program that can edit and locks the file (I'm using excel 2007 here), edit the file (optional?), minimize windows and create a new notebook using file->new, and click 'no' when asked to discard the opened file.
The (current) notebook will appear to be empty and CN doesn't do much useful anymore. Also exiting with File->exit isn't possible, you must exit by right-clicking the system tray icon.

(You can of course still use 'save as...' from excel, or save and locate your file in the temporary directory to save your data, and add your file to the note again.)

Re: Attachment changes lost on exiting current database

Posted: Sat Dec 26, 2015 11:48 am
by CintaNotes Developer
Now I could reproduce, thanks!
Will be fixed in the next update.