Data loss by running multiple instances

Bug #771396 reported by botanicus
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
RedNotebook
Fix Released
Medium
Jendrik Seipp
Debian
New
Undecided
Unassigned

Bug Description

If Rednotebook is configured to automatically start at login ("[x] Load RedNotebook at system start" [de="RedNotebook beim Systemstart laden"]), multiple instances will run in subsequent sessions (likely caused by KDE's session management). Accordingly, two icons will be displayed in system tray area. However, this is likely to be hidden or overlooked.

If you don't realize this, at the end of your session that instance of RedNotebook which closes last will silently overwrite the whole journal. As multiple instances running on the same journal won't update each other and even don't notice updated yournal files (as kate would do, for instance), there is no warning at all. At worst, all of your editing work of the complete session might irrevocably be thrashed.

Therefore, RedNotebook should either generally refuse to operate in multiple instances on the same dataDir, or at least have a configuration option to prevent this behaviour.

checkForNewVersion=0
closeToTray=1
cloudIgnoreList=category, diese, entries, entry
cloudIncludeList=job, juli, mtv, spam
cloudTabActive=0
dataDir=/home/username/.rednotebook/data
dateTimeString=%A, %x %X
leftDividerPosition=328
mainFontSize=-1
mainFrameHeight=768
mainFrameMaximized=0
mainFrameWidth=1176
mainFrameX=125
mainFrameY=164
rightDividerPosition=512
spellcheck=0
useWebkit=1
userDir=
weekNumbers=0

Related branches

Revision history for this message
Jendrik Seipp (jendrikseipp) wrote :

Thanks for reporting this. I have already begun working on this. You can find the work in the linked branch.

Changed in rednotebook:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Jendrik Seipp (jendrikseipp)
status: Confirmed → In Progress
Revision history for this message
Jendrik Seipp (jendrikseipp) wrote :

Try running the new implementation. What do you think about the warning method?

Revision history for this message
botanicus (botanicus) wrote :

Dear Jendrik,

I'd really like to test it, but need a deb-Package (or a repository to add) to do so. (I'm running debian, but I'm not a developer. On debian, we still get v. 1.0.0-2 in stable and 1.1.8-1 in testing, nothing appeared in unstable or experimental yet. So I leave a sign of live here at least...)

Revision history for this message
Jendrik Seipp (jendrikseipp) wrote : Re: [Bug 771396] Re: Data loss by running multiple instances

Unfortunately I don't have a deb for you. But testing is very easy. Open
a terminal and enter the following:

bzr branch lp:~jendrikseipp/rednotebook/next rednotebook
cd rednotebook
./run.sh

Does it work?

Revision history for this message
Jendrik Seipp (jendrikseipp) wrote :

Fixed in version 1.2

Changed in rednotebook:
status: In Progress → Fix Released
Revision history for this message
Dolgener (dolgener) wrote :

Dear Jendrik,

meanwhile we have version 1.4 running, and is has still no limitation to one running instance. Regularly data is lost every few days, because unwittingly two (or more) instances of RedNotebook are running on the same "dataDir" (~/.rednotebook/data). The last closing instance then overwrites everything. It's a great pity, this bid data trap contradicts to all the qualities of that otherwise perfect notebook.

And I don't find not even an option to prevent that optionally in ~/.rednotebook/configuration.cfg (even though IMHO multiple editing should be prevented by default).

To check this, just put
 bash -c "rednotebook &" ; bash -c "rednotebook &" ; rednotebook &
on a commandline. You'll get three running instances without any warning.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.