Bugs and Issues - LSS

Fatal Python error

David

When launching argodejo, the UI comes up and then closes. This is my console output from running agordejo -V:

INFO:engine.start:import
INFO:engine.start:Python Version 3.8.5 (default, Sep 5 2020, 10:50:12)
[GCC 10.2.0]
INFO:engine.start:Compiled prefix found: /usr
INFO:engine.start:Compiled version: True
INFO:engine.start:PATHS: {'root': '', 'bin': '/usr/bin', 'doc': '/usr/share/doc/agordejo', 'desktopfile': '/usr/share/applications/agordejo.desktop', 'share': '/usr/share/agordejo', 'templateShare': '/usr/share/agordejo/template', 'sessionRoot': None, 'url': None, 'startupSession': None, 'startHidden': False, 'continueLastSession': False}
INFO:qtgui.mainwindow:import
INFO:qtgui.mainwindow:PyQt Version: 5.15.1
INFO:engine.api:import
INFO:engine.nsmservercontrol:import
INFO:engine.watcher:import
INFO:engine.findprograms:import
INFO:engine.findicons:import
INFO:qtgui.systemtray:import
INFO:qtgui.addclientprompt:import
INFO:qtgui.eventloop:import
INFO:qtgui.usermanual:import
INFO:qtgui.sessiontreecontroller:import
INFO:qtgui.projectname:import
INFO:qtgui.opensessioncontroller:import
INFO:qtgui.descriptiontextwidget:import
INFO:qtgui.quicksessioncontroller:import
INFO:qtgui.quickopensessioncontroller:import
INFO:qtgui.waitdialog:import
INFO:qtgui.settings:import
INFO:qtgui.mainwindow:Agordejo: Language set to English
INFO:qtgui.mainwindow:Init MainWindow
INFO:qtgui.mainwindow:Program icons path: ['/usr/share/icons', ':/icons'], hicolor
INFO:qtgui.settings:Binary search paths: /home/david/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
INFO:qtgui.sessiontreecontroller:Full View Session Chooser ready
INFO:qtgui.opensessioncontroller:Full View Open Session Controller ready
INFO:qtgui.quicksessioncontroller:Quick Session Chooser ready
INFO:qtgui.quickopensessioncontroller:Quick Open Session Controller ready
INFO:qtgui.mainwindow:Trying to restore cached program database
INFO:qtgui.mainwindow:First run. Instructing engine to build program database
INFO:qtgui.eventloop:Starting fast qt event loop
INFO:qtgui.eventloop:Starting slow qt event loop
INFO:engine.api:Start Engine
INFO:engine.nsmservercontrol:Testing if another non-specific Agordejo is running.
INFO:engine.nsmservercontrol:No other non-specific Agordejo found. Starting GUI
INFO:engine.nsmservercontrol:Generated our own free NSM_URL to start a server @ ('0.0.0.0', 44245)
INFO:engine.nsmservercontrol:Testing if a server is running @ ('0.0.0.0', 44245)
INFO:engine.nsmservercontrol:No external nsmd found (we tested if port is closed) @ ('0.0.0.0', 44245)
INFO:engine.nsmservercontrol:[wait for answer]: Sending /osc/ping: []
INFO:engine.nsmservercontrol:Suspending receiving async mode.
[nsmd] ../src/nsmd.cpp:2439 main(): Using OSC port 44245
[nsmd] ../src/nsmd.cpp:2494 main(): Session root is: /home/david/NSM Sessions
[nsmd] ../src/Endpoint.cpp:205 init(): Creating OSC server
NSM_URL=osc.udp://manjaropc:44245/
INFO:engine.nsmservercontrol:[wait from /osc/ping] Received /reply: ['/osc/ping']
INFO:engine.nsmservercontrol:Resuming receiving async mode.
INFO:engine.nsmservercontrol:nsmd is ready @ ('0.0.0.0', 44245)
INFO:engine.nsmservercontrol:[wait for answer]: Sending /nsm/gui/gui_announce: []
INFO:engine.nsmservercontrol:Suspending receiving async mode.
[nsmd] ../src/nsmd.cpp:2286 announce_gui(): A GUI announced to us from the URL osc.udp://127.0.0.1:45505/
[nsmd] ../src/nsmd.cpp:2309 announce_gui(): Informing GUI that no session is running by sending two empty strings
[nsmd] ../src/nsmd.cpp:2338 announce_gui(): Registration with GUI complete

WARNING:engine.nsmservercontrol:Waiting for /nsm/gui/session/root from nsmd, but got: /nsm/gui/gui_announce with ['hi']. Adding to queue for later.
INFO:engine.nsmservercontrol:[wait from /nsm/gui/gui_announce] Received /nsm/gui/session/root: ['/home/david/NSM Sessions']
INFO:engine.nsmservercontrol:Resuming receiving async mode.
INFO:engine.nsmservercontrol:Got 'hi'. We are now the registered nsmd GUI as per our initial /nsm/gui/gui_announce
INFO:engine.nsmservercontrol:Force processing queue
INFO:engine.nsmservercontrol:Session closed or never started. Choose-A-Session mode.
INFO:engine.nsmservercontrol:Ended force processing queue
INFO:engine.nsmservercontrol:nsmservercontrol init is complete. Ready for event loop
INFO:engine.watcher:Requestion our own copy of the session list. Don't worry about the apparent redundant call :)
INFO:engine.nsmservercontrol:Exporting sessions to dict. Will call blocking list sessions next
INFO:engine.nsmservercontrol:Requesting project list from session server in blocking mode
INFO:engine.nsmservercontrol:Suspending receiving async mode.
[nsmd] ../src/nsmd.cpp:1712 osc_list(): Listing sessions
INFO:engine.nsmservercontrol:Resuming receiving async mode.
INFO:engine.api:Send initial cached data to GUI.
INFO:engine.nsmservercontrol:Exporting sessions to dict. Will call blocking list sessions next
INFO:engine.nsmservercontrol:Requesting project list from session server in blocking mode
INFO:engine.nsmservercontrol:Suspending receiving async mode.
[nsmd] ../src/nsmd.cpp:1712 osc_list(): Listing sessions
INFO:engine.nsmservercontrol:Resuming receiving async mode.
INFO:qtgui.quicksessioncontroller:Rebuilding session buttons
INFO:engine.nsmservercontrol:Exporting sessions to dict. Will call blocking list sessions next
INFO:engine.nsmservercontrol:Requesting project list from session server in blocking mode
INFO:engine.nsmservercontrol:Suspending receiving async mode.
[nsmd] ../src/nsmd.cpp:1712 osc_list(): Listing sessions
INFO:engine.nsmservercontrol:Resuming receiving async mode.
INFO:engine.nsmservercontrol:Exporting sessions to dict. Will call blocking list sessions next
INFO:engine.nsmservercontrol:Requesting project list from session server in blocking mode
INFO:engine.nsmservercontrol:Suspending receiving async mode.
[nsmd] ../src/nsmd.cpp:1712 osc_list(): Listing sessions
INFO:engine.nsmservercontrol:Resuming receiving async mode.
INFO:engine.watcher:Watcher resumed
INFO:engine.api:Engine start complete
INFO:qtgui.mainwindow:Restoring window settings, geometry and recently opened session
INFO:qtgui.mainwindow:Starting visible
INFO:qtgui.mainwindow:Show
INFO:qtgui.mainwindow:Restoring window settings, geometry and recently opened session
INFO:qtgui.mainwindow:Ready for user input. Exec_ Qt.
INFO:qtgui.mainwindow:Asking api to generate program and icon database while waiting
INFO:qtgui.waitdialog:Starting blocking message for <compiled_function buildSystemPrograms at 0x7f424c03d8b0>
INFO:qtgui.waitdialog:Thread running <compiled_function WaitDialog.__init__.<locals>.wrap at 0x7f424c15e640>
INFO:engine.findprograms:Building launcher database. This might take a minute
WARNING:engine.findprograms:Bad desktop file. Skipping: /usr/share/applications/discord.desktop
INFO:engine.findicons:Building icon cache from scratch
INFO:engine.findicons:Icon cache complete
ERROR:engine.start:Caught crash in execpthook. Trying too execute atexit anyway
Traceback (most recent call last):
File "/usr/bin/qtgui/waitdialog.py", line 47, in run
File "/usr/bin/qtgui/waitdialog.py", line 66, in wrap
File "/usr/bin/engine/api.py", line 216, in buildSystemPrograms
File "/usr/bin/engine/findprograms.py", line 195, in build
File "/usr/bin/engine/findprograms.py", line 229, in _build
TypeError: 'str' object does not support item assignment
INFO:engine.nsmservercontrol:Stopped our own server with return code 0
QObject::killTimer: Timers cannot be stopped from another thread
QObject::~QObject: Timers cannot be stopped from another thread
QObject::killTimer: Timers cannot be stopped from another thread
QObject::~QObject: Timers cannot be stopped from another thread
QtDBus: cannot relay signals from parent QObject(0x5603d6bdaa20 "") unless they are emitted in the object's thread QThread(0x5603d660f040 ""). Current thread is WaitThread(0x5603d6c430f0 "").
QtDBus: cannot relay signals from parent QObject(0x5603d6bdaa20 "") unless they are emitted in the object's thread QThread(0x5603d660f040 ""). Current thread is WaitThread(0x5603d6c430f0 "").
QtDBus: cannot relay signals from parent QObject(0x5603d6bd6d40 "") unless they are emitted in the object's thread QThread(0x5603d660f040 ""). Current thread is WaitThread(0x5603d6c430f0 "").
QBasicTimer::stop: Failed. Possibly trying to stop from a different thread
QBasicTimer::stop: Failed. Possibly trying to stop from a different thread
QBasicTimer::stop: Failed. Possibly trying to stop from a different thread
QObject::startTimer: Timers cannot be started from another thread
malloc(): unaligned tcache chunk detected
Fatal Python error: Aborted

Current thread 0x00007f41db5ef640 (most recent call first):
<no Python frame>

Thread 0x00007f4255029740 (most recent call first):
Aborted (core dumped)

RSS Only moderators or members can reply to this. Sign-in if you are a moderator or member in order to post.

Replies

#1. David

I am running the binary from the archlinux respository on Manjaro Linux.

#2. nils

Me and others have seen this in the past but now are unable to replicate.
Maybe it "resolved itself". I'll do a new release (0.2) and please check if that happens again. The bug report stays open for the time being.

#3. diegodorado

Same happens to me. I think it may be related to nvidia drivers, because it stopped working after I installed them.

#4. gagrilli

Same behaviour here, just after the icon cache finishes

Traceback (most recent call last):
File "/usr/local/bin/qtgui/waitdialog.py", line 47, in run
File "/usr/local/bin/qtgui/waitdialog.py", line 66, in wrap
File "/usr/local/bin/engine/api.py", line 216, in buildSystemPrograms
File "/usr/local/bin/engine/findprograms.py", line 195, in build
File "/usr/local/bin/engine/findprograms.py", line 229, in _build
TypeError: 'str' object does not support item assignment

After that , slightly different output, I believe distro related:

INFO:engine.nsmservercontrol:Stopped our own server with return code 0
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt.
You must not let any exception whatsoever propagate through Qt code.
If that is not possible, in Qt 5 you must at least reimplement
QCoreApplication::notify() and catch all exceptions there.

QObject::~QObject: Timers cannot be stopped from another thread

Compiled from source, release 0.2.0 , on opensuse Leap 15.2, with binary nvidia drivers

#5. lss

This is a strange error. I don't know yet what is happening.
I can say with confidence that the code cited in the error is correct: At no time is there a string ("str") that gets an item assigned.

The error description must be a symptom of another error. I am currently trying to rule out error sources for another release.

#6. lss

I have made a new test release where I hope this is fixed. You need to compile it yourself though, which is described in the README. (configure, make, make install)

https://laborejo.org/test-releases/

Using the git version is the same.

It would be nice if you could give me an update with this new test-release.

#7. gagrilli

Hi, tried new test-release from the tarball.
Same sysem, same combination of pro-requisites. Same nvidia binay blob.
Compiled fine.
Executing from build dir gives:

[nsmd] ../src/nsmd.cpp:2544 main(): Using OSC port 58482
[nsmd] ../src/nsmd.cpp:2603 main(): Session root is: /home/gagrilli/NSM Sessions
[nsmd] ../src/Endpoint.cpp:205 init(): Creating OSC server
NSM_URL=osc.udp://CORE:58482/
[nsmd] ../src/nsmd.cpp:2373 announce_gui(): A GUI announced to us from the URL osc.udp://127.0.0.1:43105/
[nsmd] ../src/nsmd.cpp:2396 announce_gui(): Informing GUI that no session is running by sending two empty strings
[nsmd] ../src/nsmd.cpp:2425 announce_gui(): Registration with GUI complete

