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

Virtual terminal size set to unreasonable value #2705

Open
TheDcoder opened this issue Dec 25, 2020 · 10 comments
Open

Virtual terminal size set to unreasonable value #2705

TheDcoder opened this issue Dec 25, 2020 · 10 comments

Comments

@TheDcoder
Copy link
Contributor

I think I have discovered a bug in the terminal size calculation done by the VTE in the messages window, I use the fish shell and I always get this message whenever I open the terminal:

⏎                                                           Welcome to fish, the friendly interactive shell
TheDcoder@arch /m/d/P/C/E/build (master)> <W> fish: Current terminal parameters set terminal size to unreasonable value.
<W> fish: Defaulting terminal size to 80x24.

Perhaps Geany is initializing the VTE widget too soon, causing it to believe the available size is 0 or some other unreasonable value.

I am using Geany 1.37 and this issue is always reproducible.

@elextr
Copy link
Member

elextr commented Dec 25, 2020

Please post the top few lines of Menu->Help->Debug messages down to and including the OS line.

@TheDcoder
Copy link
Contributor Author

TheDcoder commented Dec 25, 2020

@elextr

06:38:48: GLib-GIO DEBUG	: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
06:38:48: Geany INFO		: Geany 1.37, en_US.UTF8
06:38:48: Geany INFO		: GTK 3.24.24, GLib 2.66.4
06:38:48: Geany INFO		: OS: Arch Linux
06:38:48: Geany INFO		: System data dir: /usr/share/geany
06:38:48: Geany INFO		: User config dir: /home/TheDcoder/.config/geany
06:38:48: Geany INFO		: Loaded GTK+ CSS theme '/usr/share/geany/geany.css'
06:38:48: Geany INFO		: Loaded GTK+ CSS theme '/usr/share/geany/geany-3.20.css'
06:38:48: Geany INFO		: System plugin path: /usr/lib/geany
06:38:48: Geany INFO		: Added filetype Cython (63).
06:38:48: Geany INFO		: Added filetype Swift (64).
06:38:48: Geany INFO		: Added filetype CUDA (65).
06:38:48: Geany INFO		: Added filetype Groovy (66).
06:38:48: Geany INFO		: Added filetype Nim (67).
06:38:48: Geany INFO		: Added filetype Arduino (68).
06:38:48: Geany INFO		: Added filetype Genie (69).
06:38:48: Geany INFO		: Added filetype JSON (70).
06:38:48: Geany INFO		: Added filetype Scala (71).
06:38:48: Geany INFO		: Added filetype TypeScript (72).
06:38:48: Geany INFO		: Added filetype Kotlin (73).
06:38:48: Geany INFO		: Added filetype Clojure (74).
06:38:48: Geany INFO		: Added filetype Graphviz (75).
06:38:48: Geany INFO		: Loaded libvte from libvte-2.91.so
06:38:48: Geany INFO		: Loaded:   /usr/lib/geany/addons.so (Addons)
06:38:48: Geany INFO		: Loaded:   /usr/lib/geany/codenav.so (Code navigation)
06:38:48: Geany INFO		: Loaded:   /usr/lib/geany/commander.so (Commander)
06:38:48: Geany INFO		: Loaded:   /usr/lib/geany/export.so (Export)
06:38:48: Geany INFO		: Loaded:   /usr/lib/geany/geanyvc.so (GeanyVC)
06:38:48: Geany INFO		: Loaded:   /usr/lib/geany/git-changebar.so (Git Change Bar)
06:38:48: Geany INFO		: Loaded:   /usr/lib/geany/keyrecord.so (Keystrokes recorder)
06:38:48: Geany INFO		: Loaded:   /usr/lib/geany/lineoperations.so (Line Operations)
06:38:48: Geany INFO		: Loaded:   /usr/lib/geany/projectorganizer.so (Project Organizer)
06:38:48: SpellCheck DEBUG	: Initializing Enchant library version 2.2.13
06:38:48: (null) WARNING	: Error loading plugin: libnuspell.so.4: cannot open shared object file: No such file or directory

06:38:48: GLib DEBUG	: unsetenv() is not thread-safe and should not be used after threads are created
06:38:48: Geany INFO		: Loaded:   /usr/lib/geany/spellcheck.so (Spell Check)
06:38:48: Geany INFO		: Loaded:   /usr/lib/geany/splitwindow.so (Split Window)
06:38:48: Geany INFO		: Loaded:   /usr/lib/geany/treebrowser.so (TreeBrowser)
06:38:48: Geany INFO		: unknown : None (UTF-8)
06:38:49: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:38:49: GdkPixbuf DEBUG	: 	Encoding raw
06:38:49: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:38:49: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:38:49: GdkPixbuf DEBUG	: 	Copy pixels == false
06:38:49: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:38:49: GdkPixbuf DEBUG	: 	Encoding raw
06:38:49: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:38:49: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:38:49: GdkPixbuf DEBUG	: 	Copy pixels == false
06:38:49: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:38:49: GdkPixbuf DEBUG	: 	Encoding raw
06:38:49: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:38:49: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:38:49: GdkPixbuf DEBUG	: 	Copy pixels == false
06:38:53: Geany INFO		: /mnt/data_partition/Projects/C/EasyCodeIt/CMakeLists.txt : CMake (UTF-8)
06:38:53: Geany INFO		: /mnt/data_partition/Projects/C/EasyCodeIt/eci.c : C (UTF-8)
06:38:53: Geany INFO		: Loaded /usr/share/geany/tags/std99.c.tags (C), 1618 symbol(s).
06:38:53: Geany INFO		: /mnt/data_partition/Projects/C/EasyCodeIt/parse.c : C (UTF-8)
06:38:53: Geany INFO		: /mnt/data_partition/Projects/C/EasyCodeIt/parse.h : C++ (UTF-8)
06:38:53: Geany INFO		: /mnt/data_partition/Projects/C/EasyCodeIt/build/example_scripts/syntax1.au3 : None (UTF-8)
06:38:53: Geany INFO		: /mnt/data_partition/Projects/C/EasyCodeIt/build/example_scripts/expression.au3 : None (UTF-8)
06:38:53: Geany INFO		: /mnt/data_partition/Projects/C/EasyCodeIt/utils.c : C (UTF-8)
06:38:54: Geany INFO		: /mnt/data_partition/Projects/C/EasyCodeIt/utils.h : C++ (UTF-8)
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:19: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:19: GdkPixbuf DEBUG	: 	Encoding raw
06:54:19: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:19: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:19: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:21: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:21: GdkPixbuf DEBUG	: 	Encoding raw
06:54:21: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:21: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:21: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:21: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:21: GdkPixbuf DEBUG	: 	Encoding raw
06:54:21: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:21: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:21: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:21: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:21: GdkPixbuf DEBUG	: 	Encoding raw
06:54:21: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:21: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:21: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:21: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:21: GdkPixbuf DEBUG	: 	Encoding raw
06:54:21: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:21: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:21: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:21: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:21: GdkPixbuf DEBUG	: 	Encoding raw
06:54:21: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:21: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:21: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:21: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:21: GdkPixbuf DEBUG	: 	Encoding raw
06:54:21: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:21: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:21: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:21: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:21: GdkPixbuf DEBUG	: 	Encoding raw
06:54:21: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:21: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:21: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:21: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:21: GdkPixbuf DEBUG	: 	Encoding raw
06:54:21: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:21: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:21: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:21: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:21: GdkPixbuf DEBUG	: 	Encoding raw
06:54:21: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:21: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:21: GdkPixbuf DEBUG	: 	Copy pixels == false
06:54:21: GdkPixbuf DEBUG	: gdk_pixbuf_from_pixdata() called on:
06:54:21: GdkPixbuf DEBUG	: 	Encoding raw
06:54:21: GdkPixbuf DEBUG	: 	Dimensions: 14 x 14
06:54:21: GdkPixbuf DEBUG	: 	Rowstride: 56, Length: 808
06:54:21: GdkPixbuf DEBUG	: 	Copy pixels == false

The output doesn't include the OS as suggested, but I am using Arch Linux and installed Geany from the official repository.

@elextr
Copy link
Member

elextr commented Dec 25, 2020

You have entirely missed the lines required TOP down to where you started 😋

@TheDcoder
Copy link
Contributor Author

I swear those lines didn't exist when I copied the first time!

@codebrainz
Copy link
Member

Sounds like a problem with LibVTE and/or Fish (see this commit), but not Geany. Not sure it's even worth trying to workaround in Geany since the message was removed in Fish and doesn't seem to affect any other shells.

@elextr
Copy link
Member

elextr commented Dec 25, 2020

I swear those lines didn't exist when I copied the first time!

Sure sure, eaten by Santas reindeers 😁

Anyway, WFM, Fish 3.1.0 which should still have the message IIUC.

11:57:15: Geany INFO : Geany 1.37 (git >= 915cf6e), en_AU.UTF-8
11:57:15: Geany INFO : GTK 3.24.20, GLib 2.64.3
11:57:15: Geany INFO : OS: Linux Mint 20 (ulyana)

Perhaps the Arch bleeding edge GTK has been changed so it does not calculate a sensible size when the window is hidden.

@TheDcoder
Copy link
Contributor Author

@codebrainz Indeed, it might be a problem with LibVTE, but is there a possibility that we are adding/mapping the widget too soon, or are doing something else which is causing this?

Thanks for pointing out that the warning has been removed from fish, but this doesn't really remedy the issue. Other shells might just be ignoring this, just like fish has opted to do so from the next version.

I am concerned that certain terminal based UI applications may not properly work inside Geany.

@elextr It might be a change in how GTK maps the widgets.

the Arch bleeding edge GTK

I wouldn't consider the latest stable release the "bleeding edge" 😁
Our versions aren't that apart anyway, I am just 0.0.04 versions above you (GTK 3.24.24)

...so it does not calculate a sensible size when the window is hidden.

This is also possible, but I was under the impression that the terminal isn't started until the "Terminal" tab is opened for the first time.

@codebrainz
Copy link
Member

codebrainz commented Dec 25, 2020

I am concerned that certain terminal based UI applications may not properly work inside Geany.

IIRC Fish was using minimum 20 columns and 2 lines in its check, which seems arbitrary, unless it's from POSIX standard? Moreover, at least here, Geany's terminal has the correct output for tput cols (and $COLUMNS) and tput lines (and $LINES), so it shouldn't affect anything but the initial shell.

LibVTE has always been weird with respect to sizing due to it always having to update/maintain the terminal size (columns/lines) dynamically on-the-fly and also having to respect GTK+'s widget sizing stuff (pixels width/height), and in addition being inside a GTK+ scrolled window.

It's possible a workaround could be implemented, like only spawning the shell command after the VTE widget is sized/realized using a callback and hoping the user doesn't have their message window shrunk down "too" small or by enforcing a minimum width/height somehow like standalone VTE applications do (ex. gnome-terminal, xfce4-terminal), but it doesn't seem worth it to me unless someone volunteers to investigate and make a patch.

Note: I can reproduce this issue without Geany or VTE by using XTerm, shrinking it to a small size, and running Fish.

@elextr
Copy link
Member

elextr commented Dec 25, 2020

This is also possible, but I was under the impression that the terminal isn't started until the "Terminal" tab is opened for the first time.

No its added to the idle list during startup, so it would be created after the widgets and such are created, not on window open (unless its default opened maybe).

@elextr
Copy link
Member

elextr commented Dec 25, 2020

Agree 👍 with @codebrainz "not worth it"

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

No branches or pull requests

3 participants