Motion - Bug Report 2005x 01x 10x 202519

BUG: Segmentation fault

Calling motion with a netcam I get a segmentation fault. In the standard motion.conf I only put a ";" in front of the "videodevice" And "tunerdevice" and add the address of the webcam and username/password Using Sitecom wireless IP camera

Test case

Output of the debugger:
--------------------------------------------------
Starting program: /download/motion-3.1.18/motion 
[Thread debugging using libthread_db enabled]
[New Thread 1078699904 (LWP 25287)]

Processing thread 0 - config file /etc//motion.conf
Thread0 device: 192.168.0.8:81/image.jpg input: -1
Netcam: thread 0: starting...
[New Thread 1080802224 (LWP 25290)]
Netcam: jpeg file
Netcam: thread 0: thread PID: 25287
[New Thread 1082903472 (LWP 25291)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1080802224 (LWP 25290)]
0x40140ee7 in _int_malloc () from /lib/tls/libc.so.6
(gdb) 
----------------------------------------------------------

Telnet session:

telnet 192.168.0.8  81
Trying 192.168.0.8...
Connected to 192.168.0.8.
Escape character is '^]'.
GET /image.jpg HTTP/1.0
Authorization: Basic aG9sc2NoOmhvbHNjaDk5

HTTP/1.0 200 OK
Server: Camera Web Server/1.0
Auther: Steven Wu
MIME-version: 1.0
Cache-Control: no-cache
Content-Type:image/jpeg
Content-Length:61162

VVL00;






##J1*1JJJJJJJJJJJJJJJJJJJJJJJJJJ
<.... Deleted binary data from JPG picture ....>
Connection closed by foreign host.

Environment

Motion version: motion-3.1.18 snap 9
Shared libraries: mysql
Server OS: SuSe 9.1 , kernel 2.6.5-7.111.19-default

-- TWikiGuest - 10 Jan 2005

Follow up

  • What patch version are you using ?
  • What are exactly the netcam_url and netcam_userpass ?

Please could you do a bt full to get the stack trace ? (if is possible go to frame , i.ex: frame #2 , where the segfault happens )

-- AngelCarpintero - 10 Jan 2005


  • What patch version are you using ?
I use motion-3.1.18 snap 9 or what else do you mean ?

  • What are exactly the netcam_url and netcam_userpass ?

netcam_url 192.168.0.8:81/image.jpg netcam_userpass holsch:holsch99

  • Please could you do a bt full to get the stack trace ? (if is possible go to frame , i.ex: frame #2 , where the segfault happens )
I'am not the linux crack, but lets see if the following log is what you are searching for:

-----------------

GNU DDD 3.3.8 (i386-suse-linux-gnu), by Dorothea LUsing host libthread_db library
"/lib/tls/libthread_db.so.1".
(gdb) run
Starting program: /download/motion-3.1.18/motion 
[Thread debugging using libthread_db enabled]
[New Thread 1078699904 (LWP 12324)]
Processing thread 0 - config file /etc//motion.conf
Thread0 device: 192.168.0.8:81/image.jpg input: -1
[New Thread 1080802224 (LWP 12327)]
Netcam: thread 0: starting...
Netcam: jpeg file
Netcam: thread 0: thread PID: 12324
[New Thread 1082903472 (LWP 12328)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1082903472 (LWP 12328)]
header_get (rbuf=0x0, hdr=0x408bca48, flags=1) at netcam_wget.c:125
/download/motion-3.1.18/netcam_wget.c:125:4153:beg:0x8054db3
(gdb) bt full
#0  header_get (rbuf=0x0, hdr=0x408bca48, flags=1) at netcam_wget.c:125
   res = Variable "res" is not available.
(gdb) frame 2
#2  0x08054488 in netcam_single_read (netcam=0x805f300) at netcam.c:556
/download/motion-3.1.18/netcam.c:556:13889:beg:0x8054488
(gdb) bt full
#0  header_get (rbuf=0x0, hdr=0x408bca48, flags=1) at netcam_wget.c:125
   res = Variable "res" is not available.
(gdb)

If a remote debugging can be helpful for you, you can reach the web cam by: holsch.dnsalias.net:81/image.jpg login and pw see above

-- -- TWikiGuest - 10 Jan 2005

  • What patch version are you using ?
I use motion-3.1.18 snap 9 or what else do you mean ?

I mean that there was 2 patches against snap9 , you can find the last one here

  • What network camera are you trying to connect ?

Thanks for the information , i'll try to debug remotely.

-- AngelCarpintero - 11 Jan 2005

Not a big different, just one additional line output then the same fault. Just to be sure that I use the same source: I've installed: motion-3.1.18_snap9.tar.gz and path it with motion-3.1.18_snap9-netcam-pre2.diff.gz

Here is the result from gdb:
Starting program: /download/motion-3.1.18/motion 
[Thread debugging using libthread_db enabled]
[New Thread 1078699904 (LWP 7600)]
Processing thread 0 - config file /etc//motion.conf
Thread0 device: 192.168.0.8:81/image.jpg input: -1
Netcam: thread 0: starting...
[New Thread 1080802224 (LWP 7603)]
[HTTP/1.0 200 OK]
Netcam: jpeg file
Netcam: thread 0: thread PID: 7600
[New Thread 1082903472 (LWP 7604)]
Thread exiting

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1078699904 (LWP 7600)]
0x40140208 in _int_free () from /lib/tls/libc.so.6
(gdb) 

-- TWikiGuest - 11 Jan 2005

Fix record

Fixed with netcam-pre2 patch . Please reopen the bug if the problem remains.

-- AngelCarpintero - 11 Jan 2005
Topic revision: r10 - 07 Mar 2005, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.