Crashing python plugins

Python and python framework

Moderator: leecollings

Post Reply
elgringo
Posts: 96
Joined: Thursday 18 May 2017 8:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Left
Contact:

Crashing python plugins

Post by elgringo »

I was running a older version with python 3.4.2. Made about 6 python plugins and the system crashed about 3 times a week. Tried backtracing, debugging etc. but this didn't help. THe problem was in the plugins since the system works without problem when disabled.

This frustrated me for a while :roll:

So I decided to migrate to python 3.5.3, the default Stretch version. System crashed right away. That's nice, it means it is reproduceable so I can fix it.
There is a Bug 1and Bug 2 on this issue. So I removed the library, but the problem remains.

So I remove all imports (with a test plugin) and added the one by one. I noticed more imports causes the crash:
- All network related (urllib.request, socket, html.client, etc)
- random

So maybe the plugin system can be updated to check if a plugin is 'valid', check the imports.

My system work now for a week without problems :D
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest