Bug#970419: lilyterm: No longer starts (likely related to VTE changes)

2020-10-14 Thread Philipp Wolski

Had the same assertion in vte_terminal_spawn_sync, happens in Upstream too.

Dug around the envv Pointer, _vte_pty_check_envv does not like empty 
entries.


src/notebook.c is constructing the envv Pointer in environ_str and later 
copies it to new_environs.


Around line 150 there is a '\t' being pushed into environ_str but the 
following append of the TERM envvar is eventually ifdef'ed.
When COLORTERM is forced-pushed into environ_str another '\t' will be 
prefixed without checking environ_str again.


So unless you compile with ENABLE_SET_EMULATION there will be a lone 
'\t' in environ_str which will later be translated into an empty envv entry.


I supposed the check for non-empty environ_str should be within the 
ifdef as well before the COLORTERM append.

I attached a quick'n'dirty patch.

But now that I look at it again (7 hours later), it would also work to 
leave the code as is but hardcode a '\t' after the TERM append and 
remove the hardcoded '\t' from COLORTERM instead.

E.g.:
g_string_append_printf (environ_str, "TERM=xterm"); to 
g_string_append_printf (environ_str, "TERM=xterm\t"); etc

and
g_string_append_printf (environ_str, "\tCOLORTERM=lilyterm"); to 
g_string_append_printf (environ_str, "COLORTERM=lilyterm");


I'll leave that for upstream to figure out ;-)

Hope this helps someone.


Description: Prevent empty environ_str entry

Author: Philipp Wolski 
Bug-Debian: https://bugs.debian.org/970419
Last-Update: 2020-10-14

Index: lilyterm-0.9.9.4+git20150208.f600c0/src/notebook.c
===
--- lilyterm-0.9.9.4+git20150208.f600c0.orig/src/notebook.c
+++ lilyterm-0.9.9.4+git20150208.f600c0/src/notebook.c
@@ -148,14 +148,14 @@ struct Page *add_page(struct Window *win
 			environ_str = g_string_append(environ_str, "\t");
 		g_string_append_printf (environ_str, "%s", user_environ);
 	}
+
+#ifdef ENABLE_SET_EMULATION
 #ifdef SAFEMODE
 	if (environ_str && environ_str->len)
 #else
 	if (environ_str->len)
 #endif
 		environ_str = g_string_append(environ_str, "\t");
-
-#ifdef ENABLE_SET_EMULATION
 #  ifdef SAFEMODE
 	if (win_data->emulate_term == NULL)
 		g_string_append_printf (environ_str, "TERM=xterm");
@@ -163,8 +163,15 @@ struct Page *add_page(struct Window *win
 #  endif
 		g_string_append_printf (environ_str, "TERM=%s", win_data->emulate_term);
 #endif
+
+#ifdef SAFEMODE
+	if (environ_str && environ_str->len)
+#else
+	if (environ_str->len)
+#endif
+		environ_str = g_string_append(environ_str, "\t");
 	// set colorterm
-	g_string_append_printf (environ_str, "\tCOLORTERM=lilyterm");
+	g_string_append_printf (environ_str, "COLORTERM=lilyterm");
 
 //  Setting the VTE_CJK_WIDTH environment  //
 


Bug#970419: lilyterm: No longer starts (likely related to VTE changes)

2020-09-15 Thread James Tocknell
Package: lilyterm
Version: 0.9.9.4+git20150208.f600c0-5
Severity: grave
Justification: renders package unusable

It appears that lilyterm is unable to start, running lilyterm gives the
following errors:

** Message: 11:20:26.198: Can NOT connect to a existing lilyterm socket!

(lilyterm:4801): Gtk-WARNING **: 11:20:26.267: Theme parsing error: 
:2:32: The style property GtkWidget:focus-line-width is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4801): Gtk-WARNING **: 11:20:26.267: Theme parsing error: 
:3:29: The style property GtkWidget:focus-padding is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4801): Gtk-WARNING **: 11:20:26.267: Theme parsing error: 
:2:32: The style property GtkWidget:focus-line-width is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4801): Gtk-WARNING **: 11:20:26.267: Theme parsing error: 
:3:29: The style property GtkWidget:focus-padding is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4801): VTE-CRITICAL **: 11:20:26.268: gboolean 
vte_terminal_spawn_sync(VteTerminal*, VtePtyFlags, const char*, char**, char**, 
GSpawnFlags, GSpawnChildSetupFunc, gpointer, GPid*, GCancellable*, GError**): 
assertion 'envv == nullptr ||_vte_pty_check_envv(envv)' failed

