jendrikseipp / rednotebook

RedNotebook is a cross-platform journal
https://rednotebook.app
GNU General Public License v2.0
488 stars 111 forks source link

Current day's content overwritten when opening another journal #421

Closed rcmueller closed 5 years ago

rcmueller commented 5 years ago

Versions

RedNotebook version (make sure you have the latest version): 2.8

Operating system and version: Xubuntu 16.04.5 LTS

Expected behavior

Open other journal should show the actual content of this journal.

Actual behavior

Open other journal overwrites content with content of previously opened journal (current day).

Steps to reproduce the behavior

I am using three different journals. When switching from one to another (Journal -> Open -> select folder containing *.txt files), the content of the newly opened journal is overwritten with the content of the previously opened journal.

Log output when reproducing behavior

2018-12-18 08:10:50,355 INFO Writing log to file "/home/rmueller/.rednotebook/rednotebook.log" 2018-12-18 08:10:50,355 INFO System encoding: utf-8 2018-12-18 08:10:50,355 INFO Language code: en_AU 2018-12-18 08:10:50,451 INFO Running in portable mode: False 2018-12-18 08:10:50,451 INFO First Start: False 2018-12-18 08:10:50,452 INFO RedNotebook version: 2.8 2018-12-18 08:10:50,456 INFO System info: machine: x86_64, platform: Linux-4.4.0-66-generic-x86_64-with-Ubuntu-16.04-xenial, processor: x86_64, python_version: 3.5.2, release: 4.4.0-66-generic, system: Linux, GTK: (3, 18, 9), Glib: (2, 47, 3), PyGObject: (3, 20, 0), YAML: 3.11 2018-12-18 08:10:50,765 DEBUG Default font: Noto Sans 9 2018-12-18 08:10:50,765 DEBUG Default size: 9.0 2018-12-18 08:10:50,881 INFO Cloud ignore list: ['#tags', 'and', 'comma', 'filter', 'separated', 'these', 'words'] 2018-12-18 08:10:50,881 INFO Cloud include list: ['job', 'mtv', 'play', 'spam', 'work'] 2018-12-18 08:10:50,881 DEBUG Start compiling regexes 2018-12-18 08:10:50,882 DEBUG Finished 2018-12-18 08:10:50,895 DEBUG Tray icon visible: False 2018-12-18 08:10:50,896 INFO Opening journal at '/home/rmueller/nextcloud/Documents/rednotebook_data/PhD' 2018-12-18 08:10:50,897 DEBUG Starting to load files in dir "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD" 2018-12-18 08:10:50,898 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2016-09.txt" 2018-12-18 08:10:50,899 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2016-10.txt" 2018-12-18 08:10:50,900 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2016-11.txt" 2018-12-18 08:10:50,901 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2016-12.txt" 2018-12-18 08:10:50,902 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2017-01.txt" 2018-12-18 08:10:50,903 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2017-02.txt" 2018-12-18 08:10:50,904 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2017-03.txt" 2018-12-18 08:10:50,905 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2017-04.txt" 2018-12-18 08:10:50,906 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2017-05.txt" 2018-12-18 08:10:50,908 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2017-06.txt" 2018-12-18 08:10:50,909 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2017-07.txt" 2018-12-18 08:10:50,911 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2017-08.txt" 2018-12-18 08:10:50,912 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2017-09.txt" 2018-12-18 08:10:50,913 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2017-10.txt" 2018-12-18 08:10:50,914 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2017-11.txt" 2018-12-18 08:10:50,915 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2017-12.txt" 2018-12-18 08:10:50,916 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2018-01.txt" 2018-12-18 08:10:50,918 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2018-02.txt" 2018-12-18 08:10:50,919 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2018-03.txt" 2018-12-18 08:10:50,920 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2018-04.txt" 2018-12-18 08:10:50,921 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2018-05.txt" 2018-12-18 08:10:50,923 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2018-06.txt" 2018-12-18 08:10:50,924 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2018-07.txt" 2018-12-18 08:10:50,925 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2018-08.txt" 2018-12-18 08:10:50,927 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2018-09.txt" 2018-12-18 08:10:50,927 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2018-10.txt" 2018-12-18 08:10:50,928 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2018-11.txt" 2018-12-18 08:10:50,930 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD/2018-12.txt" 2018-12-18 08:10:50,931 DEBUG Finished loading files in dir "/home/rmueller/nextcloud/Documents/rednotebook_data/PhD" 2018-12-18 08:10:51,022 INFO Connected Signals: [<Signals.SIGHUP: 1>, <Signals.SIGINT: 2>, <Signals.SIGQUIT: 3>, <Signals.SIGABRT: 6>, <Signals.SIGTERM: 15>, <Signals.SIGTSTP: 20>] 2018-12-18 08:10:51,023 DEBUG Start took 0.5714375972747803 seconds 2018-12-18 08:10:51,023 DEBUG Trying to enter the gtk main loop 2018-12-18 08:10:51,164 DEBUG Update the cloud 2018-12-18 08:10:51,314 DEBUG Cloud updated 2018-12-18 08:10:51,316 INFO Last backup was made 12 days ago 2018-12-18 08:10:55,840 INFO Nothing to save 2018-12-18 08:10:55,841 INFO Opening journal at '/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI' 2018-12-18 08:10:55,845 DEBUG Starting to load files in dir "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI" 2018-12-18 08:10:55,846 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2017-02.txt" 2018-12-18 08:10:55,848 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2017-03.txt" 2018-12-18 08:10:55,854 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2017-04.txt" 2018-12-18 08:10:55,857 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2017-05.txt" 2018-12-18 08:10:55,859 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2017-06.txt" 2018-12-18 08:10:55,861 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2017-07.txt" 2018-12-18 08:10:55,862 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2017-08.txt" 2018-12-18 08:10:55,863 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2017-11.txt" 2018-12-18 08:10:55,864 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2017-12.txt" 2018-12-18 08:10:55,864 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2018-01.txt" 2018-12-18 08:10:55,866 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2018-02.txt" 2018-12-18 08:10:55,867 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2018-03.txt" 2018-12-18 08:10:55,868 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2018-04.txt" 2018-12-18 08:10:55,868 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2018-07.txt" 2018-12-18 08:10:55,870 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2018-08.txt" 2018-12-18 08:10:55,871 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2018-10.txt" 2018-12-18 08:10:55,872 DEBUG Loading file "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2018-11.txt" 2018-12-18 08:10:55,873 DEBUG Finished loading files in dir "/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI" 2018-12-18 08:10:55,917 DEBUG Update the cloud 2018-12-18 08:10:55,935 DEBUG Cloud updated 2018-12-18 08:10:58,100 DEBUG Main frame destroyed 2018-12-18 08:10:58,108 INFO Wrote file /home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI/2018-12.txt 2018-12-18 08:10:58,109 INFO The content has been saved to /home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI 2018-12-18 08:10:58,110 INFO The content has been saved to '/home/rmueller/nextcloud/Documents/rednotebook_data/HiWi_HCI' 2018-12-18 08:10:58,112 INFO Configuration has been saved to /home/rmueller/.rednotebook/configuration.cfg 2018-12-18 08:10:58,112 INFO Goodbye! 2018-12-18 08:10:58,116 INFO Peak memory: 151577960 KiB

