ProfileView not compatible with julia-0.5?

282 views
Skip to first unread message

Neal Becker

unread,
Sep 9, 2016, 5:55:21 PM9/9/16
to julia...@googlegroups.com
using ProfileView
INFO: Precompiling module ProfileView.
WARNING: Module Compat with uuid 314389968181888 is missing from the cache.
This may mean module Compat does not support precompilation but is imported
by a module that does.
ERROR: LoadError: Declaring __precompile__(false) is not allowed in files
that are being precompiled.
in macro expansion; at ./none:2 [inlined]
in anonymous at ./<missing>:?
while loading /home/nbecker/.julia/v0.5/ProfileView/src/ProfileView.jl, in
expression starting on line 5
ERROR: Failed to precompile ProfileView to
/home/nbecker/.julia/lib/v0.5/ProfileView.ji.
in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
in macro expansion at ./REPL.jl:95 [inlined]
in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68

Chris Rackauckas

unread,
Sep 9, 2016, 6:20:03 PM9/9/16
to julia-users, ndbe...@gmail.com
Did you checkout master?

Neal Becker

unread,
Sep 9, 2016, 6:47:47 PM9/9/16
to julia...@googlegroups.com
Chris Rackauckas wrote:

> Did you checkout master?
>

No I just did Pkg.add("ProfileView"). I don't actually know how to do
otherwise - is that a Pkg option?

Chris Rackauckas

unread,
Sep 9, 2016, 7:27:24 PM9/9/16
to julia-users, ndbe...@gmail.com
Yes, you can checkout a branch of the repository via Pkg.checkout("Package","branch"). Note that the default is for the master branch, i.e. Pkg.checkout("ProfileView") will checkout master. This will put you on the "current up-to-date" branch, which could be different than the most recent tagged version (which is what Julia gives you from Pkg.add by default). Many times the tags/releases will be behind on the bug fixes / version compatibility, so checking out master will usually fix this. 

I know that ProfileView works on master in Julia v0.5 and v0.6.

For completeness, you can always go back to the latest tag via Pkg.release("Package"). If you stay on master of any package, be prepared for "bleeding edge development issues" to crop up, as you're asking for using the current source and not the latest release.

Tim Holy

unread,
Sep 10, 2016, 7:45:15 AM9/10/16
to julia...@googlegroups.com

More likely you just need to run Pkg.update(). For example, you can test with a "dummy" package repository:

 

$ mkdir /tmp/pkgs
$ JULIA_PKGDIR=/tmp/pkgs julia
              _
  _       _ _(_)_     |  A fresh approach to technical computing
 (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
  _ _   _| |_  __ _   |  Type "?help" for help.
 | | | | | | |/ _` |  |
 | | |_| | | | (_| |  |  Version 0.5.0-rc3+49 (2016-09-08 05:47 UTC)
_/ |\__'_|_|_|\__'_|  |  Commit e1d2965* (2 days old release-0.5)
|__/                   |  x86_64-linux-gnu

julia> Pkg.init()
INFO: Initializing package repository /tmp/pkgs/v0.5
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl                                                                                                                          
                                                                                                                                                                                             
julia> Pkg.add("ProfileView")
INFO: Cloning cache of BinDeps from https://github.com/JuliaLang/BinDeps.jl.git
...

 

and the install & build succeeds.

 

Best,

--Tim

Christoph Ortner

unread,
Sep 10, 2016, 5:19:13 PM9/10/16
to julia-users
I've actually had problems with ProfileView as well, but thought I'd wait until 0.5 is released.

julia> ProfileView.view()


(<unknown>:770): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/Users/ortner/.julia/v0.5/Homebrew/deps/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory


This likely means that your installation is broken.
Try running the command
  gdk
-pixbuf-query-loaders > /Users/ortner/.julia/v0.5/Homebrew/deps/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again
for the time being.
ERROR
: UndefVarError: _jl_libcairo not defined
 
in #CairoImageSurface#1(::Bool, ::Function, ::Array{UInt32,2}, ::Int32) at /Users/ortner/.julia/v0.5/Cairo/src/Cairo.jl:183
 
in #viewprof#2(::Bool, ::Bool, ::Int64, ::Bool, ::Array{Any,1}, ::Function, ::Gtk.GtkCanvas, ::Array{Array{UInt64,1},1}, ::Array{UInt64,1}, ::Array{Int64,1}, ::Dict{UInt64,Array{StackFrame,1}}, ::Array{Array{StackFrame,1},1}) at /Users/ortner/.julia/v0.5/ProfileView/src/ProfileViewGtk.jl:48
 
in (::ProfileViewGtk.#kw##viewprof)(::Array{Any,1}, ::ProfileViewGtk.#viewprof, ::Gtk.GtkCanvas, ::Array{Array{UInt64,1},1}, ::Array{UInt64,1}, ::Array{Int64,1}, ::Dict{UInt64,Array{StackFrame,1}}, ::Array{Array{StackFrame,1},1}) at ./<missing>:0
 
in #view#1(::Void, ::Array{Any,1}, ::Function, ::Array{UInt64,1}) at /Users/ortner/.julia/v0.5/ProfileView/src/ProfileViewGtk.jl:40
 
in (::ProfileViewGtk.#kw##view)(::Array{Any,1}, ::ProfileViewGtk.#view, ::Array{UInt64,1}) at ./<missing>:0
 
in view() at /Users/ortner/.julia/v0.5/ProfileView/src/ProfileView.jl:55


shell
> gdk-pixbuf-query-loaders > /Users/ortner/.julia/v0.5/Homebrew/deps/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
objc
[3073]: Class GNotificationCenterDelegate is implemented in both /usr/local/opt/glib/lib/libgio-2.0.0.dylib and /Users/ortner/.julia/v0.5/Homebrew/deps/usr/opt/glib/lib/libgio-2.0.0.dylib. One of the two will be used. Which one is undefined.


julia
>


julia
> ProfileView.view()
ERROR
: UndefVarError: _jl_libcairo not defined
 
in #CairoImageSurface#1(::Bool, ::Function, ::Array{UInt32,2}, ::Int32) at /Users/ortner/.julia/v0.5/Cairo/src/Cairo.jl:183
 
in #viewprof#2(::Bool, ::Bool, ::Int64, ::Bool, ::Array{Any,1}, ::Function, ::Gtk.GtkCanvas, ::Array{Array{UInt64,1},1}, ::Array{UInt64,1}, ::Array{Int64,1}, ::Dict{UInt64,Array{StackFrame,1}}, ::Array{Array{StackFrame,1},1}) at /Users/ortner/.julia/v0.5/ProfileView/src/ProfileViewGtk.jl:48
 
in (::ProfileViewGtk.#kw##viewprof)(::Array{Any,1}, ::ProfileViewGtk.#viewprof, ::Gtk.GtkCanvas, ::Array{Array{UInt64,1},1}, ::Array{UInt64,1}, ::Array{Int64,1}, ::Dict{UInt64,Array{StackFrame,1}}, ::Array{Array{StackFrame,1},1}) at ./<missing>:0
 
in #view#1(::Void, ::Array{Any,1}, ::Function, ::Array{UInt64,1}) at /Users/ortner/.julia/v0.5/ProfileView/src/ProfileViewGtk.jl:40
 
in (::ProfileViewGtk.#kw##view)(::Array{Any,1}, ::ProfileViewGtk.#view, ::Array{UInt64,1}) at ./<missing>:0
 
in view() at /Users/ortner/.julia/v0.5/ProfileView/src/ProfileView.jl:55


Christoph Ortner

unread,
Sep 10, 2016, 5:34:03 PM9/10/16
to julia-users
And here the error message I get in a notebook:

type Array has no field func

 in (::ProfileView.#printrec#26{Dict{UInt64,Array{StackFrame,1}}})(::IOContext{Base.AbstractIOBuffer{Array{UInt8,1}}}, ::Int64, ::Float64, ::Float64, ::Float64, ::ProfileView.TagData, ::ColorTypes.RGB{FixedPointNumbers.UFixed{UInt8,8}}) at /Users/ortner/.julia/v0.5/ProfileView/src/ProfileView.jl:213
 in show(::IOContext{Base.AbstractIOBuffer{Array{UInt8,1}}}, ::MIME{Symbol("image/svg+xml")}, ::ProfileView.ProfileData) at /Users/ortner/.julia/v0.5/ProfileView/src/ProfileView.jl:255
 in verbose_show(::Base.AbstractIOBuffer{Array{UInt8,1}}, ::MIME{Symbol("image/svg+xml")}, ::ProfileView.ProfileData) at ./multimedia.jl:50
 in #sprint#304(::Void, ::Function, ::Int64, ::Function, ::MIME{Symbol("image/svg+xml")}, ::Vararg{Any,N}) at ./strings/io.jl:37
 in display_dict(::ProfileView.ProfileData) at /Users/ortner/.julia/v0.5/IJulia/src/execute_request.jl:28
 in execute_request(::ZMQ.Socket, ::IJulia.Msg) at /Users/ortner/.julia/v0.5/IJulia/src/execute_request.jl:195
 in eventloop(::ZMQ.Socket) at /Users/ortner/.julia/v0.5/IJulia/src/IJulia.jl:138
 in (::IJulia.##25#31)() at ./task.jl:360

In [ ]:

Chris Rackauckas

unread,
Sep 10, 2016, 9:08:53 PM9/10/16
to julia-users
Is this after updating? Do you also have an error when you do it from the REPL?

Christoph Ortner

unread,
Sep 11, 2016, 3:10:54 AM9/11/16
to julia-users
yes and yes (that was the previous error message I posted)

maybe it is just some dependencies that are not correctly installed? But then why does it both fail in REPL and NB  ?

Chris Rackauckas

unread,
Sep 11, 2016, 4:12:35 AM9/11/16
to julia-users
Did GTK and Cairo build correctly?

Christoph Ortner

unread,
Sep 11, 2016, 7:41:49 AM9/11/16
to julia-users
I rebuilt both and neither gave errors. (though actually building Cairo did give an error, it then switched to source and built ok. This is OS X with Homebrew)

But now it opens a small window and the error message changes. 

julia> @profile test(1_000_000_00);
julia
> ProfileView.view()
Gtk.GtkWindowLeaf(name="", parent, width-request=-1, height-request=-1, visible=TRUE, sensitive=TRUE, app-paintable=FALSE, can-focus=FALSE, has-focus=FALSE, is-focus=FALSE, focus-on-click=TRUE, can-default=FALSE, has-default=FALSE, receives-default=FALSE, composite-child=FALSE, style, events=0, no-show-all=FALSE, has-tooltip=FALSE, tooltip-markup=NULL, tooltip-text=NULL, window, opacity=1.000000, double-buffered, halign=GTK_ALIGN_FILL, valign=GTK_ALIGN_FILL, margin-left, margin-right, margin-start=0, margin-end=0, margin-top=0, margin-bottom=0, margin=0, hexpand=FALSE, vexpand=FALSE, hexpand-set=FALSE, vexpand-set=FALSE, expand=FALSE, scale-factor=2, border-width=0, resize-mode, child, type=GTK_WINDOW_TOPLEVEL, title="Profile", role=NULL, resizable=TRUE, modal=FALSE, window-position=GTK_WIN_POS_NONE, default-width=-1, default-height=-1, destroy-with-parent=FALSE, hide-titlebar-when-maximized=FALSE, icon, icon-name=NULL, screen, type-hint=GDK_WINDOW_TYPE_HINT_NORMAL, skip-taskbar-hint=FALSE, skip-pager-hint=FALSE, urgency-hint=FALSE, accept-focus=TRUE, focus-on-map=TRUE, decorated=TRUE, deletable=TRUE, gravity=GDK_GRAVITY_NORTH_WEST, transient-for, attached-to, has-resize-grip, resize-grip-visible, application, is-active=FALSE, has-toplevel-focus=FALSE, startup-id, mnemonics-visible=FALSE, focus-visible=FALSE, is-maximized=FALSE)


julia
>
(<unknown>:53358): Gtk-WARNING **: Error loading theme icon 'document-open' for stock: Icon 'document-open' not present in theme Adwaita


(<unknown>:53358): Gtk-WARNING **: Error loading theme icon 'document-save-as' for stock: Icon 'document-save-as' not present in theme Await


# and many more lines like that.

Christoph Ortner

unread,
Sep 11, 2016, 7:44:12 AM9/11/16
to julia-users

But I do get the following message at the end of the `GTK` and `Cairo` install:

objc[49750]: Class GNotificationCenterDelegate is implemented in both /Users/ortner/.julia/v0.5/Homebrew/deps/usr/opt/glib/lib/libgio-2.0.0.dylib and /usr/local/opt/glib/lib/libgio-2.0.0.dylib. One of the two will be used. Which one is undefined.


Chris Rackauckas

unread,
Sep 11, 2016, 11:20:46 AM9/11/16
to julia-users
I'm not on a Mac so it's hard for me to know, but maybe the Homebrew GTK is missing theme files? Or maybe the theme files are supposed to be present in the OS, but can't be found in MacOSX?

The next post is showing that there's a clash: you have two libgio's (one provided by Julia, one not), so it arbitrarily is choosing which one to use. That may be a source of trouble.

Christoph Ortner

unread,
Sep 11, 2016, 3:20:02 PM9/11/16
to julia-users

not sure how this double-install happened. at some point I will have to do some cleanup.
Reply all
Reply to author
Forward
0 new messages