(lilyterm:4801): Gtk-WARNING **: 11:20:26.268: Theme parsing error: 
:2:32: The style property GtkWidget:focus-line-width is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4801): Gtk-WARNING **: 11:20:26.268: Theme parsing error: 
:3:29: The style property GtkWidget:focus-padding is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4801): Gtk-WARNING **: 11:20:26.268: Theme parsing error: 
:2:32: The style property GtkWidget:focus-line-width is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4801): Gtk-WARNING **: 11:20:26.268: Theme parsing error: 
:3:29: The style property GtkWidget:focus-padding is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4801): VTE-CRITICAL **: 11:20:26.268: void 
vte_terminal_match_set_cursor_type(VteTerminal*, int, GdkCursorType): assertion 
'tag >= 0' failed

(lilyterm:4801): VTE-CRITICAL **: 11:20:26.268: void 
vte_terminal_match_set_cursor_type(VteTerminal*, int, GdkCursorType): assertion 
'tag >= 0' failed

(lilyterm:4801): VTE-CRITICAL **: 11:20:26.269: void 
vte_terminal_match_set_cursor_type(VteTerminal*, int, GdkCursorType): assertion 
'tag >= 0' failed

(lilyterm:4801): VTE-CRITICAL **: 11:20:26.269: void 
vte_terminal_match_set_cursor_type(VteTerminal*, int, GdkCursorType): assertion 
'tag >= 0' failed

and running lilyterm with -s gives:

(lilyterm:4807): Gtk-WARNING **: 11:20:57.451: Theme parsing error: 
:2:32: The style property GtkWidget:focus-line-width is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4807): Gtk-WARNING **: 11:20:57.451: Theme parsing error: 
:3:29: The style property GtkWidget:focus-padding is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4807): Gtk-WARNING **: 11:20:57.452: Theme parsing error: 
:2:32: The style property GtkWidget:focus-line-width is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4807): Gtk-WARNING **: 11:20:57.452: Theme parsing error: 
:3:29: The style property GtkWidget:focus-padding is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4807): VTE-CRITICAL **: 11:20:57.453: gboolean 
vte_terminal_spawn_sync(VteTerminal*, VtePtyFlags, const char*, char**, char**, 
GSpawnFlags, GSpawnChildSetupFunc, gpointer, GPid*, GCancellable*, GError**): 
assertion 'envv == nullptr ||_vte_pty_check_envv(envv)' failed

(lilyterm:4807): Gtk-WARNING **: 11:20:57.453: Theme parsing error: 
:2:32: The style property GtkWidget:focus-line-width is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4807): Gtk-WARNING **: 11:20:57.453: Theme parsing error: 
:3:29: The style property GtkWidget:focus-padding is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4807): Gtk-WARNING **: 11:20:57.454: Theme parsing error: 
:2:32: The style property GtkWidget:focus-line-width is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4807): Gtk-WARNING **: 11:20:57.454: Theme parsing error: 
:3:29: The style property GtkWidget:focus-padding is deprecated and 
shouldn't be used anymore. It will be removed in a future version

(lilyterm:4807): VTE-CRITICAL **: 11:20:57.454: void 
vte_terminal_match_set_cursor_type(VteTerminal*, int, GdkCursorType): assertion 
'tag >= 0' failed

(lilyterm:4807): VTE-CRITICAL **: