Author Topic: [SOLVED] IP Camera in 1004  (Read 61979 times)

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: [SOLVED] IP Camera in 1004
« Reply #105 on: December 10, 2012, 09:39:11 am »
I think i'm having a simular issue.
After a complete reinstallation of my machine, my camera snapshots (admin>security>view camera's) sometimes show by refresh, sometimes not.

When i open a log of an IP-camera, i've got:

Quote from: sudo tail -50 340_Advanced_IP_Camera.log
var oray_type=0;
var upnp_status=0;
 <0xb7769b70>
05   12/10/12 9:33:21.978      InputStatusChanged: old status = 0, new status = 0 <0xb7769b70>
Return code: 134
3   12/10/12 09:33:22   340 (spawning-device)   Device died... count=49/50 dev=340
Mon Dec 10 09:33:22 CET 2012 died
========== NEW LOG SECTION ==========
1   12/10/12 09:33:32   340 (spawning-device)   Starting... 50
1   12/10/12 09:33:32   340 (spawning-device)   Found /usr/pluto/bin/Advanced_IP_Camera
05   12/10/12 9:33:32.757      m_vectEventMethod.size() = 5. Configured EventMethods: <0xb76f66f0>
05   12/10/12 9:33:32.757      GetConfig(): EventMethod 1, m_bRunning = 26, m_sMethod = urlPoll, m_sURL = /get_status.cgi, m_iInterval = 10, m_vectInputDevices = [ m_dwPK_Device = 341, m_dwFK_DeviceTemplate = 54, status = (null), m_sTriggerMethod = pattern, m_sPatternOn = var alarm_status=1;, m_sPatternOff = var alarm_status=0;,  ] <0xb76f66f0>
05   12/10/12 9:33:32.757      m_mapPK_Device_OutputDevice.size() = 0. Configured OutputDevices: <0xb76f66f0>
05   12/10/12 9:33:32.758      Creating child 341 <0xb76f66f0>
05   12/10/12 9:33:32.758      Note: Device manager has attached a device of type 54 that this has no custom event handler for.  It will not fire events. <0xb76f66f0>
05   12/10/12 9:33:32.758      Note: Device manager has attached a device of type 54 that this has no custom handler for.  This is normal for IR. <0xb76f66f0>
05   12/10/12 9:33:32.765      InputStatusChanged: trigger = var alias='Sentio';
var now=236957;
var tz=-7200;
var alarm_status=0;
var ddns_status=0;
var <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: old status = 0, new status = 0 <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: trigger = var now=236957;
var tz=-7200;
var alarm_status=0;
var ddns_status=0;
var ddns_host='';
var oray_type=0;
var  <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: old status = 0, new status = 0 <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: trigger = var tz=-7200;
var alarm_status=0;
var ddns_status=0;
var ddns_host='';
var oray_type=0;
var upnp_status=0;
 <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: old status = 0, new status = 0 <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: trigger = var alarm_status=0;
var ddns_status=0;
var ddns_host='';
var oray_type=0;
var upnp_status=0;
 <0xb76f5b70>
05   12/10/12 9:33:32.765      InputStatusChanged: old status = 0, new status = 0 <0xb76f5b70>
Return code: 134
3   12/10/12 09:33:33   340 (spawning-device)   Device died... count=50/50 dev=340
Mon Dec 10 09:33:33 CET 2012 died
3   12/10/12 09:33:43   340 (spawning-device)   Aborting restart of device 340...
Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: [SOLVED] IP Camera in 1004
« Reply #106 on: December 10, 2012, 10:14:42 am »
Can someone provide a stack trace for this problem?

br,
sambuca

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: [SOLVED] IP Camera in 1004
« Reply #107 on: December 10, 2012, 11:06:37 am »
Sambuca   

this is the log that you want?


var p2p_local_port=23199;
 <0xb76f5b70>
10      12/10/12 8:04:28.959            EventWriteCallback: s = var ddns_host='/vipddns/upgengxin.asp';
var oray_type=0;
var upnp_status=0;
var p2p_status=0;
var p2p_local_port=23199;
 <0xb76f5b70>
10      12/10/12 8:04:28.959            EventWriteCallback: s = var oray_type=0;
var upnp_status=0;
var p2p_status=0;
var p2p_local_port=23199;
 <0xb76f5b70>
10      12/10/12 8:04:28.959            EventWriteCallback: s = var upnp_status=0;
var p2p_status=0;
var p2p_local_port=23199;
 <0xb76f5b70>
10      12/10/12 8:04:28.959            EventWriteCallback: s = var p2p_status=0;
var p2p_local_port=23199;
 <0xb76f5b70>
10      12/10/12 8:04:28.959            EventWriteCallback: s = var p2p_local_port=23199;
 <0xb76f5b70>
10      12/10/12 8:04:28.959            EventWriteCallback: compacting m_sEventBuffer, new length = 0 <0xb76f5b70>
10      12/10/12 8:04:28.959            EventMethod::MethodURL(): curl_Easy_perform has returned <0xb76f5b70>
10      12/10/12 8:04:28.959            EventMethod::MethodURL(): http OK <0xb76f5b70>
10      12/10/12 8:04:29.335            Receive string: MESSAGE 103            <0xb64feb70>
10      12/10/12 8:04:29.335            Received MESSAGE 103            0x9920428 device: 196 <0xb64feb70>
10      12/10/12 8:04:29.335            Received Message type 1 ID 84 from 57 to 196 (device: 196) resp 1 <0xb64feb70>
10      12/10/12 8:04:29.335            CMD_Get_Video_Frame: sUrl: http://10.1.1.116:80/snapshot.cgi <0xb64feb70>
10      12/10/12 8:04:29.737            CMD_Get_Video_Frame: data size: 10326 <0xb64feb70>
10      12/10/12 8:04:29.737            Socket::SendMessage type 4 id 0 from 196 to 57 <0xb64feb70>
10      12/10/12 8:04:30.147            Receive string: MESSAGE 103            <0xb64feb70>
10      12/10/12 8:04:30.147            Received MESSAGE 103            0x9920428 device: 196 <0xb64feb70>
10      12/10/12 8:04:30.147            Received Message type 1 ID 84 from 57 to 196 (device: 196) resp 1 <0xb64feb70>
10      12/10/12 8:04:30.147            CMD_Get_Video_Frame: sUrl: http://10.1.1.116:80/snapshot.cgi <0xb64feb70>
10      12/10/12 8:04:30.672            CMD_Get_Video_Frame: data size: 10292 <0xb64feb70>
10      12/10/12 8:04:30.672            Socket::SendMessage type 4 id 0 from 196 to 57 <0xb64feb70>
10      12/10/12 8:04:30.925            Receive string: MESSAGE 67             <0xb64feb70>
10      12/10/12 8:04:30.925            Received MESSAGE 67             0x9920428 device: 196 <0xb64feb70>
10      12/10/12 8:04:30.925            Received Message type 1 ID 203 from 57 to 196 (device: 196) resp 0 <0xb64feb70>
10      12/10/12 8:04:30.925            SetupCurl() start: sUrl: http://10.1.1.116:80/decoder_control.cgi?command=6&onestep=1; <0xb64feb70>
 <unfinished ...>
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: [SOLVED] IP Camera in 1004
« Reply #108 on: December 13, 2012, 09:04:40 am »
No, I was looking for a gdb stack trace.
First, look in /home/coredump/1/ for files named core_Advanced_IP_Camera*
Then:
Code: [Select]
cd /usr/pluto/bin
gdb Advanced_IP_Camera /home/coredump/1/core_Advanced_IP_Camera_xxxxx
Where you replace xxxxx with the newest file.

This should load the debugged (gdb) and the dump file. Then type "bt" (withouth the quotes) and press enter.

This should give you a stack trace.

Thanks.
sambuca

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: [SOLVED] IP Camera in 1004
« Reply #109 on: December 13, 2012, 10:49:14 am »
Sambuca 

the correct log .

dcerouter_1027379:/usr/pluto/bin# gdb Advanced_IP_Camera /home/coredump/1/core_A                                                                             dvanced_IP_Cam_1355391997_11
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/pluto/bin/Advanced_IP_Camera...done.

warning: core file may not match specified executable file.
[New Thread 23236]
[New Thread 23230]
[New Thread 23233]
[New Thread 23234]

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /usr/lib/libcurl.so.4...(no debugging symbols found)...done                                                                             .
Loaded symbols for /usr/lib/libcurl.so.4
Reading symbols from /usr/lib/libmysqlclient_r.so.16...(no debugging symbols fou                                                                             nd)...done.
Loaded symbols for /usr/lib/libmysqlclient_r.so.16
Reading symbols from /usr/pluto/lib/libSerializeClass.so...done.
Loaded symbols for /usr/pluto/lib/libSerializeClass.so
Reading symbols from /usr/pluto/lib/libDCECommon.so...done.
Loaded symbols for /usr/pluto/lib/libDCECommon.so
Reading symbols from /usr/pluto/lib/libPlutoUtils.so...done.
Loaded symbols for /usr/pluto/lib/libPlutoUtils.so
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...(no debugging symbols                                                                              found)...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...do                                                                             ne.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/tls/i686/cmov/libm.so.6...(no debugging symbols found)                                                                             ...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/i686/cmov/libc.so.6...(no debugging symbols found)                                                                             ...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /usr/lib/libidn.so.11...(no debugging symbols found)...done                                                                             .
Loaded symbols for /usr/lib/libidn.so.11
Reading symbols from /usr/lib/liblber-2.4.so.2...(no debugging symbols found)...                                                                             done.
Loaded symbols for /usr/lib/liblber-2.4.so.2
Reading symbols from /usr/lib/libldap_r-2.4.so.2...(no debugging symbols found).                                                                             ..done.
Loaded symbols for /usr/lib/libldap_r-2.4.so.2
Reading symbols from /lib/tls/i686/cmov/librt.so.1...(no debugging symbols found                                                                             )...done.
Loaded symbols for /lib/tls/i686/cmov/librt.so.1
Reading symbols from /usr/lib/libgssapi_krb5.so.2...(no debugging symbols found)                                                                             ...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.2
Reading symbols from /lib/i686/cmov/libssl.so.0.9.8...(no debugging symbols foun                                                                             d)...done.
Loaded symbols for /lib/i686/cmov/libssl.so.0.9.8
Reading symbols from /lib/i686/cmov/libcrypto.so.0.9.8...(no debugging symbols f                                                                             ound)...done.
Loaded symbols for /lib/i686/cmov/libcrypto.so.0.9.8
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...(no debugging symbols fo                                                                             und)...done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...(no debugging symbols foun                                                                             d)...done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/tls/i686/cmov/libresolv.so.2...(no debugging symbols f                                                                             ound)...done.
Loaded symbols for /lib/tls/i686/cmov/libresolv.so.2
Reading symbols from /usr/lib/libsasl2.so.2...(no debugging symbols found)...don                                                                             e.
Loaded symbols for /usr/lib/libsasl2.so.2
Reading symbols from /usr/lib/libgnutls.so.26...(no debugging symbols found)...d                                                                             one.
Loaded symbols for /usr/lib/libgnutls.so.26
Reading symbols from /usr/lib/libkrb5.so.3...(no debugging symbols found)...done                                                                             .
Loaded symbols for /usr/lib/libkrb5.so.3
Reading symbols from /usr/lib/libk5crypto.so.3...(no debugging symbols found)...                                                                             done.
Loaded symbols for /usr/lib/libk5crypto.so.3
Reading symbols from /lib/libcom_err.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libcom_err.so.2
Reading symbols from /usr/lib/libkrb5support.so.0...(no debugging symbols found)                                                                             ...done.
Loaded symbols for /usr/lib/libkrb5support.so.0
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...(no debugging symbols found                                                                             )...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/libkeyutils.so.1...(no debugging symbols found)...done                                                                             .
Loaded symbols for /lib/libkeyutils.so.1
Reading symbols from /usr/lib/libtasn1.so.3...(no debugging symbols found)...don                                                                             e.
Loaded symbols for /usr/lib/libtasn1.so.3
Reading symbols from /lib/libgcrypt.so.11...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcrypt.so.11
Reading symbols from /lib/libgpg-error.so.0...(no debugging symbols found)...don                                                                             e.
Loaded symbols for /lib/libgpg-error.so.0
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...(no debugging symbol                                                                             s found)...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
Core was generated by `/usr/pluto/bin/Advanced_IP_Camera -d 196 -r localhost -l                                                                              /var/log/pluto/196_Adv'.
Program terminated with signal 11, Segmentation fault.
#0  0x007e6b43 in realloc () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0  0x007e6b43 in realloc () from /lib/tls/i686/cmov/libc.so.6
#1  0x0805e4bf in DCE::Advanced_IP_Camera::WriteCallback (ptr=0x9f6247c,
    size=1, nmemb=4, ourpointer=0xb63bf044) at Advanced_IP_Camera.cpp:419
#2  0x0069ba28 in ?? () from /usr/lib/libcurl.so.4
#3  0x006b3837 in ?? () from /usr/lib/libcurl.so.4
#4  0x006b5595 in ?? () from /usr/lib/libcurl.so.4
#5  0x006b6123 in curl_easy_perform () from /usr/lib/libcurl.so.4
#6  0x0805e3af in DCE::Advanced_IP_Camera::DoURLAccess (this=0x9f1e7b8,
    sUrl=...) at Advanced_IP_Camera.cpp:396
#7  0x0805eefe in DCE::Advanced_IP_Camera::CMD_Move_Right (this=0x9f1e7b8,
    iStreamID=0, sCMD_Result=..., pMessage=0x9f6a790)
    at Advanced_IP_Camera.cpp:585
#8  0x08062e11 in DCE::Advanced_IP_Camera_Command::ReceivedMessage (
    this=0x9f1e7b8, pMessageOriginal=0x9f6a790)
    at ../Gen_Devices/Advanced_IP_CameraBase.h:443
#9  0x0033b14c in DCE::HandleRequestSocket::RunThread (this=0x9f1e7b8)
    at HandleRequestSocket.cpp:191
#10 0x0033a3f6 in BeginHandleRequestThread (HRqSock=0x9f1e7b8)
    at HandleRequestSocket.cpp:31
#11 0x0019396e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#12 0x0084398e in clone () from /lib/tls/i686/cmov/libc.so.6

brononius

  • Guru
  • ****
  • Posts: 454
  • Trying to keep it simple and centralized...
    • View Profile
    • OnIrIa - linuxMCE blog
Re: [SOLVED] IP Camera in 1004
« Reply #110 on: December 13, 2012, 03:52:23 pm »

I removed all IP-camera's (4 pieces) since the core keeps dying.
And for more then 24 hours, no problems.

When i added the motion wrapper and IP-camera's again, the core immediate starts dying each +/- 2 minutes...

Let me know if can help in any way!

Version: linuxMCE 1404, running virtual on ESXi

Orbiters: ASUS eeePAD, Nexus 5, Huwai, web
Automation: EIB technology, KNX IP ROUTER 750
Phones: Cisco 7912-7940-7960
Camera's: Foscam POE

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: [SOLVED] IP Camera in 1004
« Reply #111 on: December 13, 2012, 04:16:08 pm »
* posde did not know that one still needs the motion wrapper with advanced ip cam.

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: [SOLVED] IP Camera in 1004
« Reply #112 on: December 13, 2012, 04:27:23 pm »
as I understand motion is not necessary   for Advanced ip camera work

Carlos

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: [SOLVED] IP Camera in 1004
« Reply #113 on: December 13, 2012, 09:38:52 pm »
The motion wrapper shouldn't be needed for the advanced camera, no, but it depends on whether the camera itself supports motion detection. I haven't tried the two together though, so no guarantees :)

I wasn't able to reproduce the bug in my setup, so I'm guessing a bit here. I committed a possible fix that should be in the next update.

br,
sambuca

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: [SOLVED] IP Camera in 1004
« Reply #114 on: December 14, 2012, 06:41:43 pm »
Sambuca,

the update is not good . now  advanced ip camera died when i try to view camera



 
10      12/14/12 15:39:16.755           CMD_Get_Video_Frame: sUrl: http://10.1.1.88:80/snapshot.cgi <0xb632eb70>
10      12/14/12 15:39:16.972           CMD_Get_Video_Frame: data size: 36476 <0xb632eb70>
10      12/14/12 15:39:16.972           Socket::SendMessage type 4 id 0 from 196 to 57 <0xb632eb70>
Return code: 134
3       12/14/12 15:39:16       196 (spawning-device)   Device died... count=13/50 dev=196

sambuca

  • Guru
  • ****
  • Posts: 462
    • View Profile
Re: [SOLVED] IP Camera in 1004
« Reply #115 on: December 14, 2012, 09:55:56 pm »
Sorry about that, I've committed a fix. It should be available once posde has run a new build.

regards,
sambuca

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: [SOLVED] IP Camera in 1004
« Reply #116 on: December 15, 2012, 11:52:53 am »
without words, simply fantastic, great job

thank you

Carlos


Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: [SOLVED] IP Camera in 1004
« Reply #117 on: December 15, 2012, 12:34:08 pm »
Fix has been built. Please test.

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: [SOLVED] IP Camera in 1004
« Reply #118 on: December 15, 2012, 12:44:40 pm »
works ....

like I said .


"without words, simply fantastic, great job"

thank you

Carlos

cfernandes

  • Guru
  • ****
  • Posts: 359
    • View Profile
    • my company web site
Re: [SOLVED] IP Camera in 1004
« Reply #119 on: January 04, 2013, 10:26:08 am »
Sambuca ,

on motion detection no image was registered on alerts logs this is correct ?