# JuliaImages error

**URL:** <https://discourse.julialang.org/t/juliaimages-error/12264>\
**Category:** Visualization\
**Created:** [July 9, 2018, 1:07am UTC](https://discourse.julialang.org/t/juliaimages-error/12264 "2018-07-09T01:07:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![microlifecc](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Post date:** [July 9, 2018, 1:07am UTC](https://discourse.julialang.org/t/juliaimages-error/12264/1 "2018-07-09T01:07:45Z")

</div>

I tried this:

```julia
using Images, Unitful, AxisArrays
using Unitful: mm, s

img = AxisArray(rand(256, 256, 100, 50), (:x, :y, :z, :time), (0.4mm, 0.4mm, 1mm, 2s))

imshow(img)

```

I am getting this error:

> (julia:14656): Gtk-CRITICAL \*\*: gtk\_widget\_get\_preferred\_height\_for\_width: assertion ‘width \>= 0’ failed

(julia:14656): Gtk-WARNING \*\*: gtk\_widget\_size\_allocate(): attempt to allocate widget with width -5 and height 32765

(julia:14656): Gtk-CRITICAL \*\*: gtk\_render\_frame\_gap: assertion ‘xy0\_gap \<= xy1\_gap’ failed

(julia:14656): Gtk-CRITICAL \*\*: gtk\_render\_frame\_gap: assertion ‘xy0\_gap \<= xy1\_gap’ failed

(julia:14656): Gtk-CRITICAL \*\*: gtk\_widget\_get\_preferred\_height\_for\_width: assertion ‘width \>= 0’ failed

(julia:14656): Gtk-WARNING \*\*: gtk\_widget\_size\_allocate(): attempt to allocate widget with width -5 and height 32765

(julia:14656): Gtk-CRITICAL \*\*: gtk\_render\_frame\_gap: assertion ‘xy0\_gap \<= xy1\_gap’ failed  
\*\*\* BUG \*\*\*  
In pixman\_region32\_init\_rect: Invalid rectangle passed  
Set a breakpoint on ‘\_pixman\_log\_error’ to debug

\*\*\* BUG \*\*\*  
In pixman\_region32\_init\_rect: Invalid rectangle passed  
Set a breakpoint on ‘\_pixman\_log\_error’ to debug

\*\*\* BUG \*\*\*  
In pixman\_region32\_init\_rect: Invalid rectangle passed  
Set a breakpoint on ‘\_pixman\_log\_error’ to debug

\*\*\* BUG \*\*\*  
In pixman\_region32\_init\_rect: Invalid rectangle passed  
Set a breakpoint on ‘\_pixman\_log\_error’ to debug

\*\*\* BUG \*\*\*  
In pixman\_region32\_init\_rect: Invalid rectangle passed  
Set a breakpoint on ‘\_pixman\_log\_error’ to debug

\*\*\* BUG \*\*\*  
In pixman\_region32\_init\_rect: Invalid rectangle passed  
Set a breakpoint on ‘\_pixman\_log\_error’ to debug

\*\*\* BUG \*\*\*  
In pixman\_region32\_init\_rect: Invalid rectangle passed  
Set a breakpoint on ‘\_pixman\_log\_error’ to debug

\*\*\* BUG \*\*\*  
In pixman\_region32\_init\_rect: Invalid rectangle passed  
Set a breakpoint on ‘\_pixman\_log\_error’ to debug

\*\*\* BUG \*\*\*  
In pixman\_region32\_init\_rect: Invalid rectangle passed  
Set a breakpoint on ‘\_pixman\_log\_error’ to debug

\*\*\* BUG \*\*\*  
In pixman\_region32\_init\_rect: Invalid rectangle passed  
Set a breakpoint on ‘\_pixman\_log\_error’ to debug

(julia:14656): Gtk-CRITICAL \*\*: gtk\_widget\_get\_preferred\_height\_for\_width: assertion ‘width \>= 0’ failed

(julia:14656): Gtk-WARNING \*\*: gtk\_widget\_size\_allocate(): attempt to allocate widget with width -5 and height 32765

(julia:14656): Gtk-CRITICAL \*\*: gtk\_render\_frame\_gap: assertion ‘xy0\_gap \<= xy1\_gap’ failed

(julia:14656): Gtk-CRITICAL \*\*: gtk\_widget\_get\_preferred\_height\_for\_width: assertion ‘width \>= 0’ failed

(julia:14656): Gtk-WARNING \*\*: gtk\_widget\_size\_allocate(): attempt to allocate widget with width -5 and height 32765

(julia:14656): Gtk-CRITICAL \*\*: gtk\_render\_frame\_gap: assertion ‘xy0\_gap \<= xy1\_gap’ failed

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [July 10, 2018, 9:25am UTC](https://discourse.julialang.org/t/juliaimages-error/12264/2 "2018-07-10T09:25:47Z")

</div>

Those are all warnings emitted by the GTK library (written in C, not Julia). Does the image actually show? I didn’t see any Julia error messages, so I’m guessing yes.

For the record I don’t see any of that on Kubuntu 18.04. What platform are you on, and if Linux which window manager are you using?

---

<div class="post-metadata">

**Author:** ![microlifecc](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Post date:** [July 27, 2018, 3:44am UTC](https://discourse.julialang.org/t/juliaimages-error/12264/3 "2018-07-27T03:44:28Z")

</div>

Hi @tim.holy,

Thanks a lot for the reply.

The code does work now. I was on Lubuntu 18.04. I have been swithiching distros multiple times trying to get JuliaPro to work. Right now I am on Linux Mint and the installation worked and the code is running.

Thanks again for the help.
