Closed chookapp closed 3 years ago
Thank you for your report. I'd like to have some confirmation of the bug, but I'll try to change some async calls (that's one culprit of "too many open files").
Hello again. Can you edit the extension? It's at ~/.local/share/gnome-shell/extensions/printers@linux-man.org I'd like you to modify the code and see if anything changes in the long run...
At extension.js, would you change function spawn_async around line 25 to
function spawn_async(args, callback) {
let [success, pid, in_fd, out_fd, err_fd] = GLib.spawn_async_with_pipes(null, args, null, GLib.SpawnFlags.SEARCH_PATH, null);
let strOUT = '';
if(success) {
let out_reader = new Gio.DataInputStream({base_stream: new Gio.UnixInputStream({fd: out_fd})});
let [out, size] = out_reader.read_line(null);
while (out !== null) {
strOUT += ByteArray.toString(out) + '\n';
[out, size] = out_reader.read_line(null);
}
out_reader.close(new Gio.Cancellable()); // NEW LINE
}
callback(strOUT);
}
Maybe closing that input stream will do some good. :worried:
I'll give it a try...
Hey,
OK, so after printing some staff yesterday, the issue seemed to happen again:
gnome-shell[5921]: clutter_container_add_actor: assertion 'CLUTTER_IS_CONTAINER (container)' failed org.gnome.Shell.desktop[5921]: == Stack trace for context 0x55a8c6dbf320 == org.gnome.Shell.desktop[5921]: #0 0x7fff0f6d3fc0 b resource:///org/gnome/shell/ui/popupMenu.js:726 (0x7f75b6d27340 @ 22) org.gnome.Shell.desktop[5921]: #1 0x7fff0f6d4030 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f75b6eb5de0 @ 71) org.gnome.Shell.desktop[5921]: #2 0x7fff0f6d4030 I resource:///org/gnome/shell/ui/popupMenu.js:744 (0x7f75b6d275e8 @ 23) org.gnome.Shell.desktop[5921]: #3 0x7fff0f6d4090 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f75b6eb5de0 @ 71) org.gnome.Shell.desktop[5921]: #4 0x7fff0f6d4130 b /home/theuser/.local/share/gnome-shell/extensions/printers@linux-man.org/extensio n.js:105 (0x7f7596e8cab0 @ 232) org.gnome.Shell.desktop[5921]: #5 0x7fff0f6d4190 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f75b6eb5de0 @ 71) org.gnome.Shell.desktop[5921]: #6 0x7fff0f6d4230 b /home/theuser/.local/share/gnome-shell/extensions/printers@linux-man.org/extensio n.js:202 (0x7f7596e8ce68 @ 28) org.gnome.Shell.desktop[5921]: #7 0x7fff0f6d4290 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f75b6eb5de0 @ 71) org.gnome.Shell.desktop[5921]: #8 0x7fff0f6d4340 b self-hosted:914 (0x7f75b6ef12b8 @ 346) gnome-shell[5921]: JS ERROR: GLib.Error g-unix-error-quark: Too many open files gnome-shell[5921]: Object St.BoxLayout (0x55a8cffc1050), has been already deallocated - impossible to access it. This might be cau sed by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs gnome-shell[5921]: clutter_container_get_children: assertion 'CLUTTER_IS_CONTAINER (container)' failed gnome-shell[5921]: Object St.BoxLayout (0x55a8cffc1050), has been already deallocated - impossible to access it. This might be cau sed by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs org.gnome.Shell.desktop[5921]: == Stack trace for context 0x55a8c6dbf320 == org.gnome.Shell.desktop[5921]: #0 0x7fff0f6d3ef0 I resource:///org/gnome/shell/ui/environment.js:41 (0x7f75b6e86d58 @ 20) org.gnome.Shell.desktop[5921]: #1 0x7fff0f6d3fe0 b resource:///org/gnome/shell/ui/popupMenu.js:651 (0x7f75b6d24de0 @ 61) org.gnome.Shell.desktop[5921]: #2 0x7fff0f6d4080 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f75b6eb5de0 @ 71) org.gnome.Shell.desktop[5921]: #3 0x7fff0f6d4130 b /home/theuser/.local/share/gnome-shell/extensions/printers@linux-man.org/extensio n.js:108 (0x7f7596e8cab0 @ 345) org.gnome.Shell.desktop[5921]: #4 0x7fff0f6d4190 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f75b6eb5de0 @ 71) org.gnome.Shell.desktop[5921]: #5 0x7fff0f6d4230 b /home/theuser/.local/share/gnome-shell/extensions/printers@linux-man.org/extensio n.js:202 (0x7f7596e8ce68 @ 28) org.gnome.Shell.desktop[5921]: #6 0x7fff0f6d4290 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f75b6eb5de0 @ 71) org.gnome.Shell.desktop[5921]: #7 0x7fff0f6d4340 b self-hosted:914 (0x7f75b6ef12b8 @ 346) gnome-shell[5921]: clutter_container_add_actor: assertion 'CLUTTER_IS_CONTAINER (container)' failed
On your second output I can find the same code lines (namely printers@linux-man.org/extension.js:108 and printers@linux-man.org/extension.js:202). Did you really added that extra line to "spawn_async" function? If the error occurs at that lines, they should be +1. Otherwise, it's a random crash.
Lack of activity...
The extension works fine, but then, after a while (I don't know exactly what I did, if at all) it just disappears from the bar.
I looked for an error in "journalctl /usr/bin/gnome-shell":
gnome-shell[3521]: JS ERROR: GLib.Error g-unix-error-quark: Too many open files gnome-shell[3521]: Object St.BoxLayout (0x559e8d936450), has been already deallocated - impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs gnome-shell[3521]: clutter_container_get_children: assertion 'CLUTTER_IS_CONTAINER (container)' failed gnome-shell[3521]: Object St.BoxLayout (0x559e8d936450), has been already deallocated - impossible to access it. This might be caused by the object having been destroyed from C code using something such as destroy(), dispose(), or remove() vfuncs org.gnome.Shell.desktop[3521]: == Stack trace for context 0x559e8abea320 == org.gnome.Shell.desktop[3521]: #0 0x7ffdecb02200 b resource:///org/gnome/shell/ui/environment.js:41 (0x7f33c8086d58 @ 20) org.gnome.Shell.desktop[3521]: #1 0x7ffdecb022f0 b resource:///org/gnome/shell/ui/popupMenu.js:651 (0x7f33acd24de0 @ 61) org.gnome.Shell.desktop[3521]: #2 0x7ffdecb02390 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f33c80b5de0 @ 71) org.gnome.Shell.desktop[3521]: #3 0x7ffdecb02440 b /home/theuser/.local/share/gnome-shell/extensions/printers@linux-man.org/extension.js:108 (0x7f338ce9f5e8 @ 345) org.gnome.Shell.desktop[3521]: #4 0x7ffdecb024a0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f33c80b5de0 @ 71) org.gnome.Shell.desktop[3521]: #5 0x7ffdecb02540 b /home/theuser/.local/share/gnome-shell/extensions/printers@linux-man.org/extension.js:202 (0x7f338ce9f9a0 @ 28) org.gnome.Shell.desktop[3521]: #6 0x7ffdecb025a0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f33c80b5de0 @ 71) org.gnome.Shell.desktop[3521]: #7 0x7ffdecb02650 b self-hosted:914 (0x7f33c80f12b8 @ 346) gnome-shell[3521]: clutter_container_add_actor: assertion 'CLUTTER_IS_CONTAINER (container)' failed
I'm using Ubuntu 18.04 GNOME 3.28.2 and version 8 of "printers".