Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

siggo 0.9.0. on FreeBSD slightly broken interface #42

Closed
kilix-git opened this issue Apr 12, 2021 · 11 comments · Fixed by #43
Closed

siggo 0.9.0. on FreeBSD slightly broken interface #42

kilix-git opened this issue Apr 12, 2021 · 11 comments · Fixed by #43

Comments

@kilix-git
Copy link

Hello,
Basically, my siggo now looks like this, any idea where should I start troubleshooting? The area where my contacts are present makes the adjacent text field shifted by one character to the left, which makes the text field corrupted. Some random characters appear there, which nobody typed, the borders are shifted, etc, see picture.
Running on FreeBSD 12.2-p4, I rebuilt siggo from source again just to be sure, the issue is there.

scrot-21-0408-20:32:03

@derricw
Copy link
Owner

derricw commented Apr 14, 2021

Hey! This looks like you might have installed using go get. go get has some issues with getting correct dependency versions. Try building by cloning and using make build and see if that solves this issue.

Edit: just saw that you re-built from source. Hrrmmm... I'll try and test if I can. I don't have a FreeBSD box available. I can test on MacOS and Ubuntu.

@kilix-git
Copy link
Author

Thanks for the reply.
I wonder what may've caused this, it's about a month since this problem started. I neglected it, thinking that some update will repair it automagically, stupid of me, I should've looked into it immediately, at least I would've known what may've caused it. Now it's too late to remember exactly, what packages got updated or what happened.

Another piece of info I realized:
scli has this same issue, while music player cmus (written in C, using curses UI) is with no such issues. What does scli and siggo have in common UI-wise?

@fauxmight
Copy link

Same issue on Arch linux, building from the 0.9.0 AUR entry.
https://aur.archlinux.org/packages/siggo/
Have tried on multiple terminal emulators, shifted fonts and font types (bitmap, xft).
Lost colors at the same time as the offset issue began.
I, too, have just used siggo anyway for the last month or so when I couldn't find an obvious answer to why the issue started.

I have rebuilt with a fresh go installation with no change to the UI effect mentioned here.

@kilix-git
Copy link
Author

kilix-git commented Apr 15, 2021

Yeah, I forgot to mention that too, I tried multiple terminal emulators, all of them had the same results. I also tried 2 or 3 different fonts, that also didn't help.

@derricw
Copy link
Owner

derricw commented Apr 21, 2021

Hey guys, I am able to reproduce the error. It looks like somehow the contact names are read from the signal-cli data file sandwiched between some unicode that I'm not familiar with: \u2068 and \u2069

I am not sure why this is happening, but hopefully I can get you a fix soon.

@sharksforarms
Copy link

Just trying this project out today, also confirming the issue on arch.

Possibly related: https://www.w3.org/International/questions/qa-bidi-unicode-controls

@derricw
Copy link
Owner

derricw commented May 4, 2021

Hey guys, this should be fixed on master. Please try it out and re-open if you still see this issue.

@sharksforarms
Copy link

@derricw Seems to have fixed it! Now running into a crash:

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x7c423c]

goroutine 1 [running]:
github.com/rivo/tview.(*Application).Run.func1(0xc0002d61c0)
        /home/sharks/go/pkg/mod/github.com/rivo/tview@v0.0.0-20200329194346-7cc182c5846e/application.go:244 +0x87
panic(0x827d80, 0xc5d2e0)
        /usr/lib/go/src/runtime/panic.go:965 +0x1b9
github.com/derricw/siggo/model.(*Conversation).HasStagedMessage(...)
        /tmp/siggo/model/model.go:338
github.com/derricw/siggo/model.(*Conversation).HasStagedData(...)
        /tmp/siggo/model/model.go:343
github.com/derricw/siggo/widgets.(*ContactListPanel).Render(0xc0001cf0c0)
        /tmp/siggo/widgets/contactlist.go:73 +0x3fc
github.com/derricw/siggo/widgets.(*ChatWindow).update(0xc0002c06c0)
        /tmp/siggo/widgets/chatwindow.go:432 +0x68
github.com/derricw/siggo/widgets.NewChatWindow.func3.1()
        /tmp/siggo/widgets/chatwindow.go:601 +0x2a
github.com/rivo/tview.(*Application).QueueUpdateDraw.func1()
        /home/sharks/go/pkg/mod/github.com/rivo/tview@v0.0.0-20200329194346-7cc182c5846e/application.go:716 +0x2f
github.com/rivo/tview.(*Application).Run(0xc0002d61c0, 0x0, 0x0)
        /home/sharks/go/pkg/mod/github.com/rivo/tview@v0.0.0-20200329194346-7cc182c5846e/application.go:371 +0x986
github.com/derricw/siggo/cmd.glob..func10(0xc65f40, 0xc99ef8, 0x0, 0x0)
        /tmp/siggo/cmd/root.go:121 +0x453
github.com/spf13/cobra.(*Command).execute(0xc65f40, 0xc000012210, 0x0, 0x0, 0xc65f40, 0xc000012210)
        /home/sharks/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:842 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc65f40, 0x407f85, 0xc00006c058, 0x401410)
        /home/sharks/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:943 +0x336
github.com/spf13/cobra.(*Command).Execute(...)
        /home/sharks/go/pkg/mod/github.com/spf13/cobra@v0.0.7/command.go:883
github.com/derricw/siggo/cmd.Execute()
        /tmp/siggo/cmd/root.go:131 +0x31
main.main()
        /tmp/siggo/main.go:8 +0x25

Related: #41

@kilix-git
Copy link
Author

Ok, I built it after fixing u_int type:
/usr/include/sys/_lock.h:38:2: error: unknown type name 'u_int' u_int lo_flags;
in dbus/transport_unixcred_freebsd.go:13

and now the issue with UI seems gone, thanks @derricw!

@derricw
Copy link
Owner

derricw commented May 4, 2021

@sharksforarms Thanks. Since @kilix-git is reporting this particular problem fixed, I'll leave this one closed and work on #41.

@fauxmight
Copy link

@derricw Issue resolved. This is working beautifully again on Arch. Many thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants