Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if closing Gaupol while it's still loading a file #54

Closed
nohamelin opened this issue Jul 21, 2017 · 1 comment
Closed

Error if closing Gaupol while it's still loading a file #54

nohamelin opened this issue Jul 21, 2017 · 1 comment

Comments

@nohamelin
Copy link

Steps to reproduce:

  • Open a subtitle file from your file manager with gaupol.
  • A empty gaupol window is shown first; before it loads the contents of the file itself, close the window via Alt+F4.

Here I get the Gaupol error window with the next traceback:

File: /usr/lib/python3.5/site-packages/gaupol/applicationman.py
Line: 95
In: _on_activate

    self._init_application(opts, args)

File: /usr/lib/python3.5/site-packages/gaupol/applicationman.py
Line: 56
In: _init_application

    application.open_main(paths, opts.encoding)

File: /usr/lib/python3.5/site-packages/aeidon/deco.py
Line: 218
In: inner_wrapper

    return function(*args, **kwargs)

File: /usr/lib/python3.5/site-packages/gaupol/agents/open.py
Line: 271
In: open_main

    self.add_page(page)

File: /usr/lib/python3.5/site-packages/gaupol/agents/open.py
Line: 54
In: add_page

    self.emit("page-added", page)

File: /usr/lib/python3.5/site-packages/aeidon/observable.py
Line: 129
In: emit

    method(*((self,) + args + data))

File: /usr/lib/python3.5/site-packages/gaupol/agents/menu.py
Line: 266
In: _update_projects_menu

    action.set_state(str(i))

AttributeError: 'NoneType' object has no attribute 'set_state'

Environment

Platform: Linux-4.11.8-100.fc24.i686+PAE-i686-with-fedora-24-Twenty_Four
Locale: es_ES.utf_8

Versions

aeidon: 1.2
chardet: 2.2.1
enchant: 1.6.8
gaupol: 1.2
gstreamer: 1.8.3.0
gtk+: 3.20.10
pygobject: 3.20.1
python: 3.5.3

@otsaloma otsaloma added the bug label Jul 22, 2017
@otsaloma
Copy link
Owner

Thanks, confirmed. Not really a serious bug, I'll look into it sometime later.

The cause is probably that the main loop has updates queued that have become obsolete with closing of the window. Can be resolved with a raise SystemExit(0), but need to check that there's no problems with forced termination, i.e. not running the normal Gtk.Application shutdown process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants