this just happened overnight

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
BobLaske
Posts: 20
Joined: Fri Oct 13, 2017 3:55 am

this just happened overnight

Post by BobLaske » Sat Mar 16, 2019 4:50 pm

Without changing any settings, the night before, the output was fine. This morning, the image looks like this.
2019-03-16_085954.png
2019-03-16_085954.png (536.45 KiB) Viewed 182 times
I rebooted the server and still the same output.
The camera is a very basic IP camera, reached by going to http://192.168.12.241:8080/?action=stream on a browser. Using any browser, the image (video frames) is fine. All is working. But, through ZM, I get the above.

My settings are;
General
Source Type: Remote
Function: Monitor
MFPS are empty as per someone's suggestion on github.
Alarm FPS same as above.

Source
Protocol: HTTP
Method: Simple
Host name: acadmin:1234@192.168.1.241
Port: 8080
Path: /?action=stream

Then the rest other than specifying resolution are default. What could have changed overnight that would cause this? I would have thought this kind of look was phase shift in old TV's only :).

mikb
Posts: 383
Joined: Mon Mar 25, 2013 12:34 pm

Re: this just happened overnight

Post by mikb » Sat Mar 16, 2019 5:29 pm

Although you've changed nothing, you've not said what resolution the camera is supposed to be returning, vs the resolution you've set in Zoneminder

It looks like the camera is delivering fewer pixels per line than you are telling ZM to interpret.

Measuring off your PNG in GIMP, I make it about 320 pixels across per repeat (or 640, depending on whether I've slipped a line), but your image is 800 pixels wide.

Your camera is sending 320/640?? and Zoneminder is set for 800x?? or something like that. Otherwise, it looks like a perfectly good colour picture.

Check all settings, and if you still don't see it, post the settings :)

It should look more like this ... ?
a.png
a.png (346.81 KiB) Viewed 178 times

BobLaske
Posts: 20
Joined: Fri Oct 13, 2017 3:55 am

Re: this just happened overnight

Post by BobLaske » Mon Mar 18, 2019 5:44 pm

Hi,

I like how you broke things down and how you 'fixed' the image :).
How did you do that?

I failed the post the resolution since I had tried a number of variations.
At the time of the image, the camera was set to 1600x900 and so was ZM.

However, now that I'm playing with it again, here is what I've discovered.

When using what might be considered odd resolutions such as 1600x900 (odd to ZM I guess), I get the kind of image I showed.
Changing the resolution in the GUI before changing them on the camera also crashes ZM completely. I've tried restarting it from
the CLI only to find that I have to fully reboot. No idea what's causing this.

Now I have it set to 1280x960 which is working but there is a black bottom to the image now. I then changed it to 1920x1080 and it works just fine without a black section at the bottom. I'd like a smaller image since I don't need 1920x1080 in this case.

This is how things look now.
2019-03-18_104827.png
2019-03-18_104827.png (1023.48 KiB) Viewed 147 times
So, the problem seems to be related to certain resolutions.
No idea why ZM is crashing however.

mikb
Posts: 383
Joined: Mon Mar 25, 2013 12:34 pm

Re: this just happened overnight

Post by mikb » Tue Mar 19, 2019 5:15 pm

BobLaske wrote:
Mon Mar 18, 2019 5:44 pm
I like how you broke things down and how you 'fixed' the image :).
How did you do that?
GIMP, De-interlace filter (although the picture isn't interlaced, it gets rid of every other line which clears up most of the mess). Then re-scale to 16:9 aspect (as everything looks thin at 4:3 -- unlike ZM I am prepared to guess at your resolution and camera settings :).
BobLaske wrote:
Mon Mar 18, 2019 5:44 pm
When using what might be considered odd resolutions such as 1600x900 (odd to ZM I guess), I get the kind of image I showed.
Changing the resolution in the GUI before changing them on the camera also crashes ZM completely. I've tried restarting it from
the CLI only to find that I have to fully reboot. No idea what's causing this.
From a programming point of view, ZM shouldn't crash when you do that (I'm sure you know that, as do the ZM devs).

From a practical point of view, changing the resolution unexpectedly is kinda rough -- probably best to stop the camera at ZM, change both ends, start the camera. It's likely you've got a memory corruption due to data being delivered from the camera not being the expected size and shape, exceeding a storage allocation somewhere, and that's why you get a crash.

BobLaske
Posts: 20
Joined: Fri Oct 13, 2017 3:55 am

Re: this just happened overnight

Post by BobLaske » Tue Mar 19, 2019 5:34 pm

It's a fresh install and only using 20GB of a 1TB drive so I think what you're talking about is related to something else.

>It's likely you've got a memory corruption due to data being delivered from the camera not being the expected size and shape,
>exceeding a storage allocation somewhere, and that's why you get a crash.

Maybe this is related to a 'shared memory' error I see now and then, especially if I try connecting two USB camera's.

mikb
Posts: 383
Joined: Mon Mar 25, 2013 12:34 pm

Re: this just happened overnight

Post by mikb » Wed Mar 20, 2019 6:21 pm

It doesn't matter whether it's a fresh install or not, or how much hard drive/shared memory you have -- although running out of those is bad too!

What I'm saying is that if you change the resolution at the camera, or Zoneminder, while it is running, and they disagree on the size of the picture for even a moment, then that could well cause a crash. In a perfect world it wouldn't. But you are changing the size of the incoming data stream (or the container it's being stored into) and that can cause overflows in memory, which corrupts stuff, and crashes the process.

Don't do that :)

Do experiment with different "round numbered resolutions" though (try and make the X resolution a whole multiple of 16 if messing about with it, I've had trouble with FFMPEG not liking "odd" horizontal resolutions, which also messes up Blender's video editor!)

BobLaske
Posts: 20
Joined: Fri Oct 13, 2017 3:55 am

Re: this just happened overnight

Post by BobLaske » Wed Mar 20, 2019 7:13 pm

I understand.

I'm not a coder but I am the head of a software project and the one thing we do not ever stand for is ANY reason for something to crash.
No matter what you do to it, it should give you an error, complain, call you names, not serve you breakfast for a month but never crash.

>Do experiment with different "round numbered resolutions"

Now I know a term for that :). Thanks.

I'll do that and thank you for responding to my question.

mikb
Posts: 383
Joined: Mon Mar 25, 2013 12:34 pm

Re: this just happened overnight

Post by mikb » Thu Mar 21, 2019 5:27 pm

BobLaske wrote:
Wed Mar 20, 2019 7:13 pm
the one thing we do not ever stand for is ANY reason for something to crash.
You are correct, and it's a good thing to strive for. In practice, sometimes it doesn't happen.

On a positive note, I'm sure the ZM developers know this principle too, but need more "hands on deck" to find the bugs/risk points and submit fixes.

User avatar
iconnor
Posts: 666
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: this just happened overnight

Post by iconnor » Thu Mar 21, 2019 9:58 pm

I agree ZM should not crash. I will do some testing and see if I can recreate yours.

BobLaske
Posts: 20
Joined: Fri Oct 13, 2017 3:55 am

Re: this just happened overnight

Post by BobLaske » Fri Mar 22, 2019 2:32 am

Please, let me know how I can help. I can easily get it to crash simply my playing with settings. In some cases, the only way to get zm back is to fully reboot the server since restarting the service doesn't do it.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest