Attachment changes lost on exiting current database

date
Posts: 239
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Attachment changes lost on exiting current database

Postby date » Thu Dec 24, 2015 8:34 pm

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.
User avatar
CintaNotes Developer
Site Admin
Posts: 4654
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Attachment changes lost on exiting current database

Postby CintaNotes Developer » Fri Dec 25, 2015 9:38 am

Hi date,
Thanks for the report!

I still couldn't reproduce the issue - could you please tell me the exact steps needed? Thanks!
Alex
date
Posts: 239
Joined: Sat Aug 01, 2015 5:15 am
Contact:

Re: Attachment changes lost on exiting current database

Postby date » Fri Dec 25, 2015 4:04 pm

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.)
Attachments
log.1.zip
(111.73 KiB) Downloaded 1449 times
User avatar
CintaNotes Developer
Site Admin
Posts: 4654
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: Attachment changes lost on exiting current database

Postby CintaNotes Developer » Sat Dec 26, 2015 11:48 am

Now I could reproduce, thanks!
Will be fixed in the next update.
Alex

Return to “Bug Reports”