Domoticz - Now with a Python stackdump !

Python and python framework

Moderator: leecollings

Post Reply
User avatar
Dnpwwo
Posts: 820
Joined: Sunday 23 March 2014 9:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Melbourne, Australia
Contact:

Domoticz - Now with a Python stackdump !

Post by Dnpwwo »

Hail Python plugin developers !

Ever had that new plugin you are working on completely crash Domoticz and not know why? Well I have as recently as last week (try doing an 'import gtts' a few times and you'll get a massive stack dump sometimes) and it can be hard to work out what the problem is.

Fear no more, help is at hand for recent beta users (and let's be honest, why wouldn't you be running the beta version?) :!:

The Plugin Framework now enables the Python standard 'faulthandler' capability before loading your plugin which will cause a Python specific stack dump (thread by thread) to be sent to 'sys.stderr' (aka the console) if anything nasty like a seg fault happens so if you run Domoticz from the command line (or redirect sys.stderr) you can see it.

Check it out at: https://www.domoticz.com/wiki/Developin ... s_Domoticz
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
Post Reply