Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

[0.5] Kelp GUI: Another instance of OSPath.String() being called #430

Closed
nikhilsaraf opened this issue Jun 2, 2020 · 0 comments · Fixed by #493
Closed

[0.5] Kelp GUI: Another instance of OSPath.String() being called #430

nikhilsaraf opened this issue Jun 2, 2020 · 0 comments · Fixed by #493
Assignees
Labels
bug Something isn't working good first issue Good for newcomers GUI issues related to the Kelp GUI

Comments

@nikhilsaraf
Copy link
Contributor

OSPath.String() should not be called and we should always use either the AsString(), Unix(), or Native() method.

IIRC I had had tried removing the String() method in the hopes of getting a compilation error wherever it was used but that didn't give me any compile error. I thought I had removed all instances but they still persist.

Stack trace from latest error reported (taken from the ui log file in ~/.kelp/ui_logs). It's pretty obvious where the error is from this trace:

goroutine 733 [running]:
runtime/debug.Stack(0xa658d70, 0x197, 0xc001ba2588)
        /usr/local/Cellar/go/1.13.4/libexec/src/runtime/debug/stack.go:24 +0x9d
github.com/stellar/kelp/support/kelpos.(*OSPath).String(0xc001a251a0, 0x189fa20, 0xc001a251a0)
        /Users/user/go/src/github.com/stellar/kelp/support/kelpos/ospath.go:25 +0x26
fmt.(*pp).handleMethods(0xc00047c000, 0xc000000073, 0xc001ba2801)
        /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:630 +0x302
fmt.(*pp).printArg(0xc00047c000, 0x189fa20, 0xc001a251a0, 0x73)
        /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:713 +0x206
fmt.(*pp).doPrintf(0xc00047c000, 0x192ee45, 0x28, 0xc001ba2c80, 0x2, 0x2)
        /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:1030 +0x15b
fmt.Sprintf(0x192ee45, 0x28, 0xc001ba2c80, 0x2, 0x2, 0x0, 0x76)
        /usr/local/Cellar/go/1.13.4/libexec/src/fmt/print.go:219 +0x66
github.com/stellar/kelp/gui/backend.(*APIServer).runGetBotInfoDirect(0xc001b42380, 0x5d1a478, 0xc000554700, 0xc003b6a228, 0x4)
        /Users/user/go/src/github.com/stellar/kelp/gui/backend/get_bot_info.go:76 +0x36a
github.com/stellar/kelp/gui/backend.(*APIServer).getBotInfo(0xc001b42380, 0x5d1a478, 0xc000554700, 0xc001b9a300)
        /Users/user/go/src/github.com/stellar/kelp/gui/backend/get_bot_info.go:48 +0x11b
net/http.HandlerFunc.ServeHTTP(0xc001b47570, 0x5d1a478, 0xc000554700, 0xc001b9a300)
        /usr/local/Cellar/go/1.13.4/libexec/src/net/http/server.go:2007 +0x44
github.com/stellar/kelp/vendor/github.com/go-chi/chi.(*Mux).routeHTTP(0xc001b373e0, 0x5d1a478, 0xc000554700, 0xc001b9a300)
        /Users/user/go/src/github.com/stellar/kelp/vendor/github.com/go-chi/chi/mux.go:425 +0x278
net/http.HandlerFunc.ServeHTTP(0xc001b47470, 0x5d1a478, 0xc000554700, 0xc001b9a300)
        /usr/local/Cellar/go/1.13.4/libexec/src/net/http/server.go:2007 +0x44
github.com/stellar/kelp/vendor/github.com/go-chi/chi.(*Mux).ServeHTTP(0xc001b373e0, 0x5d1a478, 0xc000554700, 0xc001b9a300)
        /Users/user/go/src/github.com/stellar/kelp/vendor/github.com/go-chi/chi/mux.go:70 +0x513
github.com/stellar/kelp/vendor/github.com/go-chi/chi.(*Mux).Mount.func1(0x5d1a478, 0xc000554700, 0xc001b9a300)
        /Users/user/go/src/github.com/stellar/kelp/vendor/github.com/go-chi/chi/mux.go:292 +0x124
net/http.HandlerFunc.ServeHTTP(0xc001b44440, 0x5d1a478, 0xc000554700, 0xc001b9a300)
        /usr/local/Cellar/go/1.13.4/libexec/src/net/http/server.go:2007 +0x44
github.com/stellar/kelp/vendor/github.com/go-chi/chi.(*Mux).routeHTTP(0xc001b37380, 0x5d1a478, 0xc000554700, 0xc001b9a300)
        /Users/user/go/src/github.com/stellar/kelp/vendor/github.com/go-chi/chi/mux.go:425 +0x278
net/http.HandlerFunc.ServeHTTP(0xc001b475c0, 0x5d1a478, 0xc000554700, 0xc001b9a300)
        /usr/local/Cellar/go/1.13.4/libexec/src/net/http/server.go:2007 +0x44
github.com/stellar/kelp/vendor/github.com/go-chi/chi/middleware.Timeout.func1.1(0x5d1a478, 0xc000554700, 0xc001b9a200)
        /Users/user/go/src/github.com/stellar/kelp/vendor/github.com/go-chi/chi/middleware/timeout.go:45 +0x1ca
net/http.HandlerFunc.ServeHTTP(0xc001b44460, 0x5d1a478, 0xc000554700, 0xc001b9a200)
        /usr/local/Cellar/go/1.13.4/libexec/src/net/http/server.go:2007 +0x44
github.com/stellar/kelp/vendor/github.com/go-chi/chi/middleware.Recoverer.func1(0x5d1a478, 0xc000554700, 0xc001b9a200)
        /Users/user/go/src/github.com/stellar/kelp/vendor/github.com/go-chi/chi/middleware/recoverer.go:35 +0xbb
net/http.HandlerFunc.ServeHTTP(0xc001b44480, 0x5d1a478, 0xc000554700, 0xc001b9a200)
        /usr/local/Cellar/go/1.13.4/libexec/src/net/http/server.go:2007 +0x44
github.com/stellar/kelp/vendor/github.com/go-chi/chi/middleware.RequestLogger.func1.1(0x1ba36e0, 0xc00017f7a0, 0xc001b9a100)
        /Users/user/go/src/github.com/stellar/kelp/vendor/github.com/go-chi/chi/middleware/logger.go:46 +0x2be
net/http.HandlerFunc.ServeHTTP(0xc001b4a300, 0x1ba36e0, 0xc00017f7a0, 0xc001b9a100)
        /usr/local/Cellar/go/1.13.4/libexec/src/net/http/server.go:2007 +0x44
github.com/stellar/kelp/vendor/github.com/go-chi/chi/middleware.RealIP.func1(0x1ba36e0, 0xc00017f7a0, 0xc001b9a100)
        /Users/user/go/src/github.com/stellar/kelp/vendor/github.com/go-chi/chi/middleware/realip.go:34 +0x99
net/http.HandlerFunc.ServeHTTP(0xc001b444a0, 0x1ba36e0, 0xc00017f7a0, 0xc001b9a100)
        /usr/local/Cellar/go/1.13.4/libexec/src/net/http/server.go:2007 +0x44
github.com/stellar/kelp/vendor/github.com/go-chi/chi/middleware.RequestID.func1(0x1ba36e0, 0xc00017f7a0, 0xc001b9a000)
        /Users/user/go/src/github.com/stellar/kelp/vendor/github.com/go-chi/chi/middleware/request_id.go:72 +0x1dc
net/http.HandlerFunc.ServeHTTP(0xc001b444c0, 0x1ba36e0, 0xc00017f7a0, 0xc001b9a000)
        /usr/local/Cellar/go/1.13.4/libexec/src/net/http/server.go:2007 +0x44
github.com/stellar/kelp/vendor/github.com/go-chi/chi.(*Mux).ServeHTTP(0xc001b37380, 0x1ba36e0, 0xc00017f7a0, 0xc001b35a00)
        /Users/user/go/src/github.com/stellar/kelp/vendor/github.com/go-chi/chi/mux.go:82 +0x2b2
net/http.serverHandler.ServeHTTP(0xc0002381c0, 0x1ba36e0, 0xc00017f7a0, 0xc001b35a00)
        /usr/local/Cellar/go/1.13.4/libexec/src/net/http/server.go:2802 +0xa4
net/http.(*conn).serve(0xc000468960, 0x1ba6a60, 0xc0002823c0)
        /usr/local/Cellar/go/1.13.4/libexec/src/net/http/server.go:1890 +0x875
created by net/http.(*Server).Serve
        /usr/local/Cellar/go/1.13.4/libexec/src/net/http/server.go:2927 +0x38e
@nikhilsaraf nikhilsaraf added the bug Something isn't working label Jun 2, 2020
@nikhilsaraf nikhilsaraf added this to the KelpGUI_v1.0.0-rc2 milestone Jun 2, 2020
@nikhilsaraf nikhilsaraf self-assigned this Jun 2, 2020
@nikhilsaraf nikhilsaraf added good first issue Good for newcomers GUI issues related to the Kelp GUI labels Jun 3, 2020
@nikhilsaraf nikhilsaraf changed the title Kelp GUI: Another instance of OSPath.String() being called [0.5] Kelp GUI: Another instance of OSPath.String() being called Jun 3, 2020
@nikhilsaraf nikhilsaraf assigned debnil and unassigned nikhilsaraf Aug 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers GUI issues related to the Kelp GUI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants