Cairo.jl icon indicating copy to clipboard operation
Cairo.jl copied to clipboard

Cairo/Windows ReadOnlyMemoryError()

Open cormullion opened this issue 10 months ago • 3 comments

When running my tests on CI (both Julia 1.9 - windows-latest - x64 and Julia 1 - windows-latest - x64) I'm seeing a ReadOnlyMemoryError():

 Got exception outside of a @test
  LoadError: ReadOnlyMemoryError()
  Stacktrace:
    [1] get_layout_size
      @ C:\Users\runneradmin\.julia\packages\Cairo\smWIA\src\Cairo.jl:1184 [inlined]
    [2] text(ctx::Cairo.CairoContext, x::Float64, y::Float64, str::String; halign::String, valign::String, angle::Int64, markup::Bool)
      @ Cairo C:\Users\runneradmin\.julia\packages\Cairo\smWIA\src\Cairo.jl:1265
    [3] text
      @ C:\Users\runneradmin\.julia\packages\Cairo\smWIA\src\Cairo.jl:1255 [inlined]

from log here

I don't know what this error means or how significant it is... Tests run OK on MacOS and Linux. Cairo v1.0.5.

cormullion avatar Apr 01 '24 09:04 cormullion

Had the same problem. What helped was to revert (and pin) Glib_jll to version 2.76.5. The downside is that this is in conflict with the latest versions of Gtk4 and CairoMakie...

There are also other packages which run perfectly fine on non-Windows platforms but suffer from these ReadOnlyMemoryErrors on Windows, like for example GRIB.jl. I really hope that a Windows-expert will popup soon to solve this!

mwlidar avatar Jul 10 '24 11:07 mwlidar

For me locally this is fixed with Pango_jll 1.54.0.

jwahlstrand avatar Aug 22 '24 17:08 jwahlstrand

For me the crashes (1.10.4 / Windows11) are also gone with the latest versions of Cairo/Pango etc. But now I have text cut off by a few pixels at the top 😒 Will open a separate issue on that...

mwlidar avatar Aug 25 '24 18:08 mwlidar