Page 1 of 1

1.17.1 zmc bug?

Posted: Tue Jan 27, 2004 4:46 am
by alan
Hi there,

I've just update or security server frmo 0.9x to the latest 1.17.1 version but now I'm having some issues.

I'm using a IVC-120G 16 channel capture card, which had previously been working perfectly with the old version. Now with this new version the capture daemon seems to be not waiting for the capture card to select the appropriate channel before a capture is taken.

For example I have 10 cameras on channels 0-9. With the montage open I get a congaline of signals advance one maybe two channels up and down on the display. We as previously this was rock solid.

I really like the new version and it has a *lot* more polish! Well done!
But if you could help me find a solution to this problem that would be great!

Cheers,
Alan.

Re: 1.17.1 zmc bug?

Posted: Tue Jan 27, 2004 5:04 am
by alan
Hi all,

I've just rolled back v0.9.15 and now all is rock solid again.. So It looks to me like a new bug.. :)

Let me know if you need me to output logs/testing things..

Thanks,
Alan.

Re: 1.17.1 zmc bug?

Posted: Tue Jan 27, 2004 9:03 am
by zoneminder
Hi Alan,

I'm not sure I exactly understand what the problem is. If you can send or post any relevant log output or screenshots it might be useful. More specifically I'm not sure what you mean by 'seems to be not waiting for the capture card ' and 'congaline of signals advance'.

Cheers,

Phil,

Re: 1.17.1 zmc bug?

Posted: Tue Jan 27, 2004 12:25 pm
by sema
0.9.16 & RedHat 7.3 - compiled and work

1.7.0, 1.7.1 - not compiled:

zma.cpp: In function `void zm_die_handler (int)':
zma.cpp:29: `strsignal' undeclared (first use this function)
zma.cpp:29: (Each undeclared identifier is reported only once for each
function it appears in.)

Re: 1.17.1 zmc bug?

Posted: Tue Jan 27, 2004 5:29 pm
by zoneminder
Hi,

This is a new function call included in the last version. However a check for it should have been included and wasn't. I've done a fix for 1.17.2 but if you want in the meantime you can just comment out the contents of the *_handler functions apart from the exit line or apply the patches include below.

Index: zma.cpp
===================================================================
RCS file: /cvs/zm/src/zma.cpp,v
retrieving revision 1.19
diff --context -r1.19 zma.cpp
*** zma.cpp 14 Jan 2004 21:26:47 -0000 1.19
--- zma.cpp 27 Jan 2004 17:17:20 -0000
***************
*** 26,38 ****

void zm_die_handler( int signal )
{
! char * error = strsignal(signal);
! size_t errorStringSize = strlen(error) + strlen("Got signal (), crashing.");
! char * errorString =(char *) malloc(errorStringSize + 1); // plus 1 for termination char.
! (void) snprintf(errorString, errorStringSize, "Got signal (%s), crashing.", error);

! Info(( (const char *)errorString ));
! free(errorString);
exit( signal );
}

--- 26,42 ----

void zm_die_handler( int signal )
{
! #if HAVE_DECL_STRSIGNAL
! char * error = strsignal(signal);
! size_t errorStringSize = strlen(error) + strlen("Got signal (), crashing.");
! char * errorString =(char *) malloc(errorStringSize + 1); // plus 1 for termination char.
! (void) snprintf(errorString, errorStringSize, "Got signal (%s), crashing.", error);

! Info(( (const char *)errorString ));
! free(errorString);
! #else /* HAVE_DECL_STRSIGNAL */
! Info(( "Got signal %d, crashing", signal ));
! #endif /* HAVE_DECL_STRSIGNAL */
exit( signal );
}

***************
*** 40,52 ****

void zm_term_handler( int signal )
{
! char * error = strsignal(signal);
! size_t errorStringSize = strlen(error) + strlen("Got signal (), exiting.");
! char * errorString =(char *) malloc(errorStringSize + 1); // plus 1 for termination char.
! (void) snprintf(errorString, errorStringSize, "Got signal (%s), exiting.", error);

! Info(( (const char *)errorString ));
! free(errorString);
zma_terminate = true;
}

--- 44,60 ----

