edit_box not working (walkabout) #217

Closed
Dassadar opened this Issue Mar 6, 2016 · 23 comments

Comments

Projects
None yet
3 participants
@Dassadar

Dassadar commented Mar 6, 2016

Hello,

I have an issue with edit_box which are not displaying.

For example, here is the result for simple-control-sizes.rb sample:
0ab6ec59

I am on Ubuntu 15.10, and my Shoes build is 3.3.0 r2333.

Can you please help?

Thx in advance,
David

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 6, 2016

Contributor

Note the previous conversation is here. shoes/shoes-deprecated#282 This seems to be something very strange on David's system. I can't think of any way for Shoes to not have edit_boxes.

You could try the 3.3.1 beta -
http://walkabout.mvmanila.com/public/shoes/shoes-3.3.1-gtk3-x86_64.install
It will replace your existing 3.3.0 but that's probably not a loss for you considering.

Contributor

ccoupe commented Mar 6, 2016

Note the previous conversation is here. shoes/shoes-deprecated#282 This seems to be something very strange on David's system. I can't think of any way for Shoes to not have edit_boxes.

You could try the 3.3.1 beta -
http://walkabout.mvmanila.com/public/shoes/shoes-3.3.1-gtk3-x86_64.install
It will replace your existing 3.3.0 but that's probably not a loss for you considering.

@Dassadar

This comment has been minimized.

Show comment
Hide comment
@Dassadar

Dassadar Mar 6, 2016

Not a loss, but not a gain either: I get the exact same faulty display... :-/

Dassadar commented Mar 6, 2016

Not a loss, but not a gain either: I get the exact same faulty display... :-/

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 6, 2016

Contributor

Which version of 15.10 are you using (there are many). I'll have to put in a VM and see if I can recreate your problem. That takes time so I don't want to pick an Ubuntu that isn't the same as yours.

Contributor

ccoupe commented Mar 6, 2016

Which version of 15.10 are you using (there are many). I'll have to put in a VM and see if I can recreate your problem. That takes time so I don't want to pick an Ubuntu that isn't the same as yours.

@passenger94

This comment has been minimized.

Show comment
Hide comment
@passenger94

passenger94 Mar 6, 2016

Contributor

works for me (ubuntu 14.04) !
very strange ??

Contributor

passenger94 commented Mar 6, 2016

works for me (ubuntu 14.04) !
very strange ??

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 6, 2016

Contributor

I really can't think of how this could happen. I don't think you can disable multi line text boxes unless there is some very odd theming going on and that would break other apps, not just Shoes. He's not getting messages on the launch terminal or in Shoes console. How could this happen?

Contributor

ccoupe commented Mar 6, 2016

I really can't think of how this could happen. I don't think you can disable multi line text boxes unless there is some very odd theming going on and that would break other apps, not just Shoes. He's not getting messages on the launch terminal or in Shoes console. How could this happen?

@passenger94

This comment has been minimized.

Show comment
Hide comment
@passenger94

passenger94 Mar 6, 2016

Contributor

it's ok on win7 also !
Also tested with your version you linked, all fine !
head scratching ....

Contributor

passenger94 commented Mar 6, 2016

it's ok on win7 also !
Also tested with your version you linked, all fine !
head scratching ....

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 7, 2016

Contributor

Since shoes uses the systems Gtk3, It might be useful to know what @Dassadar gtk lib is. For instance : on my 14.04 system

$ ls -ld /usr/lib/x86_64-linux-gnu/libgtk-3*
drwxr-xr-x 2 root root    4096 Sep  4  2015 /usr/lib/x86_64-linux-gnu/libgtk-3-0
lrwxrwxrwx 1 root root      20 Jun 30  2015 /usr/lib/x86_64-linux-gnu/libgtk-3.so -> libgtk-3.so.0.1000.8
lrwxrwxrwx 1 root root      20 Jun 30  2015 /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 -> libgtk-3.so.0.1000.8
-rw-r--r-- 1 root root 5297920 Jun 30  2015 /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.1000.8

which matches up with Syntapic's number of 3.10.8

Contributor

ccoupe commented Mar 7, 2016

Since shoes uses the systems Gtk3, It might be useful to know what @Dassadar gtk lib is. For instance : on my 14.04 system

$ ls -ld /usr/lib/x86_64-linux-gnu/libgtk-3*
drwxr-xr-x 2 root root    4096 Sep  4  2015 /usr/lib/x86_64-linux-gnu/libgtk-3-0
lrwxrwxrwx 1 root root      20 Jun 30  2015 /usr/lib/x86_64-linux-gnu/libgtk-3.so -> libgtk-3.so.0.1000.8
lrwxrwxrwx 1 root root      20 Jun 30  2015 /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 -> libgtk-3.so.0.1000.8
-rw-r--r-- 1 root root 5297920 Jun 30  2015 /usr/lib/x86_64-linux-gnu/libgtk-3.so.0.1000.8

which matches up with Syntapic's number of 3.10.8

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 7, 2016

Contributor

I can confirm @Dassadar problem. I installed 15.10 Desktop (AMD aka x86_64) in a OracleBox VM and samples/simple-control-sizes.rb is missing the edit_box !!! I'm using the Shoes 3.3.1 beta. Gtk3 appears to be 3.16.7 so that's not wildly newer. FWIW it only takes an hour or two install and I still hate the new desktop. 15.10 doesn't ship with alternates like Gnome Shell either.

Contributor

ccoupe commented Mar 7, 2016

I can confirm @Dassadar problem. I installed 15.10 Desktop (AMD aka x86_64) in a OracleBox VM and samples/simple-control-sizes.rb is missing the edit_box !!! I'm using the Shoes 3.3.1 beta. Gtk3 appears to be 3.16.7 so that's not wildly newer. FWIW it only takes an hour or two install and I still hate the new desktop. 15.10 doesn't ship with alternates like Gnome Shell either.

@ccoupe ccoupe added Linux High labels Mar 7, 2016

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 7, 2016

Contributor

When closing the window from the command below, we do get a small clue.

ccoupe@ubu15-10:~$ .shoes/walkabout/shoes .shoes/walkabout/samples/simple-control-sizes.rb 
vlc not at standard location 

(shoes-bin:4697): Gdk-WARNING **: losing last reference to undestroyed window
Contributor

ccoupe commented Mar 7, 2016

When closing the window from the command below, we do get a small clue.

ccoupe@ubu15-10:~$ .shoes/walkabout/shoes .shoes/walkabout/samples/simple-control-sizes.rb 
vlc not at standard location 

(shoes-bin:4697): Gdk-WARNING **: losing last reference to undestroyed window
@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 7, 2016

Contributor

I took this opportunity to update the wiki with how to build Shoes from source. https://github.com/Shoes3/shoes3/wiki/Building-Shoes-on-Linux so some good has come from this bug since that page was out-of-date-by-a-lot.

Edit_boxes are missing in that Shoes and the Gdk-WARNING **: losing last reference to undestroyed window only happens on scripts that have edit boxes when closed from the window button. Tested with samples/simple-control-sizes and my http://walkabout.mvmanila.com/public/share/isp.rb sample which writes to a edit_box and writes a file entry every interval (it set it 15 secs). The log file exists. No complaints from Gtk about setting contents on the edit box - it just doesn't show on screen. Perhaps there is (newish) gtk flag to set when creating that box?

gtk.c:1233

Contributor

ccoupe commented Mar 7, 2016

I took this opportunity to update the wiki with how to build Shoes from source. https://github.com/Shoes3/shoes3/wiki/Building-Shoes-on-Linux so some good has come from this bug since that page was out-of-date-by-a-lot.

Edit_boxes are missing in that Shoes and the Gdk-WARNING **: losing last reference to undestroyed window only happens on scripts that have edit boxes when closed from the window button. Tested with samples/simple-control-sizes and my http://walkabout.mvmanila.com/public/share/isp.rb sample which writes to a edit_box and writes a file entry every interval (it set it 15 secs). The log file exists. No complaints from Gtk about setting contents on the edit box - it just doesn't show on screen. Perhaps there is (newish) gtk flag to set when creating that box?

gtk.c:1233

@passenger94

This comment has been minimized.

Show comment
Hide comment
@passenger94

passenger94 Mar 7, 2016

Contributor

for info : Edit_box is a gtk_text_view inside a gtk_scrolled_window, maybe problem is coming from alternate version of gtk_scrolled_window
@ccoupe maybe it's worth trying to compile with a regular gtk_scrolled_window in lieu of gtk_scrolled_window_alt_new, just too see if problem comes from there ...

Contributor

passenger94 commented Mar 7, 2016

for info : Edit_box is a gtk_text_view inside a gtk_scrolled_window, maybe problem is coming from alternate version of gtk_scrolled_window
@ccoupe maybe it's worth trying to compile with a regular gtk_scrolled_window in lieu of gtk_scrolled_window_alt_new, just too see if problem comes from there ...

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 7, 2016

Contributor

@passenger94 - I'll try that tomorrow. It's late here.

Contributor

ccoupe commented Mar 7, 2016

@passenger94 - I'll try that tomorrow. It's late here.

@passenger94

This comment has been minimized.

Show comment
Hide comment
@passenger94

passenger94 Mar 7, 2016

Contributor

I can see one problematic change between 3.10 and 3.16 in gtkscrolledwindow.c
gtkscrolledwindow now have a gdk_window
in 3.10 was :
https://github.com/GNOME/gtk/blob/gtk-3-10/gtk/gtkscrolledwindow.c#L575
in 3.16 :
https://github.com/GNOME/gtk/blob/gtk-3-16/gtk/gtkscrolledwindow.c#L1187

i don't know if it's what we are dealing with but could be ! (the alt version says explicitely that it doesn't have a window, like in 3.10 :
https://github.com/Shoes3/shoes3/blob/master/shoes/native/gtkscrolledwindowalt.c#L54)

So, If gtk_scrolled_window_alt_new is the problem, i would next try this :
gtk_widget_set_has_window(GTK_WIDGET(scrolledwindowAlt), TRUE);

Don't know but smells strong ...

Contributor

passenger94 commented Mar 7, 2016

I can see one problematic change between 3.10 and 3.16 in gtkscrolledwindow.c
gtkscrolledwindow now have a gdk_window
in 3.10 was :
https://github.com/GNOME/gtk/blob/gtk-3-10/gtk/gtkscrolledwindow.c#L575
in 3.16 :
https://github.com/GNOME/gtk/blob/gtk-3-16/gtk/gtkscrolledwindow.c#L1187

i don't know if it's what we are dealing with but could be ! (the alt version says explicitely that it doesn't have a window, like in 3.10 :
https://github.com/Shoes3/shoes3/blob/master/shoes/native/gtkscrolledwindowalt.c#L54)

So, If gtk_scrolled_window_alt_new is the problem, i would next try this :
gtk_widget_set_has_window(GTK_WIDGET(scrolledwindowAlt), TRUE);

Don't know but smells strong ...

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 7, 2016

Contributor

@passenger94 - That fixed it on 3.16. Wonderful! That fix crashes 3.10 so we do have another interesting problem. We need to test the Gtk version version at runtime (not compile time).

Contributor

ccoupe commented Mar 7, 2016

@passenger94 - That fixed it on 3.16. Wonderful! That fix crashes 3.10 so we do have another interesting problem. We need to test the Gtk version version at runtime (not compile time).

@passenger94

This comment has been minimized.

Show comment
Hide comment
@passenger94

passenger94 Mar 7, 2016

Contributor

Nice !
no wonders it crashes 3.10 !!

We need to test the Gtk version version at runtime

maybe looking at the return of gtk_widget_get_has_window() is enough ?
what do you think ?

Edit : sorry, it's confusing ...
i mean check if parent of scrolledwindowAlt, which is regular scrolledwindow has a window, then process accordingly

Contributor

passenger94 commented Mar 7, 2016

Nice !
no wonders it crashes 3.10 !!

We need to test the Gtk version version at runtime

maybe looking at the return of gtk_widget_get_has_window() is enough ?
what do you think ?

Edit : sorry, it's confusing ...
i mean check if parent of scrolledwindowAlt, which is regular scrolledwindow has a window, then process accordingly

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 7, 2016

Contributor
gtk_widget_set_has_window(GTK_WIDGET(scrolledwindowAlt), gtk_widget_get_has_window(scrolledwindowAlt));

Seems to work.

Contributor

ccoupe commented Mar 7, 2016

gtk_widget_set_has_window(GTK_WIDGET(scrolledwindowAlt), gtk_widget_get_has_window(scrolledwindowAlt));

Seems to work.

@passenger94

This comment has been minimized.

Show comment
Hide comment
@passenger94

passenger94 Mar 7, 2016

Contributor

no, there we are checking ourself !!! ;-)
look at the parent, then fork

if (gtk_widget_get_has_window(scrolledwindowAlt->parent_instance)) {
  gtk_widget_set_has_window(GTK_WIDGET(scrolledwindowAlt), TRUE);
} else {
  gtk_widget_set_has_window(GTK_WIDGET(scrolledwindowAlt), FALSE);
}

or yes, better, like you did

gtk_widget_set_has_window(GTK_WIDGET(scrolledwindowAlt), gtk_widget_get_has_window(scrolledwindowAlt->parent_instance))

hmmm, probably a cast is missing : GTK_WIDGET((scrolledwindowAlt->parent_instance))

Contributor

passenger94 commented Mar 7, 2016

no, there we are checking ourself !!! ;-)
look at the parent, then fork

if (gtk_widget_get_has_window(scrolledwindowAlt->parent_instance)) {
  gtk_widget_set_has_window(GTK_WIDGET(scrolledwindowAlt), TRUE);
} else {
  gtk_widget_set_has_window(GTK_WIDGET(scrolledwindowAlt), FALSE);
}

or yes, better, like you did

gtk_widget_set_has_window(GTK_WIDGET(scrolledwindowAlt), gtk_widget_get_has_window(scrolledwindowAlt->parent_instance))

hmmm, probably a cast is missing : GTK_WIDGET((scrolledwindowAlt->parent_instance))

ccoupe added a commit that referenced this issue Mar 7, 2016

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 7, 2016

Contributor

parent-instance or parent->instance don't exist. I'm busy so I can't look it up myself

Contributor

ccoupe commented Mar 7, 2016

parent-instance or parent->instance don't exist. I'm busy so I can't look it up myself

@passenger94

This comment has been minimized.

Show comment
Hide comment
@passenger94

passenger94 Mar 7, 2016

Contributor

just corrected sorry, parent_instance
GTK_WIDGET(scrolledwindowAlt->parent_instance)

Contributor

passenger94 commented Mar 7, 2016

just corrected sorry, parent_instance
GTK_WIDGET(scrolledwindowAlt->parent_instance)

@passenger94

This comment has been minimized.

Show comment
Hide comment
@passenger94

passenger94 Mar 7, 2016

Contributor

ok this works on 3.10

gtk_widget_set_has_window(GTK_WIDGET(scrolledwindowAlt), 
    gtk_widget_get_has_window(GTK_WIDGET(&scrolledwindowAlt->parent_instance)));

parent_instance is not a pointer !

Contributor

passenger94 commented Mar 7, 2016

ok this works on 3.10

gtk_widget_set_has_window(GTK_WIDGET(scrolledwindowAlt), 
    gtk_widget_get_has_window(GTK_WIDGET(&scrolledwindowAlt->parent_instance)));

parent_instance is not a pointer !

@passenger94

This comment has been minimized.

Show comment
Hide comment
@passenger94

passenger94 Mar 7, 2016

Contributor

For info, This change appeared in 3.16 !

Contributor

passenger94 commented Mar 7, 2016

For info, This change appeared in 3.16 !

@ccoupe ccoupe added this to the 3.3.1 milestone Mar 7, 2016

@ccoupe

This comment has been minimized.

Show comment
Hide comment
@ccoupe

ccoupe Mar 7, 2016

Contributor

That works on Ubuntu 15.10. I've uploaded a new beta (same address as above) if @Dassadar would be so kind to try it and report back. In my 15.10, the download does solve the problem.

Contributor

ccoupe commented Mar 7, 2016

That works on Ubuntu 15.10. I've uploaded a new beta (same address as above) if @Dassadar would be so kind to try it and report back. In my 15.10, the download does solve the problem.

ccoupe added a commit that referenced this issue Mar 7, 2016

ccoupe added a commit that referenced this issue Mar 7, 2016

@Dassadar

This comment has been minimized.

Show comment
Hide comment
@Dassadar

Dassadar Mar 7, 2016

This fixes: thanks for the investigation!

Dassadar commented Mar 7, 2016

This fixes: thanks for the investigation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment