Main window insensitive upon startup

Bug #616508 reported by jcfp
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
LottaNZB
Fix Released
Critical
Severin H
lottanzb (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: lottanzb

With a fresh lottanzb (no pre-existing config) all gui component are greyed out, every menu is unavailable, etc. Only resizing and closing the application works. Command line shows following error:

$ lottanzb
22:34:51 lottanzb.core Starting LottaNZB 0.6...
22:34:51 lottanzb.core.log An unhandled exception occurred:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/lottanzb/core/component.py", line 351, in load
    component = component_class(self)
  File "/usr/lib/pymodules/python2.6/lottanzb/backend/__init__.py", line 101, in __init__
    raise SessionNotSpecifiedError()
SessionNotSpecifiedError: No session has been selected.

22:34:51 lottanzb.core.log An unhandled exception occurred:
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/lottanzb/core/environ.py", line 84, in run_with_except_hook
    run_old(*args, **kw)
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/pymodules/python2.6/lottanzb/core/component.py", line 351, in load
    component = component_class(self)
  File "/usr/lib/pymodules/python2.6/lottanzb/backend/__init__.py", line 101, in __init__
    raise SessionNotSpecifiedError()
SessionNotSpecifiedError: No session has been selected.

Ubuntu lucid (with Xfce for display manager), Lottanzb 0.6~bzr1331~1224~201008102257~lucid1, Sab 0.5.3. Screenshot attached.

Revision history for this message
jcfp (jcfp) wrote :
Revision history for this message
jcfp (jcfp) wrote :

my bad, affects project not package.

Changed in lottanzb (Ubuntu):
status: New → Invalid
Severin H (severinh)
Changed in lottanzb:
status: New → Confirmed
importance: Undecided → High
importance: High → Critical
summary: - [0.6] Unusable gui: "SessionNotSpecifiedError: No session has been
- selected."
+ Main window insensitive upon startup
Changed in lottanzb:
milestone: none → 0.6
assignee: nobody → Severin Heiniger (lantash)
Revision history for this message
Severin H (severinh) wrote :

Hi jcfp,

thanks alot for reporting this bug! It's definitely something that will need to be fixed prior to the release of LottaNZB 0.6. I've also encountered it a few times. It might be caused by a race condition as it doesn't happen every time LottaNZB is launched. The main window is meant to be insensitive if and only if LottaNZB is not connected to SABnzbd yet.

For your information, the 'SessionNotSpecifiedError' should theoretically not be related to this bug, as it just indicates that LottaNZB hasn't been set up yet (local or remote session). The exception is raised in one thread (without being caught), but handled in another thread, which should cause an appropriate dialog to be displayed. It's odd though that the exception seems to have been raised twice. Also, one should probably prevent this exception from being shown in the output in the first place.

Revision history for this message
Severin H (severinh) wrote :

What I forgot to ask is whether you encounter this bug each time LottaNZB is launched. As a work-around, you should be able to change the configuration file ~/.config/lottanzb/lottanzb.conf by setting "active = local" in [backend.sessions].

Revision history for this message
jcfp (jcfp) wrote :

Did some more testing, found out that it makes a difference whether or not I delete the ~/.sabnzbd dir prior to launching lotta.

Starting without sab running, and without a pre-existing lotta config:

====

* with the usual ~/.sabnzbd in place: SessionNotSpecifiedError traceback appears twice, lotta never displays the session selection dialog and always behaves as seen in the screenshot attached to this bug.

* continuing from the above, setting "active = local" and trying to start lotta again the SessionNotSpecifiedError is gone, the traceback known from bug #608209 appears (twice!) and the app window is in the same zombie condition as before.

====

* now when I remove ~/.sabnzbd and ~/.config/lottanzb/* to clean up, and start lotta again a session selection window ("Start Downloading") appears in front of the zombie window and the app appears functional. The command line shows the SessionNotSpecifiedError traceback - but this time only once. In case I cancel that dialog the app exits cleanly but it has about a 50/50 chance of crashing with 'lottanzb: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.' the next time it's started.

* continuing from the above, If I insert "active = local" and start lotta again it appears to work, starts a sab instance; the gui is responsive and warns in bright orange that a server is needed.

====

Quite puzzling how having the sab dir in place influences the process and makes tracebacks appear twice, especially since I guess that lotta didn't try reading the ini yet (since that would have caused a traceback of its own with my normal sab config)...

The SessionNotSpecifiedError traceback is probably best to hide away, same for the one that appears if no server is defined in sab yet.

Revision history for this message
jcfp (jcfp) wrote :

Have by now also come across the completely unresponsive window you described in your reply. Nothing works, except minimizing or resizing the window (but not even exit). Unfortunately, no clue what triggers it yet.

Revision history for this message
Severin H (severinh) wrote :

Thanks alot for your in-depth explanation of the issue. It allowed me to reproduce it and track it down.

The duplicate SessionNotSpecifiedError actually indicates that a SessionNotSpecifiedError has been raised (which is perfectly fine), but there was an unhandled exception in one of the handlers dealing with this error (e.g. responsible for opening the 'Start Downloading' dialog). For some reason, the SessionNotSpecifiedError was displayed a second time instead of the actual error, making it impossible to know what actually went wrong. This has been fixed in the latest code. As soon as new daily builds have been released, such errors will be displayed properly on the console, allowing us to fix the bug for good.

As for the unresponsive window occurring after having connected successfully to SABnzbd: Even though I haven't experienced it for some time, it will still require some investigation.

Changed in lottanzb:
status: Confirmed → In Progress
Revision history for this message
Severin H (severinh) wrote :

In the current code, the main window is not made entirely insensitive anymore, but only those menu and toolbar items that can only be used when connected to SABnzbd. Besides, I haven't experienced a main window staying insensitive for quite a while.

If you still encounter unhandled exceptions, don't hesitate to report them.

Changed in lottanzb:
status: In Progress → Fix Committed
Severin H (severinh)
Changed in lottanzb:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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