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

Error running osx binary #87

Closed
anjuna opened this issue Jun 8, 2018 · 7 comments
Closed

Error running osx binary #87

anjuna opened this issue Jun 8, 2018 · 7 comments
Assignees
Labels

Comments

@anjuna
Copy link

anjuna commented Jun 8, 2018

I encountered lots of problems trying to build threadscope, so I tried the osx binary (v0.2.11), my machine running El Capitan 10.11.1

I installed gtk+ and gtk-mac-integration via brew, but hit this error log when running the binary:

2018-06-08 10:50:44.293 threadscope[25736:5132225] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. 

(threadscope:25736): GLib-GObject-WARNING **: 10:50:44.314: invalid cast from 'GtkMenuBar' to 'GtkWindow'

(threadscope:25736): Gtk-CRITICAL **: 10:50:44.315: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
Jun  8 10:50:44  threadscope[25736] <Error>: CGImageCreate: invalid image alphaInfo: 31
2018-06-08 10:50:44.340 threadscope[25736:5132225] An uncaught exception was raised
2018-06-08 10:50:44.340 threadscope[25736:5132225] Cannot lock focus on image <NSImage 0x7fba79618ca0 Size={0, 0} Reps=(
)>, because it is size zero.
2018-06-08 10:50:44.341 threadscope[25736:5132225] (
	0   CoreFoundation                      0x00007fff8adffe32 __exceptionPreprocess + 178
	1   libobjc.A.dylib                     0x00007fff988c14fa objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff8ae6665d +[NSException raise:format:] + 205
	3   AppKit                              0x00007fff9a5d239b -[NSImage _lockFocusOnRepresentation:rect:context:hints:flipped:] + 332
	4   AppKit                              0x00007fff9a5d2248 __51-[NSImage lockFocusWithRect:context:hints:flipped:]_block_invoke + 82
	5   AppKit                              0x00007fff9a58b78c -[NSImage _usingBestRepresentationForRect:context:hints:body:] + 164
	6   AppKit                              0x00007fff9a5d21e6 -[NSImage lockFocusWithRect:context:hints:flipped:] + 207
	7   AppKit                              0x00007fff9a649034 -[NSImage lockFocusFlipped:] + 123
	8   libgtkmacintegration-gtk2.2.dylib   0x000000010e040799 nsimage_from_pixbuf + 201
	9   libgtkmacintegration-gtk2.2.dylib   0x000000010e03fe70 gtkosx_application_set_dock_icon_pixbuf + 29
	10  threadscope                         0x000000010d9cb1e9 cF7W_info + 33
)
2018-06-08 10:50:44.342 threadscope[25736:5132225] *** Terminating app due to uncaught exception 'NSImageCacheException', reason: 'Cannot lock focus on image <NSImage 0x7fba79618ca0 Size={0, 0} Reps=(
)>, because it is size zero.'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff8adffe32 __exceptionPreprocess + 178
	1   libobjc.A.dylib                     0x00007fff988c14fa objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff8ae6665d +[NSException raise:format:] + 205
	3   AppKit                              0x00007fff9a5d239b -[NSImage _lockFocusOnRepresentation:rect:context:hints:flipped:] + 332
	4   AppKit                              0x00007fff9a5d2248 __51-[NSImage lockFocusWithRect:context:hints:flipped:]_block_invoke + 82
	5   AppKit                              0x00007fff9a58b78c -[NSImage _usingBestRepresentationForRect:context:hints:body:] + 164
	6   AppKit                              0x00007fff9a5d21e6 -[NSImage lockFocusWithRect:context:hints:flipped:] + 207
	7   AppKit                              0x00007fff9a649034 -[NSImage lockFocusFlipped:] + 123
	8   libgtkmacintegration-gtk2.2.dylib   0x000000010e040799 nsimage_from_pixbuf + 201
	9   libgtkmacintegration-gtk2.2.dylib   0x000000010e03fe70 gtkosx_application_set_dock_icon_pixbuf + 29
	10  threadscope                         0x000000010d9cb1e9 cF7W_info + 33
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

I'd really love to play around with profiling some parallel haskell programs, any help fixing this so I can use threadscope would be very much appreciated :)

@maoe
Copy link
Member

maoe commented Jun 9, 2018

I can reproduce the issue. It seems that the latest version of gtk-mac-integration (the C library not the Haskell one) broke something. I've confirmed that the binary works fine with jralls/gtk-mac-integration@28ecf86. I'll report upstream.

@maoe
Copy link
Member

maoe commented Jun 9, 2018

Reported upstream. For the time being you can use gtk-mac-integration 2.0.8_2.

@maoe maoe self-assigned this Jun 9, 2018
@maoe maoe added the @major label Jun 9, 2018
@maoe
Copy link
Member

maoe commented Jul 11, 2018

This issue was fixed upstream but there has been no release that has the fix. So I opened a PR that adds --HEAD option to gtk-mac-integration formula.

@lylek
Copy link

lylek commented Jul 27, 2018

I tried installing gtk-mac-integration 2.0.8_2 via

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/0fbcccdbc6ffa7b16dfab0cebd1f94a05572f6fb/Formula/gtk-mac-integration.rb

But then when I run threadscope, I get:

dyld: Library not loaded: /usr/local/opt/gtk-mac-integration/lib/libgtkmacintegration-gtk2.2.dylib
  Referenced from: /Users/lyle/Downloads/threadscope.osx
  Reason: Incompatible library version: threadscope.osx requires version 4.0.0 or later, but libgtkmacintegration-gtk2.2.dylib provides version 3.0.0
Abort trap: 6

@lylek
Copy link

lylek commented Jul 27, 2018

Ah, following the instructions in your PR worked. Thanks!

@maoe
Copy link
Member

maoe commented Aug 9, 2018

This is now fixed upstream.

@maoe maoe closed this as completed Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants