Failed to set window attributes
Posted: Sat Oct 25, 2003 3:40 pm
I've got ZoneMinder installed, I can access the control panel through Apache, and I can set up a monitor. But, whenever I view the monitor, the image isn't there, except for one attempt.
I've got a LorexPro CVC2051P/R camera plugged into a Prolink PV-BT878P+FM card, and it works fine under xawtv, using /dev/video0, channel 1.
/tmp/zmdc.log reports that zmc keeps crashing; there are multiple instances of:
Starting pending process, zmc -d 0
'zmc -d 0' starting at 03/10/24 23:27:08, pid = 4479
'zmc -d 0' started at 03/10/24 23:27:08
'zmc -d 0' crashed at 03/10/24 23:27:08, exit status 255
zmc says this:
# ZM_DBG_PRINT=1 zmc -d 0
10/25/03 11:28:15.100488 zmc-d0[7183].INF-zm_debug.c/189 [Debug Level = 0, Debug Log = ]
10/25/03 11:28:15.103513 zmc-d0[7183].INF-zm_monitor.cpp/635 [Got 1 monitors]
10/25/03 11:28:15.121080 zmc-d0[7183].INF-zm_local_camera.cpp/68 [X:0]
10/25/03 11:28:15.121592 zmc-d0[7183].INF-zm_local_camera.cpp/69 [Y:0]
10/25/03 11:28:15.121692 zmc-d0[7183].INF-zm_local_camera.cpp/70 [W:384]
10/25/03 11:28:15.121756 zmc-d0[7183].INF-zm_local_camera.cpp/71 [H:288]
10/25/03 11:28:15.122009 zmc-d0[7183].ERR-zm_local_camera.cpp/85 [Failed to set window attributes: Invalid argument]
Using xawtv, I get a nice color image. While playing around with ZoneMinder, one attempt made immediately after rebooting got me greyscale video in the monitor display. I'm pretty sure it was in passive mode. I thought 'great, it works now' and tried to set it to rgb24 mode, and from that point on I couldn't get a picture again. I thought maybe the reason it worked after reboot was that /tmp got cleared out, and perhaps the socket you keep there wasn't closed properly. Deleting it manually (as root) didn't fix the problem, though, even after making sure all the zm* processes were killed.
Does zmc depend on having X running? I'm trying to run ZoneMinder on a server which is usually headless, but my xawtv tests were done with the monitor hooked up and X running. I'm also able to run xawtv by exporting DISPLAY to my workstation, so I know the camera, card, driver, and xawtv don't rely on X running locally.
Some interesting parts of v4l-info:
# v4l-info
### video4linux device info [/dev/video0] ###
general info
VIDIOCGCAP
name : "BT878(Prolink Pixelview PV-BT)"
type : 0xeb [CAPTURE,TUNER,OVERLAY,CLIPPING,FRAMERAM,SCALES]
channels : 4
audios : 1
maxwidth : 768
maxheight : 480
minwidth : 48
minheight : 32
channels
...
VIDIOCGCHAN(1)
channel : 1
name : "Composite1"
tuners : 0
flags : 0x2 [AUDIO]
type : CAMERA
norm : 1
...
picture
VIDIOCGPICT
brightness : 32768
hue : 32768
colour : 32512
contrast : 27648
whiteness : 0
depth : 8
palette : GREY
buffer
VIDIOCGFBUF
base : (nil)
height : 768
width : 1024
depth : 16
bytesperline : 2048
window
VIDIOCGWIN
x : 0
y : 0
width : 384
height : 288
chromakey : 0
flags : 1
I've got a LorexPro CVC2051P/R camera plugged into a Prolink PV-BT878P+FM card, and it works fine under xawtv, using /dev/video0, channel 1.
/tmp/zmdc.log reports that zmc keeps crashing; there are multiple instances of:
Starting pending process, zmc -d 0
'zmc -d 0' starting at 03/10/24 23:27:08, pid = 4479
'zmc -d 0' started at 03/10/24 23:27:08
'zmc -d 0' crashed at 03/10/24 23:27:08, exit status 255
zmc says this:
# ZM_DBG_PRINT=1 zmc -d 0
10/25/03 11:28:15.100488 zmc-d0[7183].INF-zm_debug.c/189 [Debug Level = 0, Debug Log = ]
10/25/03 11:28:15.103513 zmc-d0[7183].INF-zm_monitor.cpp/635 [Got 1 monitors]
10/25/03 11:28:15.121080 zmc-d0[7183].INF-zm_local_camera.cpp/68 [X:0]
10/25/03 11:28:15.121592 zmc-d0[7183].INF-zm_local_camera.cpp/69 [Y:0]
10/25/03 11:28:15.121692 zmc-d0[7183].INF-zm_local_camera.cpp/70 [W:384]
10/25/03 11:28:15.121756 zmc-d0[7183].INF-zm_local_camera.cpp/71 [H:288]
10/25/03 11:28:15.122009 zmc-d0[7183].ERR-zm_local_camera.cpp/85 [Failed to set window attributes: Invalid argument]
Using xawtv, I get a nice color image. While playing around with ZoneMinder, one attempt made immediately after rebooting got me greyscale video in the monitor display. I'm pretty sure it was in passive mode. I thought 'great, it works now' and tried to set it to rgb24 mode, and from that point on I couldn't get a picture again. I thought maybe the reason it worked after reboot was that /tmp got cleared out, and perhaps the socket you keep there wasn't closed properly. Deleting it manually (as root) didn't fix the problem, though, even after making sure all the zm* processes were killed.
Does zmc depend on having X running? I'm trying to run ZoneMinder on a server which is usually headless, but my xawtv tests were done with the monitor hooked up and X running. I'm also able to run xawtv by exporting DISPLAY to my workstation, so I know the camera, card, driver, and xawtv don't rely on X running locally.
Some interesting parts of v4l-info:
# v4l-info
### video4linux device info [/dev/video0] ###
general info
VIDIOCGCAP
name : "BT878(Prolink Pixelview PV-BT)"
type : 0xeb [CAPTURE,TUNER,OVERLAY,CLIPPING,FRAMERAM,SCALES]
channels : 4
audios : 1
maxwidth : 768
maxheight : 480
minwidth : 48
minheight : 32
channels
...
VIDIOCGCHAN(1)
channel : 1
name : "Composite1"
tuners : 0
flags : 0x2 [AUDIO]
type : CAMERA
norm : 1
...
picture
VIDIOCGPICT
brightness : 32768
hue : 32768
colour : 32512
contrast : 27648
whiteness : 0
depth : 8
palette : GREY
buffer
VIDIOCGFBUF
base : (nil)
height : 768
width : 1024
depth : 16
bytesperline : 2048
window
VIDIOCGWIN
x : 0
y : 0
width : 384
height : 288
chromakey : 0
flags : 1