goodmind / sunflower-fm

Automatically exported from code.google.com/p/sunflower-fm
GNU General Public License v3.0
1 stars 0 forks source link

Cannot Open Sunflower #287

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Find Sunflower on menu and click on it.
2.
3.

What is the expected output? What do you see instead?
Nothing happens

What version of the product are you using? On what operating system?
Not sure, but assume it is the latest one.

Please provide any additional information below.
Terminal attempt show following info:
Traceback (most recent call last):
  File "/usr/share/sunflower/application/main.py", line 29, in <module>
    app = MainWindow()
  File "/usr/share/sunflower/application/gui/main_window.py", line 702, in __init__
    self._restore_window_position()
  File "/usr/share/sunflower/application/gui/main_window.py", line 1405, in _restore_window_position
    self._paned.set_position(section.get('handle_position'))
TypeError: an integer is required
Failed running with python2.7

Original issue reported on code.google.com by tech@frontrowcomputer.com on 21 Apr 2013 at 8:33

GoogleCodeExporter commented 9 years ago
Found version number; 0.1a.55-3.1.

Thanks.

Original comment by tech@frontrowcomputer.com on 21 Apr 2013 at 8:35

GoogleCodeExporter commented 9 years ago
Are you using repository version? Or AUR?

Original comment by MeanEYE.rcf on 22 Apr 2013 at 12:49

GoogleCodeExporter commented 9 years ago
Issue 289 has been merged into this issue.

Original comment by MeanEYE.rcf on 22 Apr 2013 at 12:07

GoogleCodeExporter commented 9 years ago

Original comment by MeanEYE.rcf on 22 Apr 2013 at 12:15

GoogleCodeExporter commented 9 years ago
Sorry, I forgot the details.  I am using Fedora 18 with Xfce 4.10.0, and I got 
the FM from the repo.

Original comment by tech@frontrowcomputer.com on 22 Apr 2013 at 1:22

GoogleCodeExporter commented 9 years ago
This affects me too on Fedora 18 with awesome window manager.

`sunflower --version` reports `Sunflower 0.1a (55)`

Original comment by robertm...@gmail.com on 22 Apr 2013 at 2:09

GoogleCodeExporter commented 9 years ago
Yeah, I fixed the issue. It will land in next version. If you wish to fix it, 
you can add handle_position value to the ~/.config/sunflower/windows.json file 
under 'main' section.

Original comment by MeanEYE.rcf on 22 Apr 2013 at 2:11

GoogleCodeExporter commented 9 years ago
Thanks much.

Original comment by tech@frontrowcomputer.com on 22 Apr 2013 at 2:45

GoogleCodeExporter commented 9 years ago
Can you tell me what is/was in the config file? There should only be a number 
but this issue clearly states otherwise.

Original comment by MeanEYE.rcf on 22 Apr 2013 at 2:47

GoogleCodeExporter commented 9 years ago
workaround
-----------
file "/home/user/.config/sunflower/windows.json

OLD
===
{
    "main": {
        "geometry": "960x550+319+124",
        "handle_position": null,    <<<<============= here, it is this "null"
        "hide_on_close": false,
        "state": 1
    }
}

NEW
=================

{
    "main": {
        "geometry": "960x550+319+124",
        "handle_position": 1, <<<<============= here,  1 is a valid value
        "hide_on_close": false,
        "state": 1
    }
}

Original comment by rockcoga...@gmail.com on 22 Apr 2013 at 4:43

GoogleCodeExporter commented 9 years ago
Awesome. Thanks. I thought as much. Null is there by default as we don't store 
that information to config. But it turns out that in some strange case integer 
value was not changed. I've added a simple validity check which should solve 
this issue.

Thanks again for helping out!

Original comment by MeanEYE.rcf on 22 Apr 2013 at 4:45

GoogleCodeExporter commented 9 years ago
Hi,

repeated testing shows that to reproduce the bug,  Sunflower's window needs
to be maximized...

Thanks
Rock.

Original comment by rockcoga...@gmail.com on 22 Apr 2013 at 5:28

GoogleCodeExporter commented 9 years ago
Hm, so maximizing and returning it to normal will cause this behavior?

Original comment by MeanEYE.rcf on 22 Apr 2013 at 5:29

GoogleCodeExporter commented 9 years ago
Simply closing sunflower while maximized writes the "null" back in the file

Original comment by rockcoga...@gmail.com on 22 Apr 2013 at 5:39

GoogleCodeExporter commented 9 years ago
Which version do you have installed? I am having problems finding this issue, 
and I get the feeling we are not working with the same version.

Original comment by MeanEYE.rcf on 22 Apr 2013 at 5:46

GoogleCodeExporter commented 9 years ago
Hi

I installed from:

sunflower-0.1a.55-1.all.deb

I cannot come up with a sequence that causes the start up hang in 100% of
cases.

More like

I get a start up hang,  in 2 out of 3 restarts when the app is maximized

Even when not maximized on closing,  I sometimes (1 out of 5 times) get

"handle_position": null,

written into windows.json   that causes the hang

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

setting

"handle_position": 380,

is the current workaround

Thanks
Rock

Original comment by rockcoga...@gmail.com on 22 Apr 2013 at 6:15

GoogleCodeExporter commented 9 years ago
What do you mean "hang in 100% of cases". Application won't start?

Original comment by MeanEYE.rcf on 22 Apr 2013 at 6:17

GoogleCodeExporter commented 9 years ago
Yep.

I call "Application will not start"  a "start up hang".

Thanks!

Original comment by rockcoga...@gmail.com on 22 Apr 2013 at 6:36

GoogleCodeExporter commented 9 years ago
This is strange. Are there any errors in terminal?

Original comment by MeanEYE.rcf on 22 Apr 2013 at 6:37

GoogleCodeExporter commented 9 years ago
Successful Start
============
rock@rock-HP-Pavilion-dv7-Notebook-PC:~$ sunflower
/usr/share/sunflower/application/accelerator_group.py:81: GtkWarning:
IA__gtk_accel_group_connect: assertion `accel_key > 0' failed
  self._accel_group.connect_group(keyval, modifier, 0,
self._handle_activate)

Startup Hang
===========
rock@rock-HP-Pavilion-dv7-Notebook-PC:~$ sunflower
Traceback (most recent call last):
  File "/usr/share/sunflower/application/main.py", line 29, in <module>
    app = MainWindow()
  File "/usr/share/sunflower/application/gui/main_window.py", line 702, in
__init__
    self._restore_window_position()
  File "/usr/share/sunflower/application/gui/main_window.py", line 1405, in
_restore_window_position
    self._paned.set_position(section.get('handle_position'))
TypeError: an integer is required
Failed running with python2.7

Original comment by rockcoga...@gmail.com on 22 Apr 2013 at 6:42

GoogleCodeExporter commented 9 years ago
Looks like you had newer version. Do you know how to use Mercurial? Or if you 
don't mind I can make an archive of the newest version and send you that.

Original comment by MeanEYE.rcf on 22 Apr 2013 at 6:43

GoogleCodeExporter commented 9 years ago
Hi,

OK.

I can try " Mercurial"

I am a C/C++ programmer, and Oracle DBA at Oracle, switching 7 windows
boxes to Ubuntu  and Fedora (Oracle's distribution) Linux, so I do whatever
is needed.

Thanks,
Rock.

Original comment by rockcoga...@gmail.com on 22 Apr 2013 at 6:50

GoogleCodeExporter commented 9 years ago
Great. So if you can clone main repo from here 
https://code.google.com/p/sunflower-fm/source/checkout and then see how it 
behaves. 

Original comment by MeanEYE.rcf on 22 Apr 2013 at 8:14

GoogleCodeExporter commented 9 years ago
Hi,

I may be too busy to debug this Tuesday, but I should have time on
Wednesday.

Thanks,
Rock.

Original comment by rockcoga...@gmail.com on 23 Apr 2013 at 2:22

GoogleCodeExporter commented 9 years ago
Just installed from Fedora repo again and tried to start it, but got nothing.  
Tried in terminal window and got the following messages:
Traceback (most recent call last):
  File "/usr/share/sunflower/application/main.py", line 29, in <module>
    app = MainWindow()
  File "/usr/share/sunflower/application/gui/main_window.py", line 702, in __init__
    self._restore_window_position()
  File "/usr/share/sunflower/application/gui/main_window.py", line 1405, in _restore_window_position
    self._paned.set_position(section.get('handle_position'))
TypeError: an integer is required
Failed running with python2.7

Thanks.

Original comment by tech@frontrowcomputer.com on 19 May 2013 at 8:07

GoogleCodeExporter commented 9 years ago
Which version of Sunflower are you running @25.

Original comment by MeanEYE.rcf on 19 May 2013 at 8:08

GoogleCodeExporter commented 9 years ago
Hi, 

gui/main_window.py#1406:
  # restore handle position
  if section.has('handle_position'):
    position = section.get('handle_position')
    if isinstance(position, int):
      self._paned.set_position(section.get('handle_position'))
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

is this a typo in fix of this issue?(you already have variable "position")

P.S. sorry for my bad English

Original comment by morbi...@gmail.com on 21 May 2013 at 9:32

GoogleCodeExporter commented 9 years ago
Yeah it is a typo but I also don't know how program came to that line. In a 
sense that if position is None, it shouldn't be set. Can you check what's 
stored in 'handle_position' in ~/.config/sunflower/config.json. 

Original comment by MeanEYE.rcf on 21 May 2013 at 9:35

GoogleCodeExporter commented 9 years ago
in ~/.config/sunflower/window.json:
  "handle_position": null,

I can't reproduce bug on latest repo version (config part above generated by 
deb package version), i think you fix it when change 
=== gui/main_window.py#1377:
  section.set('handle_position', self._handle_position)
===

to 
===
if window_state == 0:  
  section.set('handle_position', self._paned.get_position())
===

"self._handle_position" property was not updated properly, but 
self._paned.get_position() always return correct value.
But I don't understand - why you save this option only if window state is not 
fulscreen and not maximized?

Original comment by morbi...@gmail.com on 22 May 2013 at 7:28

GoogleCodeExporter commented 9 years ago
It's a quite unpredictable behavior. I still didn't find what causes returning 
value to in some cases be set to None.

Original comment by MeanEYE.rcf on 22 May 2013 at 7:44

GoogleCodeExporter commented 9 years ago
I am using 0.1a.55-3.1

Original comment by tech@frontrowcomputer.com on 22 May 2013 at 4:50

GoogleCodeExporter commented 9 years ago
I just upgraded to 0.1a (56) and it is working okay now.

Thanks.

Original comment by tech@frontrowcomputer.com on 13 Jun 2013 at 6:29

GoogleCodeExporter commented 9 years ago
You are welcome!

Original comment by MeanEYE.rcf on 13 Jun 2013 at 6:29