Motion - Bug Report 2007x 10x 27x 150419
You are here: Foswiki>Motion Web>BugReports>BugReport2007x10x27x150419 (18 May 2008, AngelCarpintero)Edit Attach

BUG: Problem of a motion on architecture x86_64.

Hello.

I use a motion more than one year.

All works excellently on a computer with 32 bit operational system FreeBSD 6.2.

Now I wish to force to work a motion on OpenSuse 10.3 with architecture x86_64.

The motion is started, and works. But, when it is unloaded or restarted, appears an error.

*--------------*
[1] File of type 1 saved to: ./01-20071027194939-09.jpg
[1] File of type 1 saved to: ./01-20071027194939-10.jpg
[1] File of type 1 saved to: ./01-20071027194939-11.jpg
[1] Thread exiting
[0] Motion terminating
*** glibc detected *** ./motion: free(): invalid pointer: 0x00002aaaaac19010 ***
======= Backtrace: =========
/lib64/libc.so.6[0x2ba5f122921d]
/lib64/libc.so.6(cfree+0x76)[0x2ba5f122af76]
./motion[0x404f30]
./motion[0x4055d2]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x2ba5f11d8b54]
./motion[0x4040a9]
======= Memory map: ========
...
...
...
*------*

It seems to me, that a problem in use of pointers and types of data which are used for their storage. Which are various for 32 and 64 bit systems.

Thanks.

*-----*
uname -a
Linux sun 2.6.22.9-0.4-default #1 SMP 2007/10/05 21:32:04 UTC x86_64 x86_64 x86_64 GNU/Linux
sun:/weak # arch
x86_64
*-----*
# ./configure

Detected CPU: Intel(R) Core(TM)2 Duo CPU     E6750  @ 2.66GHz
CPU optimization:
checking for bswap instruction... yes
configure: creating ./config.status
config.status: creating motion.init-FreeBSD.sh
config.status: creating motion.init-Debian
config.status: creating motion.init-RH
config.status: creating motion.spec
config.status: creating Makefile

   ************************
      *   Configure status   *
         ************************

         OS             :     Linux
         pthread Support:     Yes
         jpeg Support:        Yes
         mjpeg Support:       Yes
         V4L included:        Yes
         V4L2 supported:      Yes
         FFmpeg Support:      Yes
         MYSQL Support:       Yes
         PostgreSQL Support:  No

         CFLAGS:  -g -O2 -DMJPEGT -DHAVE_FFMPEG -I/usr/include/ffmpeg -DHAVE_MYSQL -I/usr/include/mysql -DMOTION_V4L2 -DTYPE_32BIT="int" -DHAVE_BSWAP
         LIBS: -lm  -lpthread -ljpeg -L/usr/lib64 -lavformat -lavcodec -lm -lz -L/usr/lib64 -lmysqlclient -lz
         LDFLAGS:   -lmjpegutils -llavjpeg -L/usr/lib64

         Install prefix:       /usr/local
*---------------------------------------------*

# make
...
...
...

gcc -g -O2 -DMJPEGT -DHAVE_FFMPEG -I/usr/include/ffmpeg -DHAVE_MYSQL -I/usr/include/mysql -DMOTION_V4L2 -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.9\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o conf.o conf.c
conf.c:168: warning: cast from pointer to integer of different size
conf.c:175: warning: cast from pointer to integer of different size
conf.c:185: warning: cast from pointer to integer of different size
conf.c:196: warning: cast from pointer to integer of different size
conf.c:214: warning: cast from pointer to integer of different size
conf.c:222: warning: cast from pointer to integer of different size
conf.c:229: warning: cast from pointer to integer of different size
conf.c:237: warning: cast from pointer to integer of different size
conf.c:244: warning: cast from pointer to integer of different size
conf.c:251: warning: cast from pointer to integer of different size
conf.c:259: warning: cast from pointer to integer of different size
conf.c:268: warning: cast from pointer to integer of different size
conf.c:276: warning: cast from pointer to integer of different size
conf.c:284: warning: cast from pointer to integer of different size
conf.c:293: warning: cast from pointer to integer of different size
conf.c:303: warning: cast from pointer to integer of different size
conf.c:313: warning: cast from pointer to integer of different size
conf.c:321: warning: cast from pointer to integer of different size
conf.c:329: warning: cast from pointer to integer of different size
conf.c:337: warning: cast from pointer to integer of different size
conf.c:348: warning: cast from pointer to integer of different size
conf.c:355: warning: cast from pointer to integer of different size
conf.c:362: warning: cast from pointer to integer of different size
conf.c:374: warning: cast from pointer to integer of different size
conf.c:381: warning: cast from pointer to integer of different size
conf.c:388: warning: cast from pointer to integer of different size
conf.c:395: warning: cast from pointer to integer of different size
conf.c:405: warning: cast from pointer to integer of different size
conf.c:413: warning: cast from pointer to integer of different size
conf.c:421: warning: cast from pointer to integer of different size
conf.c:429: warning: cast from pointer to integer of different size
conf.c:438: warning: cast from pointer to integer of different size
conf.c:449: warning: cast from pointer to integer of different size
conf.c:456: warning: cast from pointer to integer of different size
conf.c:466: warning: cast from pointer to integer of different size
conf.c:474: warning: cast from pointer to integer of different size
conf.c:481: warning: cast from pointer to integer of different size
conf.c:497: warning: cast from pointer to integer of different size
conf.c:504: warning: cast from pointer to integer of different size
conf.c:511: warning: cast from pointer to integer of different size
conf.c:518: warning: cast from pointer to integer of different size
conf.c:533: warning: cast from pointer to integer of different size
conf.c:541: warning: cast from pointer to integer of different size
conf.c:549: warning: cast from pointer to integer of different size
conf.c:557: warning: cast from pointer to integer of different size
conf.c:565: warning: cast from pointer to integer of different size
conf.c:575: warning: cast from pointer to integer of different size
conf.c:591: warning: cast from pointer to integer of different size
conf.c:600: warning: cast from pointer to integer of different size
conf.c:612: warning: cast from pointer to integer of different size
conf.c:634: warning: cast from pointer to integer of different size
conf.c:643: warning: cast from pointer to integer of different size
conf.c:652: warning: cast from pointer to integer of different size
conf.c:661: warning: cast from pointer to integer of different size
conf.c:673: warning: cast from pointer to integer of different size
conf.c:680: warning: cast from pointer to integer of different size
conf.c:702: warning: cast from pointer to integer of different size
conf.c:715: warning: cast from pointer to integer of different size
conf.c:728: warning: cast from pointer to integer of different size
conf.c:741: warning: cast from pointer to integer of different size
conf.c:752: warning: cast from pointer to integer of different size
conf.c:764: warning: cast from pointer to integer of different size
conf.c:771: warning: cast from pointer to integer of different size
conf.c:779: warning: cast from pointer to integer of different size
conf.c:786: warning: cast from pointer to integer of different size
conf.c:793: warning: cast from pointer to integer of different size
conf.c:802: warning: cast from pointer to integer of different size
conf.c:812: warning: cast from pointer to integer of different size
conf.c:819: warning: cast from pointer to integer of different size
conf.c:826: warning: cast from pointer to integer of different size
conf.c:834: warning: cast from pointer to integer of different size
conf.c:846: warning: cast from pointer to integer of different size
conf.c:853: warning: cast from pointer to integer of different size
conf.c:860: warning: cast from pointer to integer of different size
conf.c:867: warning: cast from pointer to integer of different size
conf.c:874: warning: cast from pointer to integer of different size
conf.c:881: warning: cast from pointer to integer of different size
conf.c:888: warning: cast from pointer to integer of different size
conf.c:895: warning: cast from pointer to integer of different size
conf.c:904: warning: cast from pointer to integer of different size
conf.c:913: warning: cast from pointer to integer of different size
conf.c:921: warning: cast from pointer to integer of different size
conf.c:928: warning: cast from pointer to integer of different size
conf.c:935: warning: cast from pointer to integer of different size
conf.c:960: warning: cast from pointer to integer of different size
conf.c:968: warning: cast from pointer to integer of different size
conf.c:976: warning: cast from pointer to integer of different size
conf.c:984: warning: cast from pointer to integer of different size
conf.c:991: warning: cast from pointer to integer of different size
conf.c:1000: warning: cast from pointer to integer of different size
conf.c:1008: warning: cast from pointer to integer of different size
conf.c:1022: warning: cast from pointer to integer of different size
conf.c:1029: warning: cast from pointer to integer of different size
conf.c:1036: warning: cast from pointer to integer of different size
conf.c:1043: warning: cast from pointer to integer of different size
conf.c:1056: warning: cast from pointer to integer of different size
conf.c:1070: warning: cast from pointer to integer of different size
conf.c:1077: warning: cast from pointer to integer of different size
conf.c:1084: warning: cast from pointer to integer of different size
conf.c:1091: warning: cast from pointer to integer of different size
conf.c:1145: warning: cast from pointer to integer of different size
conf.c:1153: warning: cast from pointer to integer of different size
conf.c:1185: warning: cast from pointer to integer of different size
conf.c:1192: warning: cast from pointer to integer of different size
conf.c:1199: warning: cast from pointer to integer of different size
...
...
...
*----------------*

Environment

Motion version: 3.2.8
ffmpeg version:  
Shared libraries: ffmpeg, mysql, postgresql
Server OS: OpenSuse 10.3 2.6.22.9-0.4-default #1 SMP x86_64

-- RafisKhayrullin - 27 Oct 2007

Follow up

Hi Rafis ,

I'm working on fix that problem , now that i have access to a machine x86_64.

Seems that patch attached fix the problem , get svn trunk and apply it.

  patch -p0 < x86_64.diff
 make 

Please let me know if it works for you.

-- AngelCarpintero - 19 Nov 2007

Fix record

Included in svn -r264 , reopen if problem remains.

-- AngelCarpintero - 20 Nov 2007
Topic revision: r6 - 18 May 2008, AngelCarpintero
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.