Geethack commented 5 years ago

I have the same problem on Xubuntu 18.04 LTS

istlota commented 5 years ago

A daily journal which overwrites previous entries is worse than no journal at all. So, when I also began experienced this bug, I began using a different journaling app. I typically run Ubuntu's Software Updater once or more a week. So my assumption is that, at some point, an apt-get update to rednotebook or some package it depends upon introduced this overwrite bug.

Today, I decided to try rednotebook again and see if the bug had been fixed. The About box says I am running v.2.7. I thought the latest version is v2.8? I opened a terminal on my computer running Ubuntu v18.04.LTS bionic, and executed the apt-get commands to install the latest rednotebook stable version from the repository, but got back a message that I was already running the latest version. Note that rednotebook --version responds that I am running v2.7, not v2.8 .

I created a new journal named Test, added some irrelevant data to today's entry, then opened another journal I had been using named Health. As before, the irrelevant data I had previously entered in the Test journal was now overwritten into whatever was in today's entry for the Health journal. Ergo, the problem remains.

jendrikseipp commented 5 years ago

Thanks for reporting this! Until this is fixed, please close RedNotebook before opening a different journal. To open a different journal, use the command line and pass the journal folder to RedNotebook, i.e., "rednotebook /path/to/my/journal".

gde061 commented 5 years ago

