-
Notifications
You must be signed in to change notification settings - Fork 84
Hang on Arch Linux #6
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
Comments
Hmm. I actually developed and tested it on Arch Linux 64-bit using that webkitgtk package, so I'm not sure what the issue is. Do you have any clues as to what it's waiting for? |
After some research, it looks like it's getting stuck on line 48 of webloop.go. Looking further into it now. |
Alright, so I haven't played too much with channels, but I think it's waiting for the view channel to finish executing before returning, but it never finishes. Any ideas what might be causing this? |
Hmm. Do you have |
Yeah, |
Do other GTK programs, or other WebKit2 programs, such as webkit-eval-js or the tests in https://github.com/sourcegraph/go-webkit2, run for you? |
The tests in go-webkit2 seem to pass.
|
What if you set up printlns or breakpoints in the various blocks in https://github.com/sourcegraph/webloop/blob/master/webloop.go#L25-L45? What, if anything, gets executed? And are there other goroutines blocking anything else (perhaps another goroutine is blocking the IdleAdd fn from running?)? Thanks for your patience 😃 |
I was playing around with that earlier. Nothing in the passed function is executed. Could this be an issue with glib? |
It could be, but I'm inclined to blame my code here (since other glib consumers seem to work). |
Hmm, how can I check if other goroutines are blocking anything else? |
Run it in gdb and then ctrl-C while it's hanging, or periodically call and print http://golang.org/pkg/runtime/#Stack (there are libs that do this for you but I forget which ones right now). |
I really appreciate you going out of your way to get this resolved :-). |
Happy to help! 😄 When you hit ctrl-C and get to the |
Sorry, not too familiar with gdb. |
Hmm, I am a bit fuzzy too, but I think I was wrong...these are just the On Mon, Dec 9, 2013 at 2:02 PM, Zach Latta [email protected] wrote:
Quinn Slack |
|
Hmm, that's really strange. It's not doing anything. It's as though GTK On Mon, Dec 9, 2013 at 2:23 PM, Zach Latta [email protected] wrote:
Quinn Slack |
Alright, thanks! I'll definitely let you know if I find out any more info. |
I experience the same behaviour on Ubuntu 13.10 saucy, trying to run the headless example. The program silently fails, or rather it looks like line 11 blocks: view := ctx.NewView() |
I fixed the example code: package main
import (
"fmt"
"os"
"runtime"
"github.com/conformal/gotk3/gtk"
"github.com/sourcegraph/webloop"
)
func main() {
gtk.Init(nil)
go func() {
runtime.LockOSThread()
gtk.Main()
}()
ctx := webloop.New()
view := ctx.NewView()
defer view.Close()
view.Open("http://google.com")
err := view.Wait()
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to load URL: %s", err)
os.Exit(1)
}
res, err := view.EvaluateJavaScript("document.title")
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to run JavaScript: %s", err)
os.Exit(1)
}
fmt.Printf("JavaScript returned: %q\n", res)
} |
I can confirm this hang on Ubuntu 14.04. The improved example from @pakohan fixed it. I suggest updating the example in the README. |
Thanks! I updated it in example_test.go and in the readme in d990ee2. I actually haven't tried it myself (I'm on a plane right now on a Mac), but 2 people saying it works is good enough for me to update it for now. |
I'm also on a mac and did not get it running here. I set up a docker image for this if you are interested: https://registry.hub.docker.com/u/rverton/golang-webkit/ |
Did any one encountered similar issue with https://github.com/sourcegraph/webloop#rendering-static-html-from-a-dynamic-single-page-angularjs-app ? |
The headless example program in the README silently hangs on Arch Linux 64bit.
Repro steps:
System dump: https://gist.github.com/zachlatta/2fe43a3044c5dfbdb8dd
The text was updated successfully, but these errors were encountered: