Help to build uiktest

275 views
Skip to first unread message

Tuan Hoang Anh

unread,
Apr 29, 2012, 9:53:57 AM4/29/12
to go-...@googlegroups.com
Hello
I built uiktest success but when I run main.exe, it only display "empty display string"

Please help me. Thanks in advance

Tuan Hoang Anh

John Asmuth

unread,
Apr 29, 2012, 11:07:34 AM4/29/12
to go-...@googlegroups.com
The uiktest that you built unfortunately uses xgb as its protocol, so it's trying to connect to a (probably) nonexistant X server using a (certainly) nonexistant DISPLAY env var.

Unfortunately I don't have the spare time today to set it up for go.wde/win, but if you take a look at go.wde/win/wintest you might be able to figure it out.

You just need to modify uiktest to
 - import the win package,
 - set uik.WindowGenerator to a function that calls win.NewWindow(), and
 - ensure that win.HandleWndEvents() runs in the main goroutine.

At some point I hope to make swapping out backends a little more transparent.

- John

John Asmuth

unread,
May 11, 2012, 10:08:08 AM5/11/12
to go-...@googlegroups.com
It's much easier to do this, now - uiktest should build on all three platforms easily. Only catch is that on os x you have to install the gomacdraw framework first.

tuanhoanganh

unread,
May 16, 2012, 3:36:21 AM5/16/12
to go-...@googlegroups.com
Thanks for update go-uik.
But when i run new exe of uiktest, it have error. Here is error :
D:\GO\example\go-uik>main.exe
empty display string
throw: all goroutines are asleep - deadlock!

goroutine 1 [chan receive]:
        D:/GO/go/src/pkg/github.com/skelterjohn/go.wde/xgb/xgb.go:40 +0x34
        D:/GO/go/src/pkg/github.com/skelterjohn/go.wde/wde.go:77 +0x20
main.main()
        D:/GO/example/go-uik/main.go:17 +0x29

goroutine 2 [syscall]:
created by runtime.main
        C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist269497170/go/src/pkg/runti
me/proc.c:221

goroutine 3 [chan send]:
        D:/GO/go/src/pkg/github.com/skelterjohn/go.uik/block.go:34 +0x40
        D:/GO/go/src/pkg/github.com/skelterjohn/go.uik/block.go:36 +0x22

How to fix it.

Thanks for your help
Tuan Hoang Anh

--
You received this message because you are subscribed to the Google Groups "go-uik" group.
To view this discussion on the web visit https://groups.google.com/d/msg/go-uik/-/LEpZNgKG2x0J.

To post to this group, send email to go-...@googlegroups.com.
To unsubscribe from this group, send email to go-uik+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/go-uik?hl=en.

John Asmuth

unread,
May 16, 2012, 5:59:04 AM5/16/12
to go-...@googlegroups.com
Please pull and try again. I fixed this a few days ago.

Issue was I used to load the xgb backend automatically in uik. On windows, this is a mistake!
To unsubscribe from this group, send email to go-uik+unsubscribe@googlegroups.com.

John Asmuth

unread,
May 16, 2012, 6:12:57 AM5/16/12
to go-...@googlegroups.com
Oh, I fixed this in response to your report.

Did you update the source properly? You can do this by running "go get -u github.com/skelterjohn/go.uik/..." and running it again. If that fails, clean it out and try again. This issue was definitely fixed.
To unsubscribe from this group, send email to go-uik+unsubscribe@googlegroups.com.

cherokee cherokee

unread,
May 16, 2012, 11:49:25 PM5/16/12
to go-...@googlegroups.com
in my practice, the error still as bellow:

C:\Users\cc>go get -u github.com/skelterjohn/go.uik

C:\Users\cc>d:

D:\>cd D:\Go\src\pkg\github.com\skelterjohn\go.uik\uiktest

D:\Go\src\pkg\github.com\skelterjohn\go.uik\uiktest>go build main.go
# command-line-arguments
.\main.go:108: undefined: gordon_gif

D:\Go\src\pkg\github.com\skelterjohn\go.uik\uiktest>go build main.go wde_windows
.go gordon.gif.go

D:\Go\src\pkg\github.com\skelterjohn\go.uik\uiktest>main.exe
empty display string
throw: all goroutines are asleep - deadlock!

goroutine 1 [chan receive]:

goroutine 2 [syscall]:
created by runtime.main
        C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist308287094/go/src/pkg/runti
me/proc.c:221

goroutine 3 [chan send]:
        D:/Go/src/pkg/github.com/skelterjohn/go.uik/block.go:34 +0x3a
        D:/Go/src/pkg/github.com/skelterjohn/go.uik/block.go:36 +0x22

D:\Go\src\pkg\github.com\skelterjohn\go.uik\uiktest>


在 2012年5月16日星期三UTC+8下午6时12分57秒,John Asmuth写道:

tuanhoanganh

unread,
May 16, 2012, 11:56:20 PM5/16/12
to go-...@googlegroups.com
I updated package and had same problem.

Tuan Hoang ANh

To view this discussion on the web visit https://groups.google.com/d/msg/go-uik/-/PZvq3MtroWQJ.

To post to this group, send email to go-...@googlegroups.com.
To unsubscribe from this group, send email to go-uik+un...@googlegroups.com.

John Asmuth

unread,
May 17, 2012, 12:36:38 AM5/17/12
to go-...@googlegroups.com
Don't list source files. Just "go build".

techabc

unread,
May 17, 2012, 12:48:34 AM5/17/12
to go-...@googlegroups.com
after directly type "go build" in uiktest dir, I got uiktest.exe, but
I execute it still error:

D:\Go\src\pkg\github.com\skelterjohn\go.uik\uiktest>uiktest.exe
empty display string
throw: all goroutines are asleep - deadlock!

goroutine 1 [chan receive]:
github.com/skelterjohn/go.wde/xgb._func_002(0x119902e8, 0x441585)
D:/Go/src/pkg/github.com/skelterjohn/go.wde/xgb/xgb.go:40 +0x32
github.com/skelterjohn/go%2ewde.Run()
D:/Go/src/pkg/github.com/skelterjohn/go.wde/wde.go:77 +0x1e
main.main()
D:/Go/src/pkg/github.com/skelterjohn/go.uik/uiktest/main.go:17 +0x29

goroutine 2 [syscall]:
created by runtime.main
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist308287094/go/src/pkg/runti
me/proc.c:221

goroutine 3 [chan send]:
github.com/skelterjohn/go%2euik._func_001()
D:/Go/src/pkg/github.com/skelterjohn/go.uik/block.go:34 +0x3a
created by github.com/skelterjohn/go%2euik.init路1
D:/Go/src/pkg/github.com/skelterjohn/go.uik/block.go:36 +0x22

D:\Go\src\pkg\github.com\skelterjohn\go.uik\uiktest>

2012/5/17 John Asmuth <jas...@gmail.com>:
>>>>> go-uik+un...@googlegroups.com.
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/go-uik?hl=en.
>>>>
>>>>
> --
> You received this message because you are subscribed to the Google Groups
> "go-uik" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/go-uik/-/4GNU8gsUwFMJ.
>
> To post to this group, send email to go-...@googlegroups.com.
> To unsubscribe from this group, send email to
> go-uik+un...@googlegroups.com.

John Asmuth

unread,
May 17, 2012, 12:51:28 AM5/17/12
to go-...@googlegroups.com
Somewhere, someone is importing go.wde/xgb. There is a file in uiktest that does that, but it's wde_linux.go, so it shouldn't be included when you build on windows. Old versions of go.uik imported it, but I took that out. If you can figure out where go.wde/xgb is being imported, we'll find the reason why this is happening.

Pavel Korotkov

unread,
May 17, 2012, 4:26:52 AM5/17/12
to go-...@googlegroups.com
As far as I can see there is at least one place where go.wde/xgb is still used: https://github.com/skelterjohn/go.uik/blob/master/draw.go#L22.

>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/go-uik?hl=en.
>>>>
>>>>
> --
> You received this message because you are subscribed to the Google Groups
> "go-uik" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/go-uik/-/4GNU8gsUwFMJ.
>
> To post to this group, send email to go-...@googlegroups.com.
> To unsubscribe from this group, send email to

> For more options, visit this group at
> http://groups.google.com/group/go-uik?hl=en.

--
You received this message because you are subscribed to the Google Groups "go-uik" group.
To post to this group, send email to go-...@googlegroups.com.
To unsubscribe from this group, send email to go-uik+unsubscribe@googlegroups.com.

John Asmuth

unread,
May 17, 2012, 9:54:58 AM5/17/12
to go-...@googlegroups.com
Yikes! Mia culpa. I'll push a fix for that soon.

Sergey B

unread,
May 10, 2013, 6:48:18 PM5/10/13
to go-...@googlegroups.com
Hello, i'm new to golang, so sorry if this is a silly question.
I'm trying to run Hello World example. The go build of source doesn't raise any errors. But running the .exe causes this:

c:\Go\_proj>main
panic: no wde backend imported

goroutine 1 [running]:
github.com/skelterjohn/go%2ewde._func_001()
C:/Go/src/pkg/github.com/skelterjohn/go.wde/wde.go:90 +0x4a
github.com/skelterjohn/go%2ewde.Run()
C:/Go/src/pkg/github.com/skelterjohn/go.wde/wde.go:86 +0x20
main.main()
c:/Go/_proj/main.go:12 +0x29


goroutine 2 [syscall]:
created by runtime.main
C:/Users/ADMINI~1/AppData/Local/Temp/2/bindist767862039/go/src/pkg/runti

me/proc.c:221

goroutine 3 [chan send]:
github.com/skelterjohn/go%2euik._func_001()
C:/Go/src/pkg/github.com/skelterjohn/go.uik/block.go:34 +0x40
created by github.com/skelterjohn/go%2euik.initT¬1
C:/Go/src/pkg/github.com/skelterjohn/go.uik/block.go:36 +0x22

goroutine 4 [runnable]:
main.hello()
c:/Go/_proj/main.go:15
created by main.main
c:/Go/_proj/main.go:11 +0x22

I guess this is similar with problems discussed above in this thread.
Wuold you plese help to solve this.


четверг, 17 мая 2012 г., 17:54:58 UTC+4 пользователь John Asmuth написал:

>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/go-uik?hl=en.
>>>>
>>>>
> --
> You received this message because you are subscribed to the Google Groups
> "go-uik" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/go-uik/-/4GNU8gsUwFMJ.
>
> To post to this group, send email to go-...@googlegroups.com.
> To unsubscribe from this group, send email to

> For more options, visit this group at
> http://groups.google.com/group/go-uik?hl=en.

--
You received this message because you are subscribed to the Google Groups "go-uik" group.
To post to this group, send email to go-...@googlegroups.com.
To unsubscribe from this group, send email to go-uik+un...@googlegroups.com.

John Asmuth

unread,
May 10, 2013, 10:55:55 PM5/10/13
to go-...@googlegroups.com
Hi Sergey,

Add the following line to the top of one of your source files:


That will register a window driver that should work for your platform. If it doesn't, then you might be on a strange platform!
Reply all
Reply to author
Forward
0 new messages