Python Framework DomoticzEx - crashing domoticz

Python and python framework

Moderator: leecollings

Post Reply
pipiche
Posts: 2035
Joined: Monday 02 April 2018 20:33
Target OS: Linux
Domoticz version:
Contact:

Python Framework DomoticzEx - crashing domoticz

Post by pipiche »

Not a big issue, but it looks like when having wrong parameters when calling DomoticzEx.unit, this crash Domoticz!

Unit parameter was missing !

Spoiler: show
Sep 06 18:20:24 rasp domoticz[9483]: 2021-09-06 18:20:24.316 Error: Expected: myVar = DomoticzEx.Unit(Name="myDevice", DeviceID="", Unit=0, TypeName="", Type=0, Subtype=0, Switchtype=0, Image=0, Options={}, Used=1, Description="")
Sep 06 18:20:24 rasp domoticz[9483]: 2021-09-06 18:20:24.316 Error: DomoticzEx: (DomoticzEx) 'CUnitEx_init' failed 'TypeError':'function missing required argument 'Unit' (pos 3)'.
Sep 06 18:20:24 rasp domoticz[9483]: Fatal Python error: Segmentation fault
Sep 06 18:20:24 rasp domoticz[9483]: Current thread 0xafcfe330 (most recent call first):
Sep 06 18:20:24 rasp domoticz[9483]: File "/var/lib/domoticz/plugins/test_domoticzex/BasePluginEx.py", line 15 in onStart
Sep 06 18:20:24 rasp domoticz[9483]: File "/var/lib/domoticz/plugins/test_domoticzex/plugin.py", line 44 in onStart
Sep 06 18:20:24 rasp domoticz[9483]: 2021-09-06 18:20:24.319 Error: Domoticz(pid:9483, tid:9502('DomoticzEx')) received fatal signal 11 (Segmentation fault)
Sep 06 18:20:24 rasp domoticz[9483]: 2021-09-06 18:20:24.319 Error: siginfo address=0x250b, address=0xaf32d594
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.774 Error: Did not find stack frame for thread (LWP 9502)), printing full gdb output:
Sep 06 18:20:34 rasp domoticz[9483]:
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.774 Error: > [New LWP 9487]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.775 Error: > [New LWP 9488]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.775 Error: > [New LWP 9489]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.775 Error: > [New LWP 9490]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.775 Error: > [New LWP 9491]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.775 Error: > [New LWP 9492]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.775 Error: > [New LWP 9493]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.775 Error: > [New LWP 9494]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.775 Error: > [New LWP 9495]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.775 Error: > [New LWP 9496]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.776 Error: > [New LWP 9501]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.776 Error: > [New LWP 9502]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.776 Error: > [New LWP 9503]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.776 Error: > [New LWP 9504]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.776 Error: > [New LWP 9505]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.776 Error: > [New LWP 9506]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.776 Error: > [New LWP 9523]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.776 Error: > [Thread debugging using libthread_db enabled]
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.776 Error: > Using host libthread_db library "/lib/libthread_db.so.1".
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.776 Error: > 0xb687e18c in __GI___clock_nanosleep_time64 (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0xbee02588, req@entry=0xbee02580, rem=0xbee02598) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:43
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.777 Error: > 43 int r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, clock_id,
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.777 Error: > Id Target Id Frame
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.777 Error: > * 1 Thread 0xb61b3230 (LWP 9483) "domoticz" 0xb687e18c in __GI___clock_nanosleep_time64 (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0xbee02588, req@entry=0xbee02580, rem=0xbee02598) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:43
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.777 Error: > 2 Thread 0xb5e7b330 (LWP 9487) "Watchdog" 0xb687e18c in __GI___clock_nanosleep_time64 (clock_id=clock_id@entry=0, flags=flags@entry=0, req=0xb5e7abd0, req@entry=0xb5e7abc8, rem=0xb5e7abe0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:43
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.777 Error: > 3 Thread 0xb567a330 (LWP 9488) "SQLHelper" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.777 Error: > 4 Thread 0xb4e79330 (LWP 9489) "PluginMgr" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.777 Error: > 5 Thread 0xb451c330 (LWP 9490) "InfluxPush" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.777 Error: > 6 Thread 0xb3d1b330 (LWP 9491) "Webem_ssncleane" 0xb68be084 in epoll_wait (epfd=<optimized out>, events=0xb3d1a358, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.777 Error: > 7 Thread 0xb34c8330 (LWP 9492) "WebServer_8080" 0xb68be084 in epoll_wait (epfd=<optimized out>, events=0xb34c72f0, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.778 Error: > 8 Thread 0xb2aff330 (LWP 9493) "Scheduler" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.778 Error: > 9 Thread 0xb22fe330 (LWP 9494) "TCPServer" 0xb68be084 in epoll_wait (epfd=<optimized out>, events=0xb22fd338, maxevents=128, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.778 Error: > 10 Thread 0xb18ff330 (LWP 9495) "MainWorker" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.778 Error: > 11 Thread 0xb10fe330 (LWP 9496) "MainWorkerRxMsg" 0xb6a55f88 in __futex_abstimed_wait_common64 (futex_word=futex_word@entry=0x13a70a4 <m_mainworker+3964>, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0xb10fdaa0, private=0, private@entry=1, cancel=cancel@entry=true) at ../sysdeps/nptl/futex-internal.c:74
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.778 Error: > 12 Thread 0xb04ff330 (LWP 9501) "Box" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.778 Error: > 13 Thread 0xafcfe330 (LWP 9502) "DomoticzEx" 0xb68841c4 in __GI___wait4_time64 (pid=9507, stat_loc=0x0, options=-1232584280, usage=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:35
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.778 Error: > 14 Thread 0xaf2ff330 (LWP 9503) "NotificationSys" 0xb6a55f88 in __futex_abstimed_wait_common64 (futex_word=futex_word@entry=0x13a6b84 <m_mainworker+2652>, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0xaf2fead0, private=0, private@entry=1, cancel=cancel@entry=true) at ../sysdeps/nptl/futex-internal.c:74
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.778 Error: > 15 Thread 0xae8ff330 (LWP 9504) "EventSystem" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.779 Error: > 16 Thread 0xae0fe330 (LWP 9505) "EventSystemQueu" 0xb6a55f88 in __futex_abstimed_wait_common64 (futex_word=futex_word@entry=0x13a6280 <m_mainworker+344>, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0xae0fd9e0, private=0, private@entry=1, cancel=cancel@entry=true) at ../sysdeps/nptl/futex-internal.c:74
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.779 Error: > 17 Thread 0xad8fd330 (LWP 9506) "Plugin_ASIO" 0xb6a55f88 in __futex_abstimed_wait_common64 (futex_word=futex_word@entry=0x1aacfb0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=0, private@entry=-1355692688, cancel=cancel@entry=true) at ../sysdeps/nptl/futex-internal.c:74
Sep 06 18:20:34 rasp domoticz[9483]: 2021-09-06 18:20:34.780 Error: > 18 Thread 0xad0fc330 (LWP 9523) "WebServer_8080" syscall () at ../sysdeps/unix/sysv/linux/arm/syscall.S:37
]
Post Reply