Assertion Failed: pixels == info->pixels

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Pash91
Posts: 15
Joined: 2015-07-09T07:58:48-07:00
Authentication code: 1151

Assertion Failed: pixels == info->pixels

Post by Pash91 »

Hello,
I compiled ImageMagick 7.0.2-2Q16 on Windows 10, Static Multi-threaded runtimes, 64 bit distribution, HDRI, OpenMP, OpenCL, Q16 and Studio 2015. Specifically, I wanted OpenCL support. I tried a simple resize of a 300 MB image from NASA and am getting the error:

Assertion Failed: pixels == info->pixels, file ..\..\ImageMagick\MagickCore\opencl.c line 1415. Is there a different/proper way to compile this with OpenCL?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Assertion Failed: pixels == info->pixels

Post by dlemstra »

You are getting this assertion because your graphics card did something that we did not expect. Can you share a link to the image you used an that command that you executed?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Pash91
Posts: 15
Joined: 2015-07-09T07:58:48-07:00
Authentication code: 1151

Re: Assertion Failed: pixels == info->pixels

Post by Pash91 »

Sure, the image is here: http://eoimages.gsfc.nasa.gov/images/im ... 600.B1.png

If it helps, I'm running a GTX 1080 with the 368.39 drivers and CUDA 8.0.27

Command: convert.exe world.topo.bathy.200407.3x21600x21600.B1.png -resize 25% a.png
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Assertion Failed: pixels == info->pixels

Post by dlemstra »

My current GPU does appear to use OpenCL with this image and switches to CPU. I will get a new card in a couple weeks that might be able to load it. I will give it another try then.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Pash91
Posts: 15
Joined: 2015-07-09T07:58:48-07:00
Authentication code: 1151

Re: Assertion Failed: pixels == info->pixels

Post by Pash91 »

dlemstra wrote:My current GPU does appear to use OpenCL with this image and switches to CPU. I will get a new card in a couple weeks that might be able to load it. I will give it another try then.
I was wondering if you had a chance to try this again?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Assertion Failed: pixels == info->pixels

Post by dlemstra »

I had time to test this again with the latest release and I am unable to reproduce your issue. On my machine it first tries to use the GPU but fails halfway during the conversion. It then switches to CPU resize and creates an image without any problems. Can you still reproduce the issue with the latest version?

Are you a developer who can build IM from source? This might help us track down the issue.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Pash91
Posts: 15
Joined: 2015-07-09T07:58:48-07:00
Authentication code: 1151

Re: Assertion Failed: pixels == info->pixels

Post by Pash91 »

I'll try with the newest version, but shouldn't it not fail halfway? Mine didn't go anywhere as far as I can tell, but it doesn't seem like failing half way is the intended behavior.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Assertion Failed: pixels == info->pixels

Post by dlemstra »

It can fail halfway when we are asking for too much memory from the card. This might not be the best behavior but it can happen and it is not considered a bug.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Pash91
Posts: 15
Joined: 2015-07-09T07:58:48-07:00
Authentication code: 1151

Re: Assertion Failed: pixels == info->pixels

Post by Pash91 »

I just tried it on the newest version and measured the performance against a version not compiled with OpenCL. Both finished, but they took the exact same amount of time 1Min32Sec. I'm hoping this suggest it's not using the GPU for some reason.
Post Reply