Opened 15 years ago
Closed 15 years ago
#5758 closed defect (invalid)
ZM using default SHM key resulting in no video stream
Reported by: | Owned by: | paulh | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythzoneminder | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description (last modified by )
System: Mythbuntu 8.10 Alpha 6 Zoneminder: 1.23.3 mythzmserver: head
Under certain circumstances (Possibly in all cases), Zoneminder 1.23.3 appears to be using the default value field for setting ZM_SHM_KEY rather than the normal one. This occurs on a vanilla install of mythbuntu 8.10. This results in an incorrect shared memory key being used
mythzmserver output: loading zm config from /etc/zm/zm.conf ZM is version '1.23.3' Listening on port: 6548 Using server protocol version '6' getZMSetting: ZM_SHM_KEY Result: 0x7a6d2000 Shared memory key is: 0x7a6d2000 getZMSetting: ZM_EVENT_IMAGE_DIGITS Result: 3 Event file format is: %03d-capture.jpg Analyse file format is: %03d-analyse.jpg Got 2 monitors Failed to shmget for monitor: 1 shmget args: 2053971969 ENOENT - no segment exists for the given key Failed to shmget for monitor: 3 shmget args: 2053971971 ENOENT - no segment exists for the given key new connection from 127.0.0.1 on socket 5 Processing: 'HELLO' Processing: 'GET_MONITOR_LIST' Got 2 monitors id: 1 name: IP-Cam1 width: 320 height: 240 palette: 4 ------------------- id: 3 name: New width: 320 height: 240 palette: 4 ------------------- Processing: 'GET_LIVE_FRAME' Kicking database connection Getting live frame from monitor: 1 Processing: 'GET_LIVE_FRAME' Getting live frame from monitor: 1 Processing: 'GET_LIVE_FRAME' Getting live frame from monitor: 1 Processing: 'GET_LIVE_FRAME' Getting live frame from monitor: 1 Processing: 'GET_LIVE_FRAME' Getting live frame from monitor: 1
When this occurs there is only a black box shown for a live feed.
I have patched zmserver.cpp and zmserver.h to try the default key value if the main one fails and this works on my system (ie I get a live video stream).
Attachments (2)
Change History (4)
Changed 15 years ago by
Attachment: | zmserver.cpp added |
---|
Changed 15 years ago by
Attachment: | zmserver.h added |
---|
comment:2 Changed 15 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Looks like you have an invalid value set for the ZM_SHM_KEY setting. Only the first 4 digits are used the last 4 should all be 0's. You have 0x7a6d2000 it should be set to 0x7a6d0000 which is the default anyway.
I guess ZM masks out the last 4 digits and so ignores the extra 2 but MythZoneMinder? assumes the setting stored in the DB is correct and uses that value literally. It should really mask out the last four digits like ZM does I guess.
You can easily fix this by going into ZM's options page and on the 'system' tab correct the ZM_SHM_KEY setting so the last four digits are all zero's. You will have to restart mythzmserver after changing that setting.
Patched zmserver.cpp