[nsmd] ../src/nsmd.cpp:1716 osc_list(): Listing sessions
[nsmd] ../src/nsmd.cpp:1716 osc_list(): Listing sessions
[nsmd] ../src/nsmd.cpp:1716 osc_list(): Listing sessions
[nsmd] ../src/nsmd.cpp:1716 osc_list(): Listing sessions
ERROR:engine.start:Caught crash in execpthook. Trying too execute atexit anyway
Traceback (most recent call last):
File "/home/gagrilli/compile/AUDIO/LABOREJO/agordejo-0.2.0/qtgui/waitdialog.py", line 47, in run
self.longRunningFunction()
File "/home/gagrilli/compile/AUDIO/LABOREJO/agordejo-0.2.0/qtgui/waitdialog.py", line 66, in wrap
longRunningFunction(self.progressInfo)
File "/home/gagrilli/compile/AUDIO/LABOREJO/agordejo-0.2.0/engine/api.py", line 216, in buildSystemPrograms
programDatabase.build(progressHook)
File "/home/gagrilli/compile/AUDIO/LABOREJO/agordejo-0.2.0/engine/findprograms.py", line 195, in build
self.programs = self._build() #builds iconPaths as side-effect
File "/home/gagrilli/compile/AUDIO/LABOREJO/agordejo-0.2.0/engine/findprograms.py", line 228, in _build
assert type(entry) is dict, type(entry)
AssertionError: <class 'str'>
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt.
You must not let any exception whatsoever propagate through Qt code.
If that is not possible, in Qt 5 you must at least reimplement
QCoreApplication::notify() and catch all exceptions there.

QObject::~QObject: Timers cannot be stopped from another thread.

#8. lss

I created another test release under the same file name
https://www.laborejo.org/test-releases/agordejo-0.2.0.tar.gz

I expect one of these to happen now:

a) Everything works
b) Everything works but there are installed programs missing in the program-starter
c) It fails again but at least prints out more useful information

#9. gagrilli

I just got round to trying the last test release.

Happy to say that we have result a) Everything works

But, a couple of curious points

-- I see you bumped python version to 3.8
Unfortunately, my standard repo python3 is only 3.6, so initially I just ran from the extacted tarball. No complains

All the programs that I see in the NSM github wiki (and are installed) appeared.

Session saved, loaded and closed as expected. Aborting also. No complaining at sterr/stdout. I did not test everything , but things mostly seem to work.

I then pushed my luck and edited configure sctipt to require python 3.6 . Produce a Makefile. Installed globally. Executed fine. Re-scan the database. Things work.

-- I have the old AlsaModularSynth (http://alsamodular.sourceforge.net/) installed from source. It found it, but listed as the name for
amsynth (this one: https://amsynth.github.io )

I opened it in a session, and works correctly, even altering its menu to "import" a patch in session, not "open" it. After many close/open/abort actions for the whole thing for tests etc. I noticed I have twice on the list the amsynth one, and AlsamodularSynth (binary name ams) nowhere to be found. Yet when I open the session , sure enough it's there.

Overall, looks very nice and clean, a much needed addition to the linux audio space. You just deprived me of some sleep time, thanks (!)

Can I do smth else to troubleshoot, help etc?

#10. lss

Thank you for the good news.

That AMS situation is not new. I was under the impression I fixed that already, but obviously not :)

Python 3.8 was because of this:
https://laborejo.org/bugs/error-when-copying-session

ERROR:engine.nsmservercontrol:copytree() got an unexpected keyword argument 'dirs_exist_ok

Try to copy a session, in full view mode and rightclick on a session name, and this will happen, I fear.

#11. gagrilli

Yes, can reproduce the bug. Unfortunately, running multiple python versions atm is beyond my ability, or time. In any case, I don' really get the "copy session" functionality. Is it smth so that the user can manipulate NSM sessions with? Then I suppose I can use the shell...
Does the rest not require 3.8 ? I can live with it, I guess.

#12. lss

The rest does not require 3.8.
You are correct with the rest of your assumptions.

I will move this issue into the [Done] section now since the bug was solved.