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

Reaches EXCEPTION_ACCESS_VIOLATION #232

Open
charleskawczynski opened this issue Sep 15, 2024 · 4 comments
Open

Reaches EXCEPTION_ACCESS_VIOLATION #232

charleskawczynski opened this issue Sep 15, 2024 · 4 comments

Comments

@charleskawczynski
Copy link

charleskawczynski commented Sep 15, 2024

I recently ran into the error:

julia> ProfileView.view(fg)
Gtk4.GtkWindowLeaf(accessible-role=GTK_ACCESSIBLE_ROLE_APPLICATION, name="", parent, root, width-request=-1, height-request=-1, visible=true, sensitive=true, can-focus=true, has-focus=false, can-target=true, focus-on-click=true, focusable=false, has-default=false, receives-default=false, cursor, has-tooltip=false, tooltip-markup=nothing, tooltip-text=nothing, opacity=1.000000, overflow=GTK_OVERFLOW_HIDDEN, halign=GTK_ALIGN_FILL, valign=GTK_ALIGN_FILL, margin-start=0, margin-end=0, margin-top=0, margin-bottom=0, hexpand=false, vexpand=false, hexpand-set=false, vexpand-set=false, scale-factor=2, css-name="window", css-classes, layout-manager, title="Profile", resizable=true, modal=false, default-width=800, default-height=600, destroy-with-parent=false, hide-on-close=false, icon-name=nothing, display, decorated=true, deletable=true, transient-for, application, default-widget, focus-widget, child, titlebar, handle-menubar-accel=true, is-active=true, suspended=false, startup-id, mnemonics-visible=false, focus-visible=false, maximized=false, fullscreened=false)

julia>
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x64f9a300 -- FcPatternObjectPosition at /workspace/srcdir/fontconfig-2.13.96/src\fcpat.c:464
in expression starting at none:0
FcPatternObjectPosition at /workspace/srcdir/fontconfig-2.13.96/src\fcpat.c:464
FcPatternObjectFindElt at /workspace/srcdir/fontconfig-2.13.96/src\fcpat.c:492 [inlined]
FcPatternObjectGetWithBinding at /workspace/srcdir/fontconfig-2.13.96/src\fcpat.c:959
FcPatternObjectGet at /workspace/srcdir/fontconfig-2.13.96/src\fcpat.c:979 [inlined]
FcPatternObjectGetDouble at /workspace/srcdir/fontconfig-2.13.96/src\fcpat.c:1029
gsk_reload_font at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_device_lookup_glyph_image at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_glyph_node at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_node.part.21 at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_transform_node at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_node.part.21 at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_container_node at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_node.part.21 at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_container_node at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_node.part.21 at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_transform_node at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_node.part.21 at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_container_node at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_node.part.21 at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_rounded_clip_node at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_node.part.21 at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_container_node at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_node.part.21 at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_transform_node at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_add_node.part.21 at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_node_processor_process at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_frame_render at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_gpu_renderer_render at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gsk_renderer_render at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gtk_widget_render at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
surface_render at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
_gdk_marshal_BOOLEAN__BOXEDv at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
_g_closure_invoke_va at C:\Users\kawcz\.julia\artifacts\8d3fd03e0d0d508953ff7210605b9bb180ef9908\bin\libgobject-2.0-0.dll (unknown line)
signal_emit_valist_unlocked at C:\Users\kawcz\.julia\artifacts\8d3fd03e0d0d508953ff7210605b9bb180ef9908\bin\libgobject-2.0-0.dll (unknown line)
g_signal_emit at C:\Users\kawcz\.julia\artifacts\8d3fd03e0d0d508953ff7210605b9bb180ef9908\bin\libgobject-2.0-0.dll (unknown line)
gdk_surface_paint_on_clock at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
_g_closure_invoke_va at C:\Users\kawcz\.julia\artifacts\8d3fd03e0d0d508953ff7210605b9bb180ef9908\bin\libgobject-2.0-0.dll (unknown line)
signal_emit_valist_unlocked at C:\Users\kawcz\.julia\artifacts\8d3fd03e0d0d508953ff7210605b9bb180ef9908\bin\libgobject-2.0-0.dll (unknown line)
g_signal_emit at C:\Users\kawcz\.julia\artifacts\8d3fd03e0d0d508953ff7210605b9bb180ef9908\bin\libgobject-2.0-0.dll (unknown line)
gdk_frame_clock_paint_idle at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
gdk_frame_clock_flush_idle at C:\Users\kawcz\.julia\artifacts\9893e8388ca9d6ea6161e17ec8c6dc1d3f1a2736\bin\libgtk-4-1.dll (unknown line)
g_timeout_dispatch at C:\Users\kawcz\.julia\artifacts\8d3fd03e0d0d508953ff7210605b9bb180ef9908\bin\libglib-2.0-0.dll (unknown line)
g_main_dispatch at C:\Users\kawcz\.julia\artifacts\8d3fd03e0d0d508953ff7210605b9bb180ef9908\bin\libglib-2.0-0.dll (unknown line)
g_main_context_iterate_unlocked.isra.24 at C:\Users\kawcz\.julia\artifacts\8d3fd03e0d0d508953ff7210605b9bb180ef9908\bin\libglib-2.0-0.dll (unknown line)
g_main_context_iteration at C:\Users\kawcz\.julia\artifacts\8d3fd03e0d0d508953ff7210605b9bb180ef9908\bin\libglib-2.0-0.dll (unknown line)
#233 at C:\Users\kawcz\.julia\packages\Gtk4\zsfzm\src\GLib\loop.jl:83
unknown function (ip: 000001fa9bf4d164)
g_sigatom at C:\Users\kawcz\.julia\packages\Gtk4\zsfzm\src\GLib\signals.jl:211
unknown function (ip: 000001fa9bf4d03f)
glib_main at C:\Users\kawcz\.julia\packages\Gtk4\zsfzm\src\GLib\loop.jl:80
unknown function (ip: 000001fa9bf4c3e4)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
start_task at C:/workdir/src\task.c:1238
Allocations: 1439935154 (Pool: 1438536261; Big: 1398893); GC: 969