void zm_term_handler( int signal )
{
! #if HAVE_DECL_STRSIGNAL
! char * error = strsignal(signal);
! size_t errorStringSize = strlen(error) + strlen("Got signal (), exiting.");
! char * errorString =(char *) malloc(errorStringSize + 1); // plus 1 for termination char.
! (void) snprintf(errorString, errorStringSize, "Got signal (%s), exiting.", error);

! Info(( (const char *)errorString ));
! free(errorString);
! #else /* HAVE_DECL_STRSIGNAL */
! Info(( "Got TERM signal, exiting" ));
! #endif /* HAVE_DECL_STRSIGNAL */
zma_terminate = true;
}

Index: zmf.cpp
===================================================================
RCS file: /cvs/zm/src/zmf.cpp,v
retrieving revision 1.6
diff --context -r1.6 zmf.cpp
*** zmf.cpp 27 Jan 2004 17:03:43 -0000 1.6
--- zmf.cpp 27 Jan 2004 17:19:12 -0000
***************
*** 40,64 ****

void zm_die_handler( int signal )
{
! char * error = strsignal(signal);
! size_t errorStringSize = strlen(error) + strlen("Got signal (), crashing.");
! char * errorString =(char *) malloc(errorStringSize + 1); // plus 1 for termination char.
! (void) snprintf(errorString, errorStringSize, "Got signal (%s), crashing.", error);

! Info(( (const char *)errorString ));
! free(errorString);
exit( signal );
}

void zm_term_handler( int signal )
{
! char * error = strsignal(signal);
! size_t errorStringSize = strlen(error) + strlen("Got signal (), exiting.");
! char * errorString =(char *) malloc(errorStringSize + 1); // plus 1 for termination char.
! (void) snprintf(errorString, errorStringSize, "Got signal (%s), exiting.", error);

! Info(( (const char *)errorString ));
! free(errorString);
exit( 0 );
}

--- 40,72 ----

void zm_die_handler( int signal )
{
! #if HAVE_DECL_STRSIGNAL
! char * error = strsignal(signal);
! size_t errorStringSize = strlen(error) + strlen("Got signal (), crashing.");
! char * errorString =(char *) malloc(errorStringSize + 1); // plus 1 for termination char.
! (void) snprintf(errorString, errorStringSize, "Got signal (%s), crashing.", error);

! Info(( (const char *)errorString ));
! free(errorString);
! #else /* HAVE_DECL_STRSIGNAL */
! Info(( "Got signal %d, crashing", signal ));
! #endif /* HAVE_DECL_STRSIGNAL */
exit( signal );
}

void zm_term_handler( int signal )
{
! #if HAVE_DECL_STRSIGNAL
! char * error = strsignal(signal);
! size_t errorStringSize = strlen(error) + strlen("Got signal (), exiting.");
! char * errorString =(char *) malloc(errorStringSize + 1); // plus 1 for termination char.
! (void) snprintf(errorString, errorStringSize, "Got signal (%s), exiting.", error);

! Info(( (const char *)errorString ));
! free(errorString);
! #else /* HAVE_DECL_STRSIGNAL */
! Info(( "Got TERM signal, exiting" ));
! #endif /* HAVE_DECL_STRSIGNAL */
exit( 0 );
}

Re: 1.17.1 zmc bug?

Posted: Tue Jan 27, 2004 10:34 pm
by alan
Hi Philip,

I've rolled back to the previous version as it's a production system we use. But I will attempt to better describe what was happening.

When I created more than one "Monitor" with the source settings like:

Video device : 0
Video channel : 0

and

Video device : 0
Video channel : 1

.. and you look at either monitor, sometimes momentarily you'd see a frame of some other channel (or the other channel eg 0-1 or 1-0).

When I add all ten monitor inputs to the system the problem would get worse. The channel swapping between monitors gets so aggressive they never appear to show their "correct" channel.

The really weird thing is that the frame "label" that is inserted into the image (eg "Backroom 27/01/04") stays correct in the image but is being shown on the wrong monitor.

I've tryed setting a Max FPS on all channels and turning on and off the ignore FPS option but it has little or no effect. To me it looks like either the card isn't changing channel fast enough for it to capture the right image or something else is getting screwy.

There are no logs that represent anything I can see as a cause, they look exactly like the older version when the system is running, it's just the output to the browser is all mixed up.

Hope this helps,
Alan.