I'm posting to (1) confirm this is an issue experienced in the latest version of 2.8 on the rednotebook/stable repo I just added after visiting the app's website, (2) express my surprise that such a major bug hasn't been fixed since December, despite at least one other user pointing out that this is a mission critical "feature" -- imagine the user who keeping a daily work journal, and on the last day of the month, switches to make a personal journal entry and as a result loses all their month of work entries. IMHO there is no way this should have made it through any kind of testing cycle, and the moment it was reported, the code should have been rolled back. Sorry if this sounds preachy, but it's almost 3 months since this was reported. I understand your work around above, but what user is going to dig in Github to learn this BEFORE they've lost a journal and are scrambling through backups?! Sure, if it's an unstable release, but not in a stable release. And (3) this used to work properly in 1.10, which is the "out of date" version in the official Ubuntu repos.

diptopratyaksa commented 5 years ago

I began to like this until this serious bug effecting rudimentary features namely save and open. You just keep getting new journal overwriting your old ones, it's very dangerous when you got important info saved there.

istlota commented 5 years ago

This MAJOR bug has not been addressed for months. Obviously, the simplest fix would be for whoever is maintaining the code to just release a new version which is actually the last version BEFORE this problem was introduced. But, my guess is that no one is maintaining the code anymore.

I gave up waiting on a fix, and now use SplinterWare's Daily Diary Professional instead. But that is a Windows app, I do NOT do Windows. and iDD does not run without problems in a Wine bottle.

On Mon, Mar 11, 2019 at 5:21 AM diptopratyaksa notifications@github.com wrote:

I began to like this until this serious bug effecting rudimentary features namely save and open. You just keep getting new journal overwriting your old ones, it's very dangerous when you got important info saved there.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jendrikseipp/rednotebook/issues/421#issuecomment-471462570, or mute the thread https://github.com/notifications/unsubscribe-auth/AjS2htBIpi6SaPDOvVjV7d_vBDyjEc45ks5vViADgaJpZM4ZXugy .

gde061 commented 5 years ago

I went through the changelog to see if there was an obvious point between 1.11 and 2.18 where this was messed with. There are only a handful of changes that affected the open/save functionality. But there was some "port to Python 3.x" stuff that probably affected everything. My guess.. and I'm just guessing... is that it was an upstream change that in Python 3 vs 2 that trickled down into the code. Unfortunately I'm sortof a novice with github so I have trouble loading up the project. How do you download the source code and get it into something like Eclipse? And what does it take to get added to the maintainer list?

jendrikseipp commented 5 years ago

Most likely the bug was introduced when we switched to using GtkSourceView for the editor from version 2.6.1 to version 2.7. When I find time to work on RedNotebook, obviously I'll look into fixing this bug first. If someone wants to help out with fixing the bug, I'd be happy about a pull request.

jendrikseipp commented 5 years ago

The issue should now be fixed. It would be great if you could test the new version 2.8.1 that I just released. It might take a while until the Windows installer is ready though.

jendrikseipp commented 5 years ago

Could someone please try out this new Windows installer (https://ci.appveyor.com/api/buildjobs/pfytba9k8xdk4poo/artifacts/rednotebook.exe) and report whether the app works as expected?

istlota commented 5 years ago

I tested the v2.8.1 source on my Dell 9010 desktop running the latest stable version of Ubuntu (v18.04.2 LTS):

1) I downloaded the RedNotebook v2.1.1 source tarball from --> https://rednotebook.sourceforge.io/downloads.html 2) I extracted the source into its own unique folder. 3) I opened a terminal in that folder and ran ./run. 4) I also opened my previously installed v2.7 of RedNotebook. 5) Since I had both versions of RedNotebook up and running, as I compared the two, I would check Help->About to keep track of which version of RedNotebook I was using at any particular time. 6) Comparing the two versions, I still saw the overwriting problem with v2.7, but no longer saw the problem with v2.8.1.

You fixed it. Thanks, Dude!

On Sun, Mar 17, 2019 at 12:10 PM Jendrik Seipp notifications@github.com wrote:

The issue should now be fixed. It would be great if you could test the new version 2.8.1 that I just released. It might take a while until the Windows installer is ready though.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jendrikseipp/rednotebook/issues/421#issuecomment-473680246, or mute the thread https://github.com/notifications/unsubscribe-auth/AjS2hr2sLXRCRMDMGZpkU6U6D269idlsks5vXmkSgaJpZM4ZXugy .

rcmueller commented 5 years ago

Hi Jendrik,

2.8.1 on Xubuntu 16.04.6 works for me. I can switch between journals without any content being overwritten. Thank you!

The issue should now be fixed. It would be great if you could test the new version 2.8.1 that I just released. It might take a while until the Windows installer is ready though.