nymea / nymea-app

A nymea frontend app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restarting nyea:core via system settings renders nymea:app unresponsive

hermanndetz opened this issue · comments

I'm doing some plugin development and therefore frequently restart nymea:core via the app to reload the plugins. After restarting the core, the app returns to the default view, but doesn't react to clicks anymore. Animations e.g. when hovering the main menu button on the upper right still run, but the button doesn't do anything anymore.

I'm fairly certain at the moment that this is not related to a broken plugin. But even if it was, the app shouldn't become unresponsive.

I'm using nymea-app verson 1.0.213 (Qt 5.12.8) on Ubuntu 20.04 LTS. The core is running on a raspberry pi (server version 0.21.1+202006261022~buster+rpi1).

Let me know, if you need further information. I will try to provide it.

oh wow... I do literally the same all day long, no hangs for me... You're totally right that it really shouldn't matter what a plugin does, the app should never hang.

Would you mind starting the app from the commandline and post me the debug output it prints?

Also, is this new with app 1.0.213 or did this happen before already? And how did you install the app? Using apt-get or using snap?

The app version is 1.0.213, but it did also happen with the previous one (guessing 1.0.212, but not sure). It's installed via apt.

I can't reproduce the problem at the moment (though it was there for days), which makes me think it might after all be linked to a broken plugin. I'll try to test that in a minute.

Maybe one more hint, prevously I used the nymea:core daemon as included in the image. So it was started with systemctl. After reading the post here, I changed my plans to let it run in the foreground.

Hmm... You probably rather want this: https://nymea.io/documentation/developers/integrations/building-testing

No need to install the plugin all the time. Just export NYMEA_PLUGINS_PATH to point to the build directory of the plugin...

Thanks! I knew about that already. In fact did do that for some early tests on the laptop.

My rational was that I did not want to mess with the core running on the Raspberry Pi image, therefore I decided to install the plugin and restart the core.

Hmm... I just tried to connect the app to my RPi and run sudo systemctl restart nymead. Still can't reproduce the hanging in the app. If you manage to reproduce it, please write more detailed steps and send me the logs please.

I can't reproduce this problem at the moment either. My problem was that I couldn't get any logs from the unresponsive app. Didn't think to start it via terminal though, sorry for that!

Ok, perhaps I'm one step closer:

I suppose you used something like this?
sudo cp libnymea_integrationpluginblabla.so /usr/lib/arm-linux-gnueabihf/nymea/plugins/

This, (as opposed to sudo make install) makes a process linking to a library crash. So I suppose you made nymead crash repeatedly. I guess it could be that systemd eventually gave up to respawn it, or it didn't manage to release a TCP socket in time and failed to rebind it which would cause the app thinking it is still connected just not getting any data any more. This still should not make the app hang and I still can't reproduce it, but I suspect once we're in repeated-crash-territory things can get funky enough.

No, I did use "sudo make install".

nymead was restarting properly. All I had to do was to restart the app on the laptop and connect again. Actually I think, it connected automatically.

Just had another situation like the one described above. I attached the terminal output of the nymea-app, if that's of any use. I cut the log to contain the last attempt to restart the core.
freeze.txt

Two times in a row. Here is the log of the second case, now from app start until crash.
freeze2.txt

While I have heard about this from more people in the past, I never have been able to reproduce it and I haven't heard any complains in a long while. We've also refactored some code that would be involved here ever since. So in the hope this is gone, I'm closing this now. Please reopen if it still happens.