Makie doesn't display plot when using a custom Julia sysimage

I created a custom system image using the VSCode sysimage feature. Makie plots display fine when I run in a Julia repl that is not started with the sysimage.

But I only get text output when drawing Makie plots in a Julia repl that is started with the sysimage. No graphical display. Is there something special you have to do when generating the sysimage to get plots to display?

This is the text output in the repl when drawing Makie plots with the custom sysimage:

Scene (1000px, 1000px):
    window_area: GeometryBasics.HyperRectangle{2,Int64}([0, 0], [0, 0])
    window_dpi: 100.0
    window_open: false
    mousebuttons: Set(AbstractPlotting.Mouse.Button[])
    mouseposition: (0.0, 0.0)
    mousedrag: notpressed
    scroll: (0.0, 0.0)
    keyboardbuttons: Set(AbstractPlotting.Keyboard.Button[])
    unicode_input: Char[]
    dropped_files: String[]
    hasfocus: false
    entered_window: false
   *scene(1000px, 1000px)

Here’s my versioninfo:

Julia Version 1.4.1
Commit 381693d3df* (2020-04-14 17:20 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: AMD EPYC 7702P 64-Core Processor
LIBM: libopenlibm
LLVM: libLLVM-8.0.1 (ORCJIT, znver1)
JULIA_EDITOR = “/usr/share/code/code”

Version info for the packages I’m using:

[159f3aea] Cairo v1.0.3
[3da002f7] ColorTypes v0.10.2
[31a5f54b] Debugger v0.6.4
[e30172f5] Documenter v0.24.10
[35a29f4d] DocumenterTools v0.1.5
[26cc04aa] FiniteDifferences v0.10.0
[4c0ca9eb] Gtk v1.1.3
[6218d12a] ImageMagick v1.1.5
[86fae568] ImageView v0.10.8
[916415d5] Images v0.22.2
[ae8d54c2] Luxor v1.7.0
[ee78f7c6] Makie v0.10.0
[9b87118b] PackageCompiler v1.1.1
[91a5bcdd] Plots v1.0.14

I think I saw this problem before.
Did you call display to show the plot?

You have to run AbstractPlotting.__init__() after loading Makie - during precompilation, the display stack gets shuffled around such that the Makie display does not take priority.

That worked. Thank you very much.