Zoneminder 1.26.4 - rotation of captured image broken

Forum for questions and support relating to the 1.26.x releases only.
Locked
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Zoneminder 1.26.4 - rotation of captured image broken

Post by McFuzz »

Gents,

It looks like with 1.26.4, the capabilities of rotating a camera is broken... I have a camera that is rotated to the left via the source tab, with capture width of 480 and capture height of 640; with this kind of a setup, image is no longer visible and the logs explode:

Image

I confirmed this happens with 'rotate right' as well. All other options appear to be working...


Thanks for looking :)
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: Zoneminder 1.26.4 - rotation of captured image broken

Post by mastertheknife »

Hi

Please paste the output of the addr2line command here.
Kfir Itzhak.
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: Zoneminder 1.26.4 - rotation of captured image broken

Post by McFuzz »

Sorry - I already reverted back to 1.26.3...

Also, not familiar with addr2line...? Can you please give me a bit more context?

Thanks.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: Zoneminder 1.26.4 - rotation of captured image broken

Post by mastertheknife »

There is a message in your log (shown in your screenshot) that says "backtrace complete, please run the following command for more information"
Running the command on your machine will create output that includes the exact location in the code that causes the crash. This is essential for fixing this.
Kfir Itzhak.
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: Zoneminder 1.26.4 - rotation of captured image broken

Post by McFuzz »

mastertheknife wrote:There is a message in your log (shown in your screenshot) that says "backtrace complete, please run the following command for more information"
Running the command on your machine will create output that includes the exact location in the code that causes the crash. This is essential for fixing this.

Gotcha! I'll give it a shot tonight and will report with output :)
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: Zoneminder 1.26.4 - rotation of captured image broken

Post by mastertheknife »

Don't even have to reinstall 1.26.4. Just need to point the addr2line command line from the screenshot at the zmc file from 1.26.4
Kfir Itzhak.
twice
Posts: 24
Joined: Tue Nov 02, 2010 12:38 am

Re: Zoneminder 1.26.4 - rotation of captured image broken

Post by twice »

dont know if this is correct but it works :D

the addr2line command output is rotate right and left:
[/ZoneMinder-master/src/zm_image.cpp:2360 & 2442
/ZoneMinder-master/src/zm_monitor.cpp:2783
/ZoneMinder-master/src/zmc.cpp:263
]
work around is in zm_image.cpp replace

Code: Select all

unsigned char *d_ptr;
				for ( unsigned  int i = new_width-1; i >= 0; i-- )
				{
					d_ptr = rotate_buffer+i;
					for ( unsigned  int j = new_height-1; j >= 0; j-- )
                                       {
with this

Code: Select all

unsigned char *d_ptr;
				for (  int i = new_width-1; i >= 0; i-- )
				{
					d_ptr = rotate_buffer+i;
					for (  int j = new_height-1; j >= 0; j-- )
					{
around lines 2354 and 2442

regards Twice
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: Zoneminder 1.26.4 - rotation of captured image broken

Post by mastertheknife »

Looks like i am the one to shoot for this. I did this 23 days ago while working on eliminating signed comparison warnings. It took many changes until the warnings were gone.
https://github.com/ZoneMinder/ZoneMinde ... 1854c5dd09
Kfir Itzhak.
twice
Posts: 24
Joined: Tue Nov 02, 2010 12:38 am

Re: Zoneminder 1.26.4 - rotation of captured image broken

Post by twice »

thanks for all your work


regards Twice
McFuzz
Posts: 181
Joined: Tue Aug 28, 2012 7:03 am

Re: Zoneminder 1.26.4 - rotation of captured image broken

Post by McFuzz »

Awww - I should have checked the thread before redoing the install XD

Thanks for your guys' work! I'll apply the fixes :)
Locked