jendrikseipp / rednotebook

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

RedNotebook doesn't start: TypeError: an integer is required #27

Closed jendrikseipp closed 7 years ago

jendrikseipp commented 7 years ago

Fresh brand new RedNotebook 1.1.3 from robin.powdarrmonkey.net repo.

Started once and became unwilling to start again after a reboot.

================================

The console output is:

myo@myo-desktop:~$ rednotebook /usr/share/themes/Kiwi/gtk-2.0/gtkrc:78: Murrine configuration option "scrollbar_color" is no longer supported and will be ignored. /usr/share/themes/Kiwi/gtk-2.0/gtkrc:82: Murrine configuration option "gradients" is no longer supported and will be ignored. INFO Writing log to file "/home/myo/.rednotebook/rednotebook.log" INFO Set default locale: "ru_RU" INFO Module glade found INFO Running in portable mode: False INFO First Start: False INFO RedNotebook version: 1.1.3 INFO System info: machine: i686, platform: Linux-2.6.32-30-generic-i686-with-Ubuntu-10.04-lucid, processor: , python_version: 2.6.5, release: 2.6.32-30-generic, system: Linux, GTK version: (2, 20, 1), PyGTK version: (2, 17, 0), Yaml version: 3.09 INFO Using webkit for previews: 1 Traceback (most recent call last): File "/usr/bin/rednotebook", line 12, in rednotebook.journal.main() File "/usr/share/rednotebook/rednotebook/journal.py", line 687, in main journal = Journal() File "/usr/share/rednotebook/rednotebook/journal.py", line 292, in init self.frame = MainWindow(self) File "/usr/share/rednotebook/rednotebook/gui/main_window.py", line 157, in init self.load_values_from_config() File "/usr/share/rednotebook/rednotebook/gui/main_window.py", line 653, in load_values_from_config self.main_frame.move(pos_x, pos_y) TypeError: an integer is required

================================

The strings in configuration.cfg that could possibly cause this error are:

mainFrameX=None mainFrameY=None

jendrikseipp commented 7 years ago

Original comment by a-ztech (2011-03-03T14:12:18Z):


Strange thing it is, but:

when I removed the trouble-causing parameters from the configuration file and restarted the application, it worked fine. When I restarted the application again, it worked flawlessly.

==============

Configuration.cfg

mainFrameX=0 mainFrameY=0

==============

Perhaps the program doesn't record these parameters well enough if it stays active when the system is being rebooted (that is, when you don't close it before rebooting or shutting down the computer)?

jendrikseipp commented 7 years ago

Original comment by a-ztech (2011-03-03T14:22:37Z):


Tried rebooting the system again after erasing these lines in configuration file. No glitch, got up flawlessly.

Sorry for possible false alarm.

jendrikseipp commented 7 years ago

Original comment by jendrikseipp (2011-03-03T18:16:20Z):


Let's see if anyone else has the same problem...

jendrikseipp commented 7 years ago

Original comment by a-ztech (2011-03-03T19:25:10Z):


Hm, it glitched after reboot - again. With the same evidence left. Since I've got RNB in my autorun list (rednotebook -m), I can't provide you a log of previous launch. So it really doesn't seem to be a random glitch.

If it could help, I have RNB 1.1.1 installed in Windows. Windows and Linux don't share config files, but they address to one journal file.

jendrikseipp commented 7 years ago

Original comment by a-ztech (2011-03-04T19:11:45Z):


Looks like it happens when the system (Xubuntu 10.04) is shut down when the main window is minimized to tray.

jendrikseipp commented 7 years ago

Original comment by jendrikseipp (2011-03-08T15:17:45Z):


I can't reproduce it here. Can you tell me the exact steps to reproduce the problem, please?

jendrikseipp commented 7 years ago

Original comment by a-ztech (2011-03-08T17:45:40Z):


Funny thing is, I cannot reproduce the problem right now, too. After two or three bugged starts, it continued to work well.

jendrikseipp commented 7 years ago

Original comment by rw-norris (2011-03-12T00:33:55Z):


This also happened to me. This seems to fix it for me:

rob@zaphod:~$ diff -u ~/main_window.py /home/share/rednotebook/rednotebook/gui/main_window.py --- /home/rob/main_window.py 2011-03-12 00:13:47.000000000 +0000 +++ /home/share/rednotebook/rednotebook/gui/main_window.py 2011-03-12 00:14:42.000000000 +0000 @@ -650,7 +650,8 @@ pos_x = config.read('mainFrameX', None) pos_y = config.read('mainFrameY', None) if pos_x is not None and pos_y is not None:

