BUG: netcam_next called with non data in buffer
Hi,
I'm using motion to connect to a simple jpeg http url,
motion seem to go in infinite loop when a zero length image is received, this error happen for some random jpeg, infact using firefox I can see the jpeg url is properly working but after a zero length jpeg is received motion get only another image and then go in infinite loop no more requests received by web server, below the debug info,
thanks,
regards
Nicola
Calculated frame time 571827.687500
[1] netcam_read_html_jpeg disconnecting netcam since keep-alive not set.
[1] netcam_init_jpeg: ***new pic delay successful***
[1] netcam_init_jpeg: jpeg_error 0
[1] netcam_image_conv: jpeg_error 0
[1] netcam_proc_jpeg: processing jpeg image - content length 18078
[1] netcam_connect, disconnecting netcam since keep-alive not set.
[1] netcam_connect with no keepalive, new socket created fd 5
[1] Received first header ('HTTP/1.1 200 OK')
[1] Received first header ('Server: nginx/0.6.35')
[1] Received first header ('Date: Thu, 05 Mar 2009 16:39:59 GMT')
[1] Received first header ('Content-Type: image/jpeg')
[1] Non-streaming camera (keep-alive not set)
[1] Received first header ('Content-Length: 18218')
[1] Content-length present
[1] Received first header ('Last-Modified: Thu, 05 Mar 2009 16:39:59 GMT')
[1] Received first header ('Connection: close')
[1] Found Conn:close header ('Connection: close')
[0] DEBUG-2 threads_running 2 motion_threads_running 1 , finish 0
[1] Received first header ('Accept-Ranges: bytes')
[1] Received first header ('')
[1] Calculated frame time 571481.937500
[1] netcam_read_html_jpeg disconnecting netcam since keep-alive not set.
[1] netcam_init_jpeg: ***new pic delay successful***
[1] netcam_init_jpeg: jpeg_error 0
[1] netcam_image_conv: jpeg_error 0
[1] netcam_proc_jpeg: processing jpeg image - content length 18661
[1] netcam_connect, disconnecting netcam since keep-alive not set.
[1] netcam_connect with no keepalive, new socket created fd 5
[1] Received first header ('HTTP/1.1 200 OK')
[1] Received first header ('Server: nginx/0.6.35')
[1] Received first header ('Date: Thu, 05 Mar 2009 16:40:00 GMT')
[1] Received first header ('Content-Type: image/jpeg')
[1] Non-streaming camera (keep-alive not set)
[1] Received first header ('Content-Length: 0')
[1] Content-length present
[1] Received first header ('Last-Modified: Thu, 05 Mar 2009 16:40:00 GMT')
[1] Received first header ('Connection: close')
[1] Found Conn:close header ('Connection: close')
[1] Received first header ('Accept-Ranges: bytes')
[1] Received first header ('')
[1] Calculated frame time 572988.750000
[1] netcam_read_html_jpeg disconnecting netcam since keep-alive not set.
[1] netcam_init_jpeg: ***new pic delay successful***
[1] netcam_fill_input_buffer: **fake EOI inserted**
[1] netcam_fill_input_buffer: **fake EOI inserted**
[1] netcam_fill_input_buffer: **fake EOI inserted**
[1] netcam_fill_input_buffer: **fake EOI inserted**
[1] netcam_fill_input_buffer: **fake EOI inserted**
[1] netcam_fill_input_buffer: **fake EOI inserted**
[1] netcam_fill_input_buffer: **fake EOI inserted**
[1] netcam_fill_input_buffer: **fake EOI inserted**
[1] netcam_fill_input_buffer: **fake EOI inserted**
[1] netcam_fill_input_buffer: **fake EOI inserted**
[1] netcam_output_message: JPEG datastream contains no image
[1] netcam_error_exit: netcam->jpeg_error 1
[1] vid_return_code 10
[1] netcam_proc_jpeg: processing jpeg image - content length 18218
[1] netcam_connect, disconnecting netcam since keep-alive not set.
[1] netcam_connect with no keepalive, new socket created fd 5
[1] Received first header ('HTTP/1.1 200 OK')
[1] Received first header ('Server: nginx/0.6.35')
[1] Received first header ('Date: Thu, 05 Mar 2009 16:40:00 GMT')
[1] Received first header ('Content-Type: image/jpeg')
[1] Non-streaming camera (keep-alive not set)
[1] Received first header ('Content-Length: 18333')
[1] Content-length present
[1] Received first header ('Last-Modified: Thu, 05 Mar 2009 16:40:00 GMT')
[1] Received first header ('Connection: close')
[1] Found Conn:close header ('Connection: close')
[1] Received first header ('Accept-Ranges: bytes')
[1] Received first header ('')
[1] Calculated frame time 552547.250000
[1] netcam_read_html_jpeg disconnecting netcam since keep-alive not set.
[1] netcam_init_jpeg: ***new pic delay successful***
[1] netcam_init_jpeg: jpeg_error 0
[1] netcam_image_conv: jpeg_error 0
[0] DEBUG-2 threads_running 2 motion_threads_running 1 , finish 0
[1] netcam_next called with no data in buffer
[1] vid_return_code 6
[1] netcam_next called with no data in buffer
[1] vid_return_code 6
[0] DEBUG-2 threads_running 2 motion_threads_running 1 , finish 0
[1] netcam_next called with no data in buffer
[1] vid_return_code 6
[1] netcam_next called with no data in buffer
[1] vid_return_code 6
[0] DEBUG-2 threads_running 2 motion_threads_running 1 , finish 0
[1] netcam_next called with no data in buffer
[1] vid_return_code 6
[1] netcam_next called with no data in buffer
[1] vid_return_code 6
[0] DEBUG-2 threads_running 2 motion_threads_running 1 , finish 0
[1] netcam_next called with no data in buffer
[1] vid_return_code 6
Environment
Motion version: |
3.2.11 |
ffmpeg version: |
|
Shared libraries: |
|
Server OS: |
centos 5, kernel 2.6.18-92.1.10 |
--
NicolaM - 05 Mar 2009
Follow up
Please could you try svn trunk version ?
as i told other guy having some issue with netcam like you in :
http://www.lavrsen.dk/twiki/bin/view/Motion/BugReport2009x03x09x030246
--
AngelCarpintero - 09 Mar 2009
Follow up
Same error with trunk r442, here are the logs
[1] netcam_read_first_header: Received first header ('Content-Type: image/jpeg')
[1] netcam_read_first_header: Non-streaming camera (keep-alive not set)
[1] netcam_read_first_header: Received first header ('Content-Length: 15100')
[1] netcam_read_first_header: Content-length present
[1] netcam_read_first_header: Received first header ('Last-Modified: Sun, 15 Mar 2009 12:52:40 GMT')
[1] netcam_read_first_header: Received first header ('Connection: close')
[1] netcam_read_first_header: Found Conn: close header ('Connection: close')
[1] netcam_read_first_header: Received first header ('Accept-Ranges: bytes')
[1] netcam_read_first_header: Received first header ('')
[1] netcam_read_html_jpeg: Calculated frame time 568261.625000
[1] netcam_read_html_jpeg: netcam_read_html_jpeg disconnecting netcam since keep-alive not set.
Message from syslogd@ at Sun Mar 15 13:52:40 2009 ...
sviluppo motion: [1] netcam_read_html_jpeg: Calculated frame time 568261.625000[1] netcam_proc_jpeg: processing jpeg image - content length 15081
[1] netcam_connect: disconnecting netcam since keep-alive not set.
[1] netcam_connect: with no keepalive, new socket created fd 3
[1] netcam_read_first_header: Received first header ('HTTP/1.1 200 OK')
[1] netcam_read_first_header: Received first header ('Server: nginx/0.6.35')
[1] netcam_read_first_header: Received first header ('Date: Sun, 15 Mar 2009 12:52:41 GMT')
[1] netcam_read_first_header: Received first header ('Content-Type: image/jpeg')
[1] netcam_read_first_header: Non-streaming camera (keep-alive not set)
[1] netcam_read_first_header: Received first header ('Content-Length: 0') [1] netcam_read_first_header: Content-length present
[1] netcam_read_first_header: Received first header ('Last-Modified: Sun, 15 Mar 2009 12:52:41 GMT')
[1] netcam_read_first_header: Received first header ('Connection: close')
[1] netcam_read_first_header: Found Conn: close header ('Connection: close')
[1] netcam_read_first_header: Received first header ('Accept-Ranges: bytes')
[1] netcam_read_first_header: Received first header ('')
[1] netcam_read_html_jpeg: Calculated frame time 568481.687500
[1] netcam_read_html_jpeg: netcam_read_html_jpeg disconnecting netcam since keep-alive not set.
Message from syslogd@ at Sun Mar 15 13:52:41 2009 ...
sviluppo motion: [1] netcam_read_html_jpeg: Calculated frame time 568481.687500[1] netcam_proc_jpeg: processing jpeg image - content length 15100
[1] netcam_connect: disconnecting netcam since keep-alive not set.
[1] netcam_connect: with no keepalive, new socket created fd 3
[1] netcam_read_first_header: Received first header ('HTTP/1.1 200 OK')
[1] netcam_read_first_header: Received first header ('Server: nginx/0.6.35')
[1] netcam_read_first_header: Received first header ('Date: Sun, 15 Mar 2009 12:52:41 GMT')
[1] netcam_read_first_header: Received first header ('Content-Type: image/jpeg')
[1] netcam_read_first_header: Non-streaming camera (keep-alive not set)
[1] netcam_read_first_header: Received first header ('Content-Length: 15062')
[1] netcam_read_first_header: Content-length present
[1] netcam_read_first_header: Received first header ('Last-Modified: Sun, 15 Mar 2009 12:52:41 GMT')
[1] netcam_read_first_header: Received first header ('Connection: close')
[1] netcam_read_first_header: Found Conn: close header ('Connection: close')
[1] netcam_read_first_header: Received first header ('Accept-Ranges: bytes')
[1] netcam_read_first_header: Received first header ('')
[1] netcam_read_html_jpeg: Calculated frame time 551772.250000
[1] netcam_read_html_jpeg: netcam_read_html_jpeg disconnecting netcam since keep-alive not set.
Message from syslogd@ at Sun Mar 15 13:52:41 2009 ...
sviluppo motion: [1] netcam_read_html_jpeg: Calculated frame time 551772.250000[1] netcam_next: netcam_next called with no data in buffer
[1] netcam_next: netcam_next called with no data in buffer
[1] netcam_next: netcam_next called with no data in buffer
[1] netcam_next: netcam_next called with no data in buffer
[1] netcam_next: netcam_next called with no data in buffer
[1] netcam_next: netcam_next called with no data in buffer
[1] netcam_next: netcam_next called with no data in buffer
--
NicolaM - 15 Mar 2009
Follow up
Any news on this issue?
--
JohannesHessellund - 29 Dec 2009
I tried to reproduce the issue with using same version of nginx web server using a static jpg at 640x480 , i was not able to reproduce the issue of existing content-lenght
with a weird value of 0. Motion can discard this frames but not sure it will be the cure.
Try svn r476
--
AngelCarpintero - 04 Jan 2010
Fix record