with:

julia> versioninfo()
Julia Version 1.10.5
Commit 6f3fdf7b36 (2024-08-27 14:19 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)

Here is a reproducer:

# git clone https://github.com/CliMA/ClimaAtmos.jl
# cd ClimaAtmos.jl/
# git checkout b1c50ea69a72231c3e74a2489670273b782b3ead
# julia --project=examples

using SnoopCompileCore
ENV["CLIMACOMMS_DEVICE"]="CPU";
tinf = @snoop_inference begin
  empty!(ARGS);
  push!(ARGS, "--config_file", "config/model_configs/diagnostic_edmfx_trmm_stretched_box.yml");
  push!(ARGS, "--job_id", "diagnostic_edmfx_trmm_stretched_box");
  include("examples/hybrid/driver.jl")
end;

using SnoopCompile, FlameGraphs, ProfileView
fg = flamegraph(tinf)
ProfileView.view(fg)

Ah, after checking out that branch, you'll need to modify examples/hybrid/driver.jl to:

redirect_stderr(IOContext(stderr, :stacktrace_types_limited => Ref(false)))
import ClimaComms
ClimaComms.@import_required_backends
import ClimaAtmos as CA
import Random
Random.seed!(1234)
if !(@isdefined config)
    (; config_file, job_id) = CA.commandline_kwargs()
    config = CA.AtmosConfig(config_file; job_id)
end
simulation = CA.get_simulation(config)
(; integrator) = simulation
import SciMLBase
SciMLBase.step!(integrator)

FWIW, I'm pretty sure that I only observed this on my windows machine.

@jwahlstrand
Copy link
Collaborator

Looks like something deep inside GTK4. What's the output of the following?

using Pkg
Pkg.status(["GTK4_jll","Pango_jll","Cairo_jll"];mode=PKGMODE_MANIFEST)

@charleskawczynski
Copy link
Author

I just got around to trying this out:

julia> using Pkg

julia> Pkg.status(["GTK4_jll","Pango_jll","Cairo_jll"];mode=PKGMODE_MANIFEST)
Status `C:\dev\ClimaAtmos.jl\examples\Manifest.toml`
  [83423d85] Cairo_jll v1.18.0+2
  [36c8627f] Pango_jll v1.54.1+0

@jwahlstrand
Copy link
Collaborator

Thanks, those are the latest versions. It's confusing that Fontconfig is being called on Windows. I had thought that in recent versions of Pango_jll/Cairo_jll on Windows that the native font handling mechanism would be used instead. I'll try your reproducer when I have time.

@charleskawczynski
Copy link
Author

Also, just a heads up: it takes a little while to run-- I think somewhere inside 30 minutes (basically all compilation time)

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

No branches or pull requests

2 participants