Closed opoudjis closed 5 months ago
Fixed and released in v0.7.6 as seen in the workflow:
https://github.com/metanorma/metanorma-cli/actions/runs/8972014184/job/24691227674
New crash, in isodoc rspec test:
i = Nokogiri::XML("<img src=\"data:application/xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+Cjw/eG1sLXN0eWxlc2hlZXQgdHlwZT0idGV4dC94c2wiIGhyZWY9Ii4uLy4uLy4uL3hzbC9yZXNfZG9jL2ltZ2ZpbGUueHNsIj8+CjwhRE9DVFlQRSBpbWdmaWxlLmNvbnRlbnQgU1lTVEVNICIuLi8uLi8uLi9kdGQvdGV4dC5lbnQiPgo8aW1nZmlsZS5jb250ZW50IG1vZHVsZT0iZnVuZGFtZW50YWxzX29mX3Byb2R1Y3RfZGVzY3JpcHRpb25fYW5kX3N1cHBvcnQiIGZpbGU9ImFjdGlvbl9zY2hlbWFleHBnMS54bWwiPgo8aW1nIHNyYz0iYWN0aW9uX3NjaGVtYWV4cGcxLmdpZiI+CjxpbWcuYXJlYSBzaGFwZT0icmVjdCIgY29vcmRzPSIyMTAsMTg2LDM0MywyMjciIGhyZWY9Ii4uLy4uL3Jlc291cmNlcy9iYXNpY19hdHRyaWJ1dGVfc2NoZW1hL2Jhc2ljX2F0dHJpYnV0ZV9zY2hlbWEueG1sIiAvPgo8aW1nLmFyZWEgc2hhcGU9InJlY3QiIGNvb3Jkcz0iMTAsMTAsOTYsNTEiIGhyZWY9Ii4uLy4uL3Jlc291cmNlcy9hY3Rpb25fc2NoZW1hL2FjdGlvbl9zY2hlbWEueG1sIiAvPgo8aW1nLmFyZWEgc2hhcGU9InJlY3QiIGNvb3Jkcz0iMjEwLDI2NCwzNTgsMzA1IiBocmVmPSIuLi8uLi9yZXNvdXJjZXMvc3VwcG9ydF9yZXNvdXJjZV9zY2hlbWEvc3VwcG9ydF9yZXNvdXJjZV9zY2hlbWEueG1sIiAvPgo8L2ltZz4KPC9pbWdmaWxlLmNvbnRlbnQ+Cg==\" height=\"20\" width=\"auto\"/>").root
Vectory::ImageResize.new.call(i, loc, @maxheight, @maxwidth)
crashes on
def get_image_size(img, path)
detected = ImageSize.path(path).size
realsize = detected unless detected.all? { |x| x.nil? || x.zero? }
s = image_size_interpret(img, realsize || [nil, nil])
image_size_zeroes_complete(s, realsize)
end
Because ImageSize.path(path).size
is returning nil.
Presumably it will be enough to change the line to unless detected.nil? || detected.all? { |x| x.nil? || x.zero? }
Eeerr, sorry! I'll fix it.
@opoudjis Did it fail at GHA somewhere? I'd like to ensure that other specs don't fail too.
I did see it in isodoc, but I can't find it: https://github.com/metanorma/isodoc/actions/runs/9020101255/job/24784607346
I must have overwritten the logs when I resubmitted the code. I'm about to submit a new update, which may trigger it again
Is this fixed?
This is not fixed.
THIS MUST BE FIXED. I am releasing Metanorma, after a month delay, next Monday.
Confirmed:
https://github.com/metanorma/isodoc/actions/runs/9044242039/job/24852701752
I've released v0.7.7 of vectory. Now it works with this GHA. Now this workflow run has the same 3 fails which were before - not related to vectory.
@opoudjis Thank you for the GHA example, it helped to explore the issue.
Newly affecting BSI document:
To replicate:
I am zipping the folder and sending it to you on Skype.
The images are SVG, and all are provided without image sizes: