bugGNU Octave - Bugs: bug #52792, imread: error accessing...

 
 

bug #52792: imread: error accessing configuration and Octave crash on Windows

Submitter:  Stephan Gebauer <stephan_ii>
Submitted:  Wed 03 Jan 2018 11:18:47 AM UTC
   
 
Category:  Octave Function Severity:  4 - Important
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 17 Jul 2018 06:36:20 PM UTC, comment #13: 

Thanks for the quick fix.
I am also getting 5/5 passes on "test imread".

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Tue 17 Jul 2018 03:49:57 PM UTC, comment #12: 

I pushed a change up for gm 1.3.30 to lookup the files based on a dynamic path rather than what is hardcoded into the library.

http://hg.octave.org/mxe-octave/rev/7c3e3151bf58

with it, I am once again getting 5/5 passes on imread

Interestingly, 1.3.28 was silently failing to find the gm config files but still worked sometimes

John Donoghue <lostbard>
Group Member
Mon 16 Jul 2018 12:10:14 PM UTC, comment #11: 

AT least for recent issue in comment #10, I remember seeing that going from 1.3.28 -> 1.3.29, so has, saw the issue and reverted back to 1.3.28.

For some reason I missed the issue still existing in 1.3.30, so it may need go back to 1.3.28 again.

John Donoghue <lostbard>
Group Member
Sun 15 Jul 2018 08:55:27 PM UTC, comment #10: 

I am seeing the same or very similar bug now with GraphicsMagick 1.3.30 when running

test imread


On the first run I get the same error as the OP:

Magick++ exception: Magick: Unable to access configuration file (delegates.mgk) reported by magick/blob.c:2135 (GetConfigureBlob)


On the second and subsequent runs, I get:

Magick++ exception: Magick: No decode delegate for this image format (C:\Users\Markus\AppData\Local\Temp\oct-wiPyVC.png) reported by magick/constitute.c
:1535 (ReadImage)


No segfault so far. Setting the environment variable doesn't make a difference.

The tests still passed with GraphicsMagick 1.3.28 on a build from 2 weeks ago. No need to set the environment variable with that version.

Markus Mützel <mmuetzel>
Group administrator
Tue 20 Mar 2018 06:44:01 PM UTC, comment #9: 

Yes, Octave 5.4.0+
- complains about "delegates.mgk"
- crashes after the second try of imread.

BTW in the original example the argument order was wrong. I used this:

print ("-dpdf", "animation.pdf", "append")


otherwise a file "append.pdf" was created rather than "animation.pdf". Could be another bug.

BTW Complaints about a missing delegates.mgk are an often returning thing that pops up every once and a while, on my Linux and Windows boxes. Apparently graphicsmagick is a bit unstable?

release => dev

Philip Nienhuis <philipnienhuis>
Group Member
Tue 20 Mar 2018 07:38:00 AM UTC, comment #8: 

Can someone with access to Windows test Octave 4.2.2 to verify that this bug causes an Octave crash?

Mike Miller <mtmiller>
Group Member
Wed 03 Jan 2018 09:34:38 PM UTC, comment #7: 

Hi,

performend setenv with double quotes, still the same error.



Stephan Gebauer <stephan_ii>
Wed 03 Jan 2018 08:31:07 PM UTC, comment #6: 

If you use double quotes, backslashes \ are interpreted so you have to escape them or using single quotes. So please try


setenv ("MAGICK_CONFIG_PATH", 'C:\usr\Octave_421\lib64\GraphicsMagick-1.3.25\config')


or


setenv ("MAGICK_CONFIG_PATH", "C:\\usr\\Octave_421\\lib64\\GraphicsMagick-1.3.25\\config')


Andreas Weber <andy1978>
Group Member
Wed 03 Jan 2018 06:22:23 PM UTC, comment #5: 

Hi,

when i use imread to read a .png or .jpg file there is no problem. checked with imshow the figures are right loaded, works fine.

even when i read an abitary .pdf file the same error occurs.

the example file is attached, try to read with following comand:

im = imread("93xxc_appendix_c.pdf", "Index", "all");


will cause the error.

checked the datapath for the "delegates.mgk", this file at the right folder : ...\Octave_421\lib64\GraphicsMagick-1.3.25\config

my local "delegates.mgk" also attached here.

setenv ("MAGICK_CONFIG_PATH", "C:\usr\Octave_421\lib64\GraphicsMagick-1.3.25\config")

doesn't change anything, error still occurs.

Stephan Gebauer <stephan_ii>
Wed 03 Jan 2018 04:07:41 PM UTC, comment #4: 

In the 4.2.1 zip for windoze the configuration file is in "lib64/GraphicsMagick-1.3.25/config/delegates.mgk"

@Stephan: Can you confirm that there is a delegation.mgk in your installation and can you try to add


setenv ("MAGICK_CONFIG_PATH", path to your delegation.mgk)


before your posted code? Can you also confirm that's just a problem with imread and pdfs (try to load an arbitrary PDF) and other formats like png or jpg work as expected?

Andreas Weber <andy1978>
Group Member
Wed 03 Jan 2018 03:53:05 PM UTC, comment #3: 

The code works fine under Debian stretch with Octave 4.2.1 so this looks like a problem with the windows build

Andreas Weber <andy1978>
Group Member
Wed 03 Jan 2018 01:57:09 PM UTC, comment #2: 

Hi,

i tried to put the close() after the print, but no change.
Also when waiting for some minutes and then perform the imread,
will still cause this error.

Stephan Gebauer <stephan_ii>
Wed 03 Jan 2018 11:58:12 AM UTC, comment #1: 

You could try putting a close() after the print(). The animation.pdf
may not have been fully written out.

Michael Godfrey <godfrey>
Group Member
Wed 03 Jan 2018 11:18:47 AM UTC, original submission:  

Hi,

when executing following code snipped:


plot(sin(0:0.1:20))
print("animation.pdf", "-append");
im = imread("animation.pdf", "Index", "all");


octave throws this error under windows 10:


error: Magick++ exception: Magick: Unable to access configuration file (delegates.mgk) reported by magick/blob.c:1946 (GetConfigureBlob)
error: called from
    _imread_ at line 78 column 10
    imageIO at line 117 column 26
    imread at line 106 column 30

when i excute again

im = imread("animation.pdf", "Index", "all");

then Octave crashes completly.

Stephan Gebauer <stephan_ii>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #42809:  delegates.mgk added by stephan_ii (7KiB - application/octet-stream)
file #42810:  93xxc_appendix_c.pdf added by stephan_ii (227KiB - application/pdf)

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by godfrey (Posted a comment)
  • -email is unavailable- added by stephan_ii (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-17 mmuetzel StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2018-07-15 mmuetzel Dependencies- bugs #54311 is dependent
    2018-03-20 philipnienhuis StatusNeed Info Confirmed
        Release4.2.1 dev
    2018-03-20 mtmiller CategoryNone Octave Function
        Severity3 - Normal 4 - Important
        StatusNone Need Info
        SummaryError and crash with imread imread: error accessing configuration and Octave crash on Windows
    2018-01-03 stephan_ii Attached File- Added delegates.mgk, #42809
        Attached File- Added 93xxc_appendix_c.pdf, #42810

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code