zma crash

Support and queries relating to all previous versions of ZoneMinder
Locked
haensse
Posts: 11
Joined: Fri Feb 24, 2006 8:56 pm

zma crash

Post by haensse »

Camera 352 / 288 points, 24 bits

a zone set with the following points:

0/161
20/110
42/142
25/205

settings:
Type Active
Units Pixel
Alarm Check Blobs
Thresh min 15 max blank
Filter 9 / 9
Zone 2100
alarmed area min 400 max 2000
filtered area min 250 max 2007
blob area min 200 max 2007
Blobs min 3 max blank

and get the following:
02/27/06 21:35:00.388273 zma_m1[31373].DB9-zm_image.cpp/1112 [Moving global edge
]
02/27/06 21:35:00.388379 zma_m1[31373].DB9-zm_image.cpp/1168 [Deleting active_ed
ge]
02/27/06 21:35:00.388400 zma_m1[31373].DB9-zm_image.cpp/1112 [Moving global edge
]
02/27/06 21:35:00.388469 zma_m1[31373].DB9-zm_image.cpp/1168 [Deleting active_ed
ge]
02/27/06 21:35:00.388489 zma_m1[31373].DB9-zm_image.cpp/1112 [Moving global edge
]
02/27/06 21:35:00.388513 zma_m1[31373].DB9-zm_image.cpp/1168 [Deleting active_ed
ge]
02/27/06 21:35:00.388533 zma_m1[31373].DB9-zm_image.cpp/1168 [Deleting active_ed
ge]
02/27/06 21:35:00.388555 zma_m1[31373].DB3-zm_monitor.cpp/2096 [Checking active
zone Fuss]
02/27/06 21:35:00.388776 zma_m1[31373].DB4-zm_zone.cpp/138 [Checking alarms for
zone 11/Fuss in lines 110 -> 205]
02/27/06 21:35:00.388803 zma_m1[31373].DB5-zm_zone.cpp/139 [Checking for alarmed
pixels]
02/27/06 21:35:00.389189 zma_m1[31373].ERR-zma.cpp/35 [Got signal (Segmentation
fault), crashing]

Guess it is the memset in line 168 of zm_zone. What is lo_x, hi_x ranges, etc? What is the code supposed to do?

gdb shows no crashes :-(
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Your settings all look ok, so I don't immedaitely know what the problem might be. Does it crash like this every time?
Phil
haensse
Posts: 11
Joined: Fri Feb 24, 2006 8:56 pm

Post by haensse »

yes, reproducable.

can you explain your source code a little bit:

if ( lo_y > 0 )
{
lo_x = ranges[0].lo_x;
if ( lo_x > 0 )
lo_x--;
hi_x = ranges[0].hi_x;
if ( hi_x < (diff_width-1) )
hi_x++;
pdiff = diff_image->Buffer( lo_x, lo_y-1 );
memset( pdiff, BLACK, (hi_x-lo_x)+1 );
}

lo_y is the first line to check in the polygon,
hi_y is the last line
with ranges[0].lo_x you get the x postion of the first line in the polygon.
What are these lo_x-- and hi_x++ for?
In line 150 you get the memory postion of the image (adjusted by the bit depth of the image), but the memset statement only clears the numbers of pixels not number of pixesl x bitdepth?

regards

Dani
haensse
Posts: 11
Joined: Fri Feb 24, 2006 8:56 pm

Post by haensse »

another question related to that, what happens if I define a polygon
with "arms", I mean you have something in the line like
polygone area, gap, polygone area?
haensse
Posts: 11
Joined: Fri Feb 24, 2006 8:56 pm

Post by haensse »

now I understand, you make 8 bit per pixel images out of every camera frame for alarm detection.

The code section looks clean
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Yes. To answer your other queestion, you should be able to create a polygon of any shape so long as it doesn't self intersect. A star shape _should_ be ok though large gaps between te arms may result in sub optimal processing (until I put in a half finished fix for this).

However I would add the proviso that I haven't personally tested every single shape of polygon so it's possible there may be some nasities that remain :?
Phil
Locked