This is because somehow 'None' has been set into the configuration.cfg file.

Then when it restarts it reads in the config, but now it reads pos_x as a string of "None", hence it passes the 'is not None' test, as the string is not null or empty - and so goes on to try to use "None" in the window positioning and thus crashes.

Here was my failing log for info:

rob@zaphod:~$ more ~/.rednotebook/rednotebook.log.fail 2011-03-11 23:37:36,065 DEBUG sys.stdout logging level: 20 2011-03-11 23:37:36,066 INFO Writing log to file "/home/rob/.rednotebook/rednotebook.log" 2011-03-11 23:37:36,066 DEBUG LANG: en_GB.utf8 2011-03-11 23:37:36,066 DEBUG Default locale: en_GB 2011-03-11 23:37:36,066 INFO Set default locale: "en_GB" 2011-03-11 23:37:36,070 INFO Module glade found 2011-03-11 23:37:36,290 INFO Running in portable mode: False 2011-03-11 23:37:36,290 INFO First Start: False 2011-03-11 23:37:36,290 INFO RedNotebook version: 1.1.3 2011-03-11 23:37:36,297 INFO System info: machine: x86_64, platform: Linux-2.6.37-2-amd64-x86_64-with-debian-wheezy-sid, processor: , python_version: 2.6.6, release: 2.6.37- 2-amd64, system: Linux, GTK version: (2, 20, 1), PyGTK version: (2, 17, 0), Yaml version: 3.09 2011-03-11 23:37:36,758 INFO Using webkit for previews: 1 Traceback (most recent call last): File "/usr/bin/rednotebook", line 12, in rednotebook.journal.main() File "/usr/share/rednotebook/rednotebook/journal.py", line 687, in main journal = Journal() File "/usr/share/rednotebook/rednotebook/journal.py", line 292, in init self.frame = MainWindow(self) File "/usr/share/rednotebook/rednotebook/gui/main_window.py", line 157, in init self.load_values_from_config() File "/usr/share/rednotebook/rednotebook/gui/main_window.py", line 653, in load_values_from_config self.main_frame.move(pos_x, pos_y) TypeError: an integer is required

HTH.

jendrikseipp commented 7 years ago

Original comment by jendrikseipp (2011-03-12T02:05:19Z):


Thanks for the info, that helped a lot. I will try to fix this bug as soon as possible.

jendrikseipp commented 7 years ago

Original comment by jendrikseipp (2011-03-12T02:26:33Z):


The bug is fixed. Can you checkout trunk and confirm this?

jendrikseipp commented 7 years ago

Original comment by panurge (2011-03-12T13:14:40Z):


Same thing happens to me. I removed: "mainFrameX=none mainFrameY=none" and started again. It then worked the fine.

However, I noticed that on trying to quit Rednotebook, it remains in memory as a zombie process. I have to kill the parent Python to get rid of it.

jendrikseipp commented 7 years ago

Original comment by jendrikseipp (2011-03-12T13:23:18Z):


However, I noticed that on trying to quit Rednotebook, it remains in memory as a zombie process. I have to kill the parent Python to get rid of it.

Does that always happen? What system do you use? What do I have to do to reproduce it?

jendrikseipp commented 7 years ago

Original comment by panurge (2011-03-12T13:38:28Z):


Does that always happen? What system do you use? What do I have to do to reproduce it?

I work with Ubuntu 10.04 (well Mint Linux 9 actually). I simply terminated the application with Quit, opened the System Monitor and noticed the remaining of the process; I started the app again and left it three times with the same result. However, after rebooting the PC, Rednotebook did terminate correctly the first time; starting it again and leaving it left Rednotebook as a zombie process again.

jendrikseipp commented 7 years ago

Original comment by panurge (2011-03-12T13:44:13Z):


Will it help if I send you the rednotebook.log?

jendrikseipp commented 7 years ago

Original comment by jendrikseipp (2011-03-12T14:25:34Z):


Maybe ;) Does the zombie error still happen with the trunk version?

jendrikseipp commented 7 years ago

Original comment by panurge (2011-03-12T14:43:33Z):


Ok, here it is! I haven't tried yet the trunk version. I'm not really sure how to do this and where to download it.

jendrikseipp commented 7 years ago

Feel free to reopen if the error persists in the newest version.