Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with ImageMagick 7.1.0-45 #586

Closed
al-cmyk opened this issue Aug 3, 2022 · 2 comments
Closed

Issues with ImageMagick 7.1.0-45 #586

al-cmyk opened this issue Aug 3, 2022 · 2 comments
Assignees
Labels
Milestone

Comments

@al-cmyk
Copy link

al-cmyk commented Aug 3, 2022

I'm having some issues using wand with the latest ImageMagick version.
With 7.1.0-45 creating a Color results in this error:

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from wand.color import Color
>>> Color("#ffffffff")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\wand\color.py", line 107, in
__init__
    with self:
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\wand\color.py", line 129, in
__enter__
    self.resource = library.NewPixelWand()
OSError: exception: access violation writing 0x0000000000000008
>>>

On 7.1.0-34 the same code works just fine:

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from wand.color import Color
>>> Color("#ffffffff")
wand.color.Color('srgba(255,255,255,1)')
>>>

Both ImageMagick versions are Q16-HDRI-x64-dll and the wand version used is 0.6.8. Apparently there's an issue with the NewPixelWand function, but at least in ImageMagick I couldn't see any differences between the two versions:
https://github.com/ImageMagick/ImageMagick/blob/7.1.0-34/MagickWand/pixel-wand.c#L382
https://github.com/ImageMagick/ImageMagick/blob/7.1.0-45/MagickWand/pixel-wand.c#L382
I got the older version for testing from the Github Actions of the ImageMagick repository, specifically this one.
I can provide more information if necessary, maybe I'm just missing something obvious.

@emcconville
Copy link
Owner

Thanks for reporting this. Looks like something upstream changed with memory management. Until this gets resolved, just invoke resource genesis manually.

from wand.color import Color
from wand.resource import genesis as wand_genesis

wand_genesis()
c = Color("#ffffffff")

@emcconville
Copy link
Owner

Fixed, and will be released in the coming days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants