GLib/GTK+ event loop fiasco

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

GLib/GTK+ event loop fiasco

Holger Freyther
hi,

the way we dispatch GTK/GLib events is very fragile. I am currently
looking into the sporadic on start-up crashes (I replaced the abort
in the sigsegv handler with a pause()).


* VisualGST is calling gtk_wiget_show_all()
* This triggers a change in a GtkNoteBook
* The change is dispatched in Smalltak
* We re-enter the event-loop
 #16 0xa6625d80 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
 #17 0xa66291d7 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
 #18 0xa6c374c5 in main_loop_dispatch () at gst-glib.c:151
 #19 0xb768dd1c in _gst_dispatch_events () at events.c:285
 #20 0xb768b3fd in VMpr_Processor_dispatchEvents (id=0, numArgs=0) at prims.def:2961
 #21 0xb767e0f3 in execute_primitive_operation (numArgs=0, primitive=134) at interp.c:2738
 #22 _gst_send_message_internal (sendSelector=0x404924e0, sendArgs=0, receiver=0x40441820,
    method_class=0x40442458) at interp-bc.inl:276
 #23 0xb768503e in _gst_interpret (processOOP=0x40618a60) at vm.def:645
 #24 0xb768b691 in _gst_nvmsg_send (receiver=0x40638448, sendSelector=0x4061dec8,
    args=0xbfcbb870, sendArgs=3) at interp.c:2318
 #25 0xb7628e05 in gst_nvmsg_send (receiver=0x40638448, selector=0x4061dec8, args=0xbfcbb870,
    nargs=3) at gstpub.c:199
 #26 0xa6c310c2 in invoke_smalltalk_closure (closure=0x87a2750, return_value=0x0,
    n_param_values=3, param_values=0xbfcbb9f0, invocation_hint=0xbfcbb99c, marshal_data=0x0)
    at gst-gobject.c:440

* A timer expired and deals with a non fully initialized window and
  we get the crash.




I've looked at this code for a bit and I wonder why we don't inhibit the
process switching here? Or at least add a way to crash hard if a process
change is scheduled so I can see which mutex is hit.


(gdb) bt
#0  0xb76f0424 in __kernel_vsyscall ()
#1  0xb74ab141 in pause () at ../sysdeps/unix/syscall-template.S:81
#2  0xb76439c5 in oldspace_sigsegv_handler (fault_address=0x50, serious=0) at oop.c:961
#3  0xb73f2b10 in ?? () from /usr/lib/i386-linux-gnu/libsigsegv.so.2
#4  <signal handler called>
#5  IA__gdk_window_set_geometry_hints (window=0x0, geometry=0xbfcbaea4,
    geom_mask=(GDK_HINT_MIN_SIZE | GDK_HINT_WIN_GRAVITY))
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gdk/x11/gdkwindow-x11.c:2361
#6  0xa59587d2 in gtk_window_move_resize (window=<optimized out>)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkwindow.c:6219
#7  gtk_window_check_resize (container=0x8709830)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkwindow.c:5408
#8  0xa66fd709 in g_cclosure_marshal_VOID__VOIDv ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#9  0xa66fa457 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#10 0xa66fbcce in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#11 0xa671512c in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#12 0xa6715c83 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#13 0xa57b0781 in IA__gtk_container_check_resize (container=0x8709830)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkcontainer.c:1432
#14 0xa57b09f1 in gtk_container_idle_sizer (data=0x0)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkcontainer.c:1357
#15 0xa5667050 in gdk_threads_dispatch (data=0x87cc870)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gdk/gdk.c:512
#16 0xa6625d80 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#17 0xa66291d7 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#18 0xa6c374c5 in main_loop_dispatch () at gst-glib.c:151
#19 0xb768dd1c in _gst_dispatch_events () at events.c:285
#20 0xb768b3fd in VMpr_Processor_dispatchEvents (id=0, numArgs=0) at prims.def:2961
#21 0xb767e0f3 in execute_primitive_operation (numArgs=0, primitive=134) at interp.c:2738
#22 _gst_send_message_internal (sendSelector=0x404924e0, sendArgs=0, receiver=0x40441820,
    method_class=0x40442458) at interp-bc.inl:276
#23 0xb768503e in _gst_interpret (processOOP=0x40618a60) at vm.def:645
#24 0xb768b691 in _gst_nvmsg_send (receiver=0x40638448, sendSelector=0x4061dec8,
    args=0xbfcbb870, sendArgs=3) at interp.c:2318
#25 0xb7628e05 in gst_nvmsg_send (receiver=0x40638448, selector=0x4061dec8, args=0xbfcbb870,
    nargs=3) at gstpub.c:199
#26 0xa6c310c2 in invoke_smalltalk_closure (closure=0x87a2750, return_value=0x0,
    n_param_values=3, param_values=0xbfcbb9f0, invocation_hint=0xbfcbb99c, marshal_data=0x0)
    at gst-gobject.c:440
#27 0xa66fba7e in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#28 0xa670e089 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#29 0xa6715a9c in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#30 0xa6715c83 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#31 0xa58492d6 in gtk_notebook_switch_page (notebook=0x8709830, notebook@entry=0x87234f0,
    page=0x42) at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtknotebook.c:6200
---Type <return> to continue, or q <return> to quit---frame
#32 0xa584db8a in gtk_notebook_size_request (widget=0x87234f0, requisition=0x872350c)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtknotebook.c:2174
#33 0xa66fe5a9 in g_cclosure_marshal_VOID__BOXEDv ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#34 0xa66fa457 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#35 0xa66fbc3a in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#36 0xa671512c in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#37 0xa6716141 in g_signal_emit_by_name () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#38 0xa589c372 in do_size_request (widget=widget@entry=0x87234f0)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtksizegroup.c:628
#39 0xa589ce07 in do_size_request (widget=0x87234f0)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtksizegroup.c:831
#40 _gtk_size_group_compute_requisition (widget=0x87234f0, requisition=0xbfcbbec8)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtksizegroup.c:828
#41 0xa59478ed in IA__gtk_widget_size_request (widget=0x87234f0, requisition=0xbfcbbec8)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkwidget.c:3932
#42 0xa5859188 in gtk_paned_size_request (widget=0x8692e90, requisition=0x8692eac)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkpaned.c:776
#43 0xa66fe5a9 in g_cclosure_marshal_VOID__BOXEDv ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#44 0xa66fa457 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#45 0xa66fbc3a in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#46 0xa671512c in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#47 0xa6716141 in g_signal_emit_by_name () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#48 0xa589c372 in do_size_request (widget=widget@entry=0x8692e90)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtksizegroup.c:628
#49 0xa589ce07 in do_size_request (widget=0x8692e90)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtksizegroup.c:831
#50 _gtk_size_group_compute_requisition (widget=0x8692e90, requisition=0xbfcbc1c8)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtksizegroup.c:828
#51 0xa59478ed in IA__gtk_widget_size_request (widget=0x8692e90, requisition=0xbfcbc1c8)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkwidget.c:3932
#52 0xa577d66a in gtk_box_size_request (widget=0x87bf868, requisition=0x87bf884)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkbox.c:280
#53 0xa66fe5a9 in g_cclosure_marshal_VOID__BOXEDv ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#54 0xa66fa457 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#55 0xa66fbc3a in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#56 0xa671512c in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#57 0xa6716141 in g_signal_emit_by_name () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#58 0xa589c372 in do_size_request (widget=widget@entry=0x87bf868)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtksizegroup.c:628
#59 0xa589ce07 in do_size_request (widget=0x87bf868)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtksizegroup.c:831
#60 _gtk_size_group_compute_requisition (widget=0x87bf868, requisition=0xbfcbc4c8)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtksizegroup.c:828
---Type <return> to continue, or q <return> to quit---
#61 0xa59478ed in IA__gtk_widget_size_request (widget=0x87bf868, requisition=0xbfcbc4c8)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkwidget.c:3932
#62 0xa5957510 in gtk_window_size_request (widget=0x8709830, requisition=0x870984c)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkwindow.c:4968
#63 0xa66fe5a9 in g_cclosure_marshal_VOID__BOXEDv ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#64 0xa66fa457 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#65 0xa66fbcce in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#66 0xa671512c in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#67 0xa6716141 in g_signal_emit_by_name () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#68 0xa589c372 in do_size_request (widget=widget@entry=0x8709830)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtksizegroup.c:628
#69 0xa589ce07 in do_size_request (widget=0x8709830)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtksizegroup.c:831
#70 _gtk_size_group_compute_requisition (widget=0x8709830, requisition=0x0)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtksizegroup.c:828
#71 0xa59478ed in IA__gtk_widget_size_request (widget=0x8709830, requisition=0x0)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkwidget.c:3932
#72 0xa5957dcf in gtk_window_compute_configure_request (window=0x8709830, request=0x42,
    geometry=0xbfcbc89c, flags=0xbfcbc878)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkwindow.c:5842
#73 0xa595a5cd in gtk_window_show (widget=0x8709830)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkwindow.c:4509
#74 0xa66fd6b3 in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#75 0xa66fa5a4 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#76 0xa66fba7e in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#77 0xa670d72c in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#78 0xa6715a9c in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#79 0xa6715c83 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0
#80 0xa594f709 in IA__gtk_widget_show (widget=0x8709830)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkwidget.c:3236
#81 0xa5954a5f in IA__gtk_widget_show_all (widget=0x8709830)
    at /build/gtk+2.0-DLbCCk/gtk+2.0-2.24.24/gtk/gtkwidget.c:3384
#82 0xb73ee94a in ffi_call_SYSV () from /usr/lib/i386-linux-gnu/libffi.so.6
#83 0xb73ee3d9 in ffi_call () from /usr/lib/i386-linux-gnu/libffi.so.6
#84 0xb765a721 in _gst_invoke_croutine (cFuncOOP=0x4059cac8, receiver=0x4062d928,
    args=0x82f7524) at cint.c:950
#85 0xb767f948 in VMpr_CFuncDescriptor_call (id=0, numArgs=1) at prims.def:6054
#86 0xb767e0f3 in execute_primitive_operation (numArgs=1, primitive=230) at interp.c:2738
#87 _gst_send_message_internal (sendSelector=0x40441f28, sendArgs=1, receiver=0x4059cac8,
    method_class=0x404424d0) at interp-bc.inl:276
#88 0xb7684946 in _gst_interpret (processOOP=0x404f6f78) at vm.def:665
#89 0xb768b691 in _gst_nvmsg_send (receiver=0x40441800, sendSelector=0x404f6f10, args=0x0,
    sendArgs=0) at interp.c:2318
#90 0xb763b7d5 in _gst_execute_statements (receiverOOP=0x40441800, method=0x404f6f10,
---Type <return> to continue, or q <return> to quit---
    undeclared=true, quiet=true) at comp.c:586
#91 0xb762cfd0 in execute_doit (p=0xbfcbd704, temps=0x0, stmts=0x85c78b8,
    receiverOOP=0x40441800, undeclared=true, quiet=false) at gst-parse.c:592
#92 0xb762f258 in parse_doit (p=0xbfcbd704, fail_at_eof=false) at gst-parse.c:634
#93 0xb762fc1c in parse_chunks (p=p@entry=0xbfcbd704) at gst-parse.c:475
#94 0xb763003f in _gst_parse_chunks (currentNamespace=0x0) at gst-parse.c:449
#95 0xb7631c22 in _gst_parse_stream (currentNamespace=0x0) at lex.c:1209
#96 0xb765c9de in _gst_process_file (fileName=0x8049b0c "scripts/Test.st",
    dir=GST_DIR_KERNEL_SYSTEM) at input.c:855
#97 0xb7628da5 in gst_process_file (fileName=0x8049b0c "scripts/Test.st",
    dir=GST_DIR_KERNEL_SYSTEM) at gstpub.c:167


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: GLib/GTK+ event loop fiasco

Holger Freyther
On Sun, Jul 20, 2014 at 09:39:18AM +0200, Holger Hans Peter Freyther wrote:
> hi,

> I've looked at this code for a bit and I wonder why we don't inhibit the
> process switching here? Or at least add a way to crash hard if a process
> change is scheduled so I can see which mutex is hit.

I have hit the wesp nest here. So GtkImage of VisualGST is adding various
"Processor activeProcess yield" into for loops as otherwise we get issues
with the garbage collector:

...scripts/Test.st:181: Too many garbage collections, finalizers missed!
...scripts/Test.st:181: This is a bug, please repor

Couldn't we copy the content of gcArray to a new array? Or run the
finalizer at another point?

holger

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/3] gtk: Prepare for GTK+ 3.0 by not using members directly

Holger Freyther
GTK+ 3.0 enabled G_SEAL which means direct member access is
not possible anymore. This means we should use the getters
and setters provided by GTK. The good thing is that we can
remove some of our custom getters/setters. In the case of
GtkAllocation the API works differently to what we had so
we need to add a compat call.
GtkPlacer is only used with Blox and I didn't attempt to
run the GTK+ version of it.

2014-05-26  Holger Hans Peter Freyther  <[hidden email]>

        * MoreFuncs.st: Remove GtkWidget>>#setFlags:,
        GtkWidget>>#unsetFlags:, GtkWidget>>#getFlags,
        GtkScrolledWindow>>#getHscrollbarVisible and
        GtkScrolledWindow>>#getVscrollbarVisible. Change the
        return type to double in GtkAdjustment>>#getUpper,
        GtkAdjustment>>#getLower and GtkAdjustment>>#getPageSize.
        Change GtkWidget>>#getAllocation to use >>#getAllocation:
        on GCed memory.
        * example_entry.st: Use the new setters in Gtk.
        * gst-gtk.c: Remove gstGtkGetFlags, gstGtkSetFlags,
        gstGtkUnsetFlags. gstGtkWidgetGetAllocation.
        Map gstGtkGetState, gstGtkGetWindow, gstGtkAdjustmentGetLower,
        gstGtkAdjustmentGetUpper, gstGtkAdjustmentGetPageSize,
        gstGtkDialogGetVBox and gstGtkDialogGetActionArea
        directly to GTK+.
        * placer.c: Modernize the GTK+ api usage
---
 packages/gtk/ChangeLog        |  19 ++++++++
 packages/gtk/MoreFuncs.st     |  59 +++++++-----------------
 packages/gtk/example_entry.st |   2 +-
 packages/gtk/gst-gtk.c        | 101 +++---------------------------------------
 packages/gtk/placer.c         |  41 ++++++++---------
 5 files changed, 62 insertions(+), 160 deletions(-)

diff --git a/packages/gtk/ChangeLog b/packages/gtk/ChangeLog
index 25d19f8..4f11904 100644
--- a/packages/gtk/ChangeLog
+++ b/packages/gtk/ChangeLog
@@ -1,3 +1,22 @@
+2014-05-26  Holger Hans Peter Freyther  <[hidden email]>
+
+ * MoreFuncs.st: Remove GtkWidget>>#setFlags:,
+ GtkWidget>>#unsetFlags:, GtkWidget>>#getFlags,
+ GtkScrolledWindow>>#getHscrollbarVisible and
+ GtkScrolledWindow>>#getVscrollbarVisible. Change the
+ return type to double in GtkAdjustment>>#getUpper,
+ GtkAdjustment>>#getLower and GtkAdjustment>>#getPageSize.
+ Change GtkWidget>>#getAllocation to use >>#getAllocation:
+ on GCed memory.
+ * example_entry.st: Use the new setters in Gtk.
+ * gst-gtk.c: Remove gstGtkGetFlags, gstGtkSetFlags,
+ gstGtkUnsetFlags. gstGtkWidgetGetAllocation.
+ Map gstGtkGetState, gstGtkGetWindow, gstGtkAdjustmentGetLower,
+ gstGtkAdjustmentGetUpper, gstGtkAdjustmentGetPageSize,
+ gstGtkDialogGetVBox and gstGtkDialogGetActionArea
+ directly to GTK+.
+ * placer.c: Modernize the GTK+ api usage
+
 2013-08-24  Holger Hans Peter Freyther  <[hidden email]>
 
  * mk_enums.awk: Use #ifdef/#endif around key definition.
diff --git a/packages/gtk/MoreFuncs.st b/packages/gtk/MoreFuncs.st
index feee6ee..58926fd 100644
--- a/packages/gtk/MoreFuncs.st
+++ b/packages/gtk/MoreFuncs.st
@@ -87,10 +87,20 @@ GTK.GdkDrawable extend [
 GtkWidget extend [
 
     getAllocation [
+        | ba allocation |
  <category: 'C call-outs'>
- <cCall: 'gstGtkWidgetGetAllocation' returning: #{GtkAllocation}
- args: #(#self )>
-
+
+        ba := (CShortType arrayType: 4) new
+            at: 0 put: 0;
+            at: 1 put: 0;
+            at: 2 put: 0;
+            at: 3 put: 0;
+            yourself.
+        allocation := (ba castTo: GtkAllocation type)
+    addToBeFinalized;
+    yourself.
+        self getAllocation: allocation.
+        ^allocation
     ]
 
     getWindow [
@@ -104,25 +114,6 @@ GtkWidget extend [
  <cCall: 'gstGtkGetState' returning: #int args: #(#self )>
 
     ]
-
-    getFlags [
- <category: 'C call-outs'>
- <cCall: 'gstGtkGetFlags' returning: #int args: #(#self )>
-
-    ]
-
-    setFlags: flags [
- <category: 'C call-outs'>
- <cCall: 'gstGtkSetFlags' returning: #void args: #(#self #int )>
-
-    ]
-
-    unsetFlags: flags [
- <category: 'C call-outs'>
- <cCall: 'gstGtkUnsetFlags' returning: #void args: #(#self #int )>
-
-    ]
-
 ]
 
 
@@ -205,41 +196,23 @@ GtkDialog extend [
 
 
 
-GtkScrolledWindow extend [
-
-    getHscrollbarVisible [
- <category: 'C call-outs'>
- <cCall: 'gstGtkGetHscrollbarVisible' returning: #boolean args: #(#self )>
-
-    ]
-
-    getVscrollbarVisible [
- <category: 'C call-outs'>
- <cCall: 'gstGtkGetVscrollbarVisible' returning: #boolean args: #(#self )>
-
-    ]
-
-]
-
-
-
 GtkAdjustment extend [
 
     getLower [
  <category: 'C call-outs'>
- <cCall: 'gstGtkAdjustmentGetLower' returning: #int args: #(#self )>
+ <cCall: 'gstGtkAdjustmentGetLower' returning: #double args: #(#self )>
 
     ]
 
     getUpper [
  <category: 'C call-outs'>
- <cCall: 'gstGtkAdjustmentGetUpper' returning: #int args: #(#self )>
+ <cCall: 'gstGtkAdjustmentGetUpper' returning: #double args: #(#self )>
 
     ]
 
     getPageSize [
  <category: 'C call-outs'>
- <cCall: 'gstGtkAdjustmentGetPageSize' returning: #int args: #(#self )>
+ <cCall: 'gstGtkAdjustmentGetPageSize' returning: #double args: #(#self )>
 
     ]
 
diff --git a/packages/gtk/example_entry.st b/packages/gtk/example_entry.st
index dd6eece..d25741e 100644
--- a/packages/gtk/example_entry.st
+++ b/packages/gtk/example_entry.st
@@ -145,7 +145,7 @@ Object subclass: EntryExample [
     expand: true
     fill: true
     padding: 0.
- button setFlags: Gtk gtkCanDefault.
+ button setCanDefault: true.
  button grabDefault.
  button show.
  window show
diff --git a/packages/gtk/gst-gtk.c b/packages/gtk/gst-gtk.c
index 912be1d..0e456e5 100644
--- a/packages/gtk/gst-gtk.c
+++ b/packages/gtk/gst-gtk.c
@@ -205,87 +205,6 @@ tree_store_set_oop (GtkTreeStore *store,
 }
 
 
-/* Wrappers for macros and missing accessor functions.  */
-
-static GdkWindow *
-widget_get_window (GtkWidget *widget)
-{
-  return widget->window;
-}
-
-static int
-widget_get_state (GtkWidget *widget)
-{
-  return GTK_WIDGET_STATE (widget);
-}
-
-static int
-widget_get_flags (GtkWidget *widget)
-{
-  return GTK_WIDGET_FLAGS (widget);
-}
-
-static void
-widget_set_flags (GtkWidget *widget, int flags)
-{
-  GTK_WIDGET_SET_FLAGS (widget, flags);
-}
-
-static void
-widget_unset_flags (GtkWidget *widget, int flags)
-{
-  GTK_WIDGET_UNSET_FLAGS (widget, flags);
-}
-
-
-static GtkAllocation *
-widget_get_allocation (GtkWidget *wgt)
-{
-  return &(GTK_WIDGET(wgt)->allocation);
-}
-
-static GtkWidget *
-dialog_get_vbox (GtkDialog *dlg)
-{
-  return (GTK_DIALOG(dlg)->vbox);
-}
-
-static GtkWidget *
-dialog_get_action_area (GtkDialog *dlg)
-{
-  return (GTK_DIALOG(dlg)->action_area);
-}
-
-static int
-scrolled_window_get_hscrollbar_visible (GtkScrolledWindow *swnd)
-{
-  return (GTK_SCROLLED_WINDOW(swnd)->hscrollbar_visible);
-}
-
-static int
-scrolled_window_get_vscrollbar_visible (GtkScrolledWindow *swnd)
-{
-  return (GTK_SCROLLED_WINDOW(swnd)->vscrollbar_visible);
-}
-
-static int
-adjustment_get_lower (GtkAdjustment *adj)
-{
-  return (GTK_ADJUSTMENT(adj)->lower);
-}
-
-static int
-adjustment_get_upper (GtkAdjustment *adj)
-{
-  return (GTK_ADJUSTMENT(adj)->upper);
-}
-
-static int
-adjustment_get_page_size (GtkAdjustment *adj)
-{
-  return (GTK_ADJUSTMENT(adj)->page_size);
-}
-
 /* Initialization.  */
 
 static int initialized = 0;
@@ -311,22 +230,16 @@ gst_initModule (proxy)
   _gtk_vm_proxy->defineCFunc ("gstGtkConnectAccelGroupNoUserData", connect_accel_group_no_user_data);
   _gtk_vm_proxy->defineCFunc ("gstGtkGetChildProperty", container_get_child_property);
   _gtk_vm_proxy->defineCFunc ("gstGtkSetChildProperty", container_set_child_property);
-  _gtk_vm_proxy->defineCFunc ("gstGtkGetState", widget_get_state);
-  _gtk_vm_proxy->defineCFunc ("gstGtkGetFlags", widget_get_flags);
-  _gtk_vm_proxy->defineCFunc ("gstGtkSetFlags", widget_set_flags);
-  _gtk_vm_proxy->defineCFunc ("gstGtkUnsetFlags", widget_unset_flags);
-  _gtk_vm_proxy->defineCFunc ("gstGtkGetWindow", widget_get_window);
-  _gtk_vm_proxy->defineCFunc ("gstGtkGetHscrollbarVisible", scrolled_window_get_hscrollbar_visible);
-  _gtk_vm_proxy->defineCFunc ("gstGtkGetVscrollbarVisible", scrolled_window_get_vscrollbar_visible);
-  _gtk_vm_proxy->defineCFunc ("gstGtkAdjustmentGetLower", adjustment_get_lower);
-  _gtk_vm_proxy->defineCFunc ("gstGtkAdjustmentGetUpper", adjustment_get_upper);
-  _gtk_vm_proxy->defineCFunc ("gstGtkAdjustmentGetPageSize", adjustment_get_page_size);
+  _gtk_vm_proxy->defineCFunc ("gstGtkGetState", gtk_widget_get_state);
+  _gtk_vm_proxy->defineCFunc ("gstGtkGetWindow", gtk_widget_get_window);
+  _gtk_vm_proxy->defineCFunc ("gstGtkAdjustmentGetLower", gtk_adjustment_get_lower);
+  _gtk_vm_proxy->defineCFunc ("gstGtkAdjustmentGetUpper", gtk_adjustment_get_upper);
+  _gtk_vm_proxy->defineCFunc ("gstGtkAdjustmentGetPageSize", gtk_adjustment_get_page_size);
   _gtk_vm_proxy->defineCFunc ("gstGtkTreeModelGetOOP", tree_model_get_oop);
   _gtk_vm_proxy->defineCFunc ("gstGtkListStoreSetOOP", list_store_set_oop);
   _gtk_vm_proxy->defineCFunc ("gstGtkTreeStoreSetOOP", tree_store_set_oop);
-  _gtk_vm_proxy->defineCFunc ("gstGtkWidgetGetAllocation", widget_get_allocation);
-  _gtk_vm_proxy->defineCFunc ("gstGtkDialogGetVBox", dialog_get_vbox);
-  _gtk_vm_proxy->defineCFunc ("gstGtkDialogGetActionArea", dialog_get_action_area);
+  _gtk_vm_proxy->defineCFunc ("gstGtkDialogGetVBox", gtk_dialog_get_content_area);
+  _gtk_vm_proxy->defineCFunc ("gstGtkDialogGetActionArea", gtk_dialog_get_action_area);
 
   _gtk_vm_proxy->defineCFunc ("gtk_placer_get_type", gtk_placer_get_type);
   _gtk_vm_proxy->defineCFunc ("gtk_placer_new", gtk_placer_new);
diff --git a/packages/gtk/placer.c b/packages/gtk/placer.c
index 074428a..41a28f3 100644
--- a/packages/gtk/placer.c
+++ b/packages/gtk/placer.c
@@ -236,7 +236,7 @@ gtk_placer_child_type (GtkContainer     *container)
 static void
 gtk_placer_init (GtkPlacer *placer)
 {
-  GTK_WIDGET_SET_FLAGS (placer, GTK_NO_WINDOW);
+  gtk_widget_set_has_window (GTK_WIDGET (placer), FALSE);
 
   placer->children = NULL;
 }
@@ -329,7 +329,7 @@ gtk_placer_move_internal (GtkPlacer      *placer,
   
   g_return_if_fail (GTK_IS_PLACER (placer));
   g_return_if_fail (GTK_IS_WIDGET (widget));
-  g_return_if_fail (widget->parent == GTK_WIDGET (placer));  
+  g_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (placer));
   g_return_if_fail (!change_rel_x || (rel_x & ~32767) == 0);
   g_return_if_fail (!change_rel_y || (rel_y & ~32767) == 0);
   g_return_if_fail (!change_rel_width || (rel_width & ~32767) == 0);
@@ -537,13 +537,15 @@ gtk_placer_realize (GtkWidget *widget)
     GTK_WIDGET_CLASS (parent_class)->realize (widget);
   else
     {
-      GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
+      GtkAllocation allocation;
+      gtk_widget_set_realized (widget, TRUE);
 
       attributes.window_type = GDK_WINDOW_CHILD;
-      attributes.x = widget->allocation.x;
-      attributes.y = widget->allocation.y;
-      attributes.width = widget->allocation.width;
-      attributes.height = widget->allocation.height;
+      gtk_widget_get_allocation (widget, &allocation);
+      attributes.x = allocation.x;
+      attributes.y = allocation.y;
+      attributes.width = allocation.width;
+      attributes.height = allocation.height;
       attributes.wclass = GDK_INPUT_OUTPUT;
       attributes.visual = gtk_widget_get_visual (widget);
       attributes.colormap = gtk_widget_get_colormap (widget);
@@ -552,12 +554,12 @@ gtk_placer_realize (GtkWidget *widget)
       
       attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
       
-      widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes,
-       attributes_mask);
-      gdk_window_set_user_data (widget->window, widget);
+      gtk_widget_set_window (widget, gdk_window_new (gtk_widget_get_parent_window (widget), &attributes,
+       attributes_mask));
+      gdk_window_set_user_data (gtk_widget_get_window (widget), widget);
       
-      widget->style = gtk_style_attach (widget->style, widget->window);
-      gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
+      gtk_widget_style_attach (widget);
+      gtk_style_set_background (gtk_widget_get_style (widget), gtk_widget_get_window (widget), GTK_STATE_NORMAL);
     }
 }
 
@@ -573,7 +575,7 @@ gtk_placer_size_request (GtkWidget      *widget,
   gint height, width;
 
   placer = GTK_PLACER (widget);
-  border_width = GTK_CONTAINER (placer)->border_width;
+  border_width = gtk_container_get_border_width (GTK_CONTAINER (placer));
   requisition->width = 0;
   requisition->height = 0;
 
@@ -638,19 +640,19 @@ gtk_placer_size_allocate (GtkWidget     *widget,
 
   placer = GTK_PLACER (widget);
 
-  widget->allocation = *allocation;
+  gtk_widget_set_allocation (widget, allocation);
 
   if (!GTK_WIDGET_NO_WINDOW (widget))
     {
       if (GTK_WIDGET_REALIZED (widget))
- gdk_window_move_resize (widget->window,
+ gdk_window_move_resize (gtk_widget_get_window (widget),
  allocation->x,
  allocation->y,
  allocation->width,
  allocation->height);
     }
       
-  border_width = GTK_CONTAINER (placer)->border_width;
+  border_width = gtk_container_get_border_width (GTK_CONTAINER (placer));
   rel_width_scale = (allocation->width - 2 * border_width) / 32767.0;
   rel_height_scale = (allocation->height - 2 * border_width) / 32767.0;
   
@@ -779,12 +781,7 @@ gtk_placer_set_has_window (GtkPlacer *placer,
   g_return_if_fail (!GTK_WIDGET_REALIZED (placer));
 
   if (!has_window != GTK_WIDGET_NO_WINDOW (placer))
-    {
-      if (has_window)
- GTK_WIDGET_UNSET_FLAGS (placer, GTK_NO_WINDOW);
-      else
- GTK_WIDGET_SET_FLAGS (placer, GTK_NO_WINDOW);
-    }
+    gtk_widget_set_has_window (GTK_WIDGET (placer), has_window);
 }
 
 /**
--
2.0.1


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/3] Revert "visualgst: Flush task queue when pressing "CTRL + .""

Holger Freyther
This reverts commit 44cd50ba385bf87fabd56927edce143eee2fc6dc. The
snooper code doesn't appear to work correctly and seems to deadlock
when a message is being added to the transcript.

(ip 6)<unwind> BlockClosure>>#ensure:
(ip 6)[] in RecursionLock>>#critical:
(ip 30)[] in Semaphore>>#critical:
(ip 6)<unwind> BlockClosure>>#ensure:
(ip 8)Semaphore>>#critical:
(ip 14)RecursionLock>>#critical:
(ip 6)TextCollector>>#next:putAll:startingAt:
(ip 14)String(SequenceableCollection)>>#nextPutAllOn:
(ip 8)TextCollector(Stream)>>#nextPutAll:
(ip 12)SmallInteger(Integer)>>#displayOn:
(ip 8)TextCollector(Stream)>>#display:
(ip 100)MethodContext>>#printOn:line:
(ip 8)MethodContext>>#printOn:
(ip 30)MethodContext(ContextPart)>>#backtraceOn:
(ip 8)MethodContext(ContextPart)>>#backtrace
(ip 6)[] in KeySnooper>>#initialize
(ip 16)WrongClass(Exception)>>#activateHandler:
(ip 24)WrongClass(Exception)>>#signal
(ip 40)WrongClass class>>#signalOn:mustBe:
(ip 24)WrongClass class>>#signalOn:mustBe:
(ip 10)GdkEventKey(CObject)>>#address:
(ip 8)GdkEventKey class(CObject class)>>#address:
(ip 8)[] in KeySnooper>>#initialize
(ip 12)<unwind> BlockClosure>>#on:do:
(ip 10)[] in KeySnooper>>#initialize
(ip 0)<bottom>

2014-07-20  Holger Hand Peter Freyther  <[hidden email]>

        * Misc/KeySnooper.st: Remove the file.
        * Misc/TaskQueue.st: Remove the >>#flush selector.
        * GtkLauncher.st: Remove invocation of KeySnooper.
---
 NEWS                                  |  4 --
 packages/visualgst/ChangeLog          |  6 +++
 packages/visualgst/GtkLauncher.st     |  1 -
 packages/visualgst/Makefile.frag      |  2 +-
 packages/visualgst/Misc/KeySnooper.st | 91 -----------------------------------
 packages/visualgst/Misc/TaskQueue.st  | 10 ----
 packages/visualgst/package.xml        |  1 -
 7 files changed, 7 insertions(+), 108 deletions(-)
 delete mode 100644 packages/visualgst/Misc/KeySnooper.st

diff --git a/NEWS b/NEWS
index b50bc7f..a97e3c9 100644
--- a/NEWS
+++ b/NEWS
@@ -19,10 +19,6 @@ o   The compiler now generates a DebugInformation providing access to the
     argument and temporary names of methods and blocks. This can be used
     by the debugger to provide additional information.
 
-o   VisualGST now understands the CTRL + . shortcut. This will flush the
-    internal TaskQueue. This might be handy when the debugger is getting
-    stuck.
-
 o   gst-sunit now understands the -d/--debug parameter. In case of an
     unhandled exception or a test failure VisualGST will be spawned.
 
diff --git a/packages/visualgst/ChangeLog b/packages/visualgst/ChangeLog
index 4451f6e..e8b5de0 100644
--- a/packages/visualgst/ChangeLog
+++ b/packages/visualgst/ChangeLog
@@ -1,3 +1,9 @@
+2014-07-20  Holger Hand Peter Freyther  <[hidden email]>
+
+ * Misc/KeySnooper.st: Remove the file.
+ * Misc/TaskQueue.st: Remove the >>#flush selector.
+ * GtkLauncher.st: Remove invocation of KeySnooper.
+
 2014-05-05  Holger Hans Peter Freyther  <[hidden email]>
 
  * Debugger/GtkDebugger.st: Introduce >>#finishDangerousContexts
diff --git a/packages/visualgst/GtkLauncher.st b/packages/visualgst/GtkLauncher.st
index 5383b34..8b7de66 100644
--- a/packages/visualgst/GtkLauncher.st
+++ b/packages/visualgst/GtkLauncher.st
@@ -299,7 +299,6 @@ GtkVisualGSTTool subclass: GtkLauncher [
  imageName := File image asString.
         systemChangeNotifier := SystemChangeNotifier new.
         SystemChangeNotifier root add: systemChangeNotifier.
-        KeySnooper uniqueInstance.
  self clearGlobalState.
  super initialize.
  window maximize.
diff --git a/packages/visualgst/Makefile.frag b/packages/visualgst/Makefile.frag
index c6954c8..3a744bc 100644
--- a/packages/visualgst/Makefile.frag
+++ b/packages/visualgst/Makefile.frag
@@ -1,5 +1,5 @@
 VisualGST_FILES = \
-packages/visualgst/AbstractFinder.st packages/visualgst/Category/AbstractNamespace.st packages/visualgst/Category/ClassCategory.st packages/visualgst/Category/Class.st packages/visualgst/ClassFinder.st packages/visualgst/Clock/GtkClock.st packages/visualgst/Commands/CategoryMenus/AddCategoryCommand.st packages/visualgst/Commands/CategoryMenus/CategoryCommand.st packages/visualgst/Commands/CategoryMenus/FileoutCategoryCommand.st packages/visualgst/Commands/CategoryMenus/RenameCategoryCommand.st packages/visualgst/Commands/ClassMenus/AddClassCommand.st packages/visualgst/Commands/ClassMenus/ClassCommand.st packages/visualgst/Commands/ClassMenus/DeleteClassCommand.st packages/visualgst/Commands/ClassMenus/FileoutClassCommand.st packages/visualgst/Commands/ClassMenus/InspectClassCommand.st packages/visualgst/Commands/ClassMenus/RenameClassCommand.st packages/visualgst/Commands/Command.st packages/visualgst/Commands/DebugMenus/ContinueDebugCommand.st packages/visualgst/Commands/DebugMenu
 s/DebugCommand.st packages/visualgst/Commands/DebugMenus/StepIntoDebugCommand.st packages/visualgst/Commands/DebugMenus/StepOverDebugCommand.st packages/visualgst/Commands/EditMenus/CancelEditCommand.st packages/visualgst/Commands/EditMenus/CopyEditCommand.st packages/visualgst/Commands/EditMenus/CutEditCommand.st packages/visualgst/Commands/EditMenus/FindEditCommand.st packages/visualgst/Commands/EditMenus/PasteEditCommand.st packages/visualgst/Commands/EditMenus/RedoEditCommand.st packages/visualgst/Commands/EditMenus/ReplaceEditCommand.st packages/visualgst/Commands/EditMenus/SelectAllEditCommand.st packages/visualgst/Commands/EditMenus/UndoEditCommand.st packages/visualgst/Commands/HistoryCommands/HistoryBackCommand.st packages/visualgst/Commands/HistoryCommands/HistoryDisplayCommand.st packages/visualgst/Commands/HistoryCommands/HistoryForwardCommand.st packages/visualgst/Commands/InspectorMenus/InspectorBackCommand.st packages/visualgst/Commands/InspectorMenus/InspectorDiveCom
 mand.st packages/visualgst/Commands/MethodMenus/DebugTestCommand.st packages/visualgst/Commands/MethodMenus/DeleteMethodCommand.st packages/visualgst/Commands/MethodMenus/FileoutMethodCommand.st packages/visualgst/Commands/MethodMenus/InspectMethodCommand.st packages/visualgst/Commands/MethodMenus/MethodCommand.st packages/visualgst/Commands/NamespaceMenus/AddNamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/DeleteNamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/FileoutNamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/InspectNamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/NamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/RenameNamespaceCommand.st packages/visualgst/Commands/OpenBrowserCommand.st packages/visualgst/Commands/OpenTabbedBrowserCommand.st packages/visualgst/Commands/OpenWorkspaceCommand.st packages/visualgst/Commands/SaveImageAsCommand.st packages/visualgst/Commands/SaveImageCommand.st packages/visualgst
 /Commands/SmalltalkMenus/AcceptItCommand.st packages/visualgst/Commands/SmalltalkMenus/CancelCommand.st packages/visualgst/Commands/SmalltalkMenus/DebugItCommand.st packages/visualgst/Commands/SmalltalkMenus/DoItCommand.st packages/visualgst/Commands/SmalltalkMenus/InspectItCommand.st packages/visualgst/Commands/SmalltalkMenus/PrintItCommand.st packages/visualgst/Commands/System/AddClassCommand.st packages/visualgst/Commands/System/AddMethodCommand.st packages/visualgst/Commands/System/AddNamespaceCommand.st packages/visualgst/Commands/System/DeleteClassCommand.st packages/visualgst/Commands/System/DeleteMethodCommand.st packages/visualgst/Commands/System/DeleteNamespaceCommand.st packages/visualgst/Commands/System/RenameCategoryCommand.st packages/visualgst/Commands/System/RenameClassCommand.st packages/visualgst/Commands/System/RenameNamespaceCommand.st packages/visualgst/Commands/TabsMenus/CloseTabCommand.st packages/visualgst/Commands/TabsMenus/NextTabCommand.st packages/visualg
 st/Commands/TabsMenus/PreviousTabCommand.st packages/visualgst/Commands/ToolsMenus/OpenAssistantCommand.st packages/visualgst/Commands/ToolsMenus/OpenBottomPaneCommand.st packages/visualgst/Commands/ToolsMenus/OpenImplementorCommand.st packages/visualgst/Commands/ToolsMenus/OpenPackageBuilderCommand.st packages/visualgst/Commands/ToolsMenus/OpenSenderCommand.st packages/visualgst/Commands/ToolsMenus/OpenSUnitCommand.st packages/visualgst/Commands/ToolsMenus/OpenWebBrowserCommand.st packages/visualgst/Commands/WorkspaceMenus/DeleteItemCommand.st packages/visualgst/Commands/WorkspaceMenus/InspectItemCommand.st packages/visualgst/Commands/WorkspaceMenus/WorkspaceVariableCommand.st packages/visualgst/Debugger/Extensions.st packages/visualgst/Debugger/GtkContextWidget.st packages/visualgst/Debugger/GtkDebugger.st packages/visualgst/Debugger/GtkStackInspector.st packages/visualgst/Debugger/GtkStackInspectorView.st packages/visualgst/Extensions.st packages/visualgst/FakeNamespace.st packag
 es/visualgst/GtkAnnouncer.st packages/visualgst/GtkAssistant.st packages/visualgst/GtkBrowsingTool.st packages/visualgst/GtkClassSelectionChanged.st packages/visualgst/GtkClassSUnitWidget.st packages/visualgst/GtkConcreteWidget.st packages/visualgst/GtkEntryDialog.st packages/visualgst/GtkEntryWidget.st packages/visualgst/Gtk/GtkEntryBuffer.st packages/visualgst/Gtk/GtkEntry.st packages/visualgst/GtkHistoryWidget.st packages/visualgst/GtkHSidebarWidget.st packages/visualgst/GtkLauncher.st packages/visualgst/GtkListModel.st packages/visualgst/GtkMainWindow.st packages/visualgst/GtkMethodSUnitWidget.st packages/visualgst/GtkNamespaceSelectionChanged.st packages/visualgst/GtkNamespaceSUnitWidget.st packages/visualgst/GtkNotebookWidget.st packages/visualgst/GtkPackageBuilderWidget.st packages/visualgst/GtkScrollTreeWidget.st packages/visualgst/GtkSidebarWidget.st packages/visualgst/GtkSimpleListWidget.st packages/visualgst/GtkTranscriptWidget.st packages/visualgst/GtkTreeModel.st packag
 es/visualgst/GtkVariableTrackerWidget.st packages/visualgst/GtkVisualGSTTool.st packages/visualgst/GtkVSidebarWidget.st packages/visualgst/GtkWebBrowser.st packages/visualgst/GtkWebView.st packages/visualgst/GtkWorkspaceWidget.st packages/visualgst/HistoryStack.st packages/visualgst/Icons/category.gif packages/visualgst/Icons/extension.png packages/visualgst/Icons/go-bottom.png packages/visualgst/Icons/go-down.png packages/visualgst/Icons/go-first.png packages/visualgst/Icons/go-home.png packages/visualgst/Icons/go-jump.png packages/visualgst/Icons/go-last.png packages/visualgst/Icons/go-next.png packages/visualgst/Icons/go-previous.png packages/visualgst/Icons/go-run.png packages/visualgst/Icons/go-top.png packages/visualgst/Icons/go-up.png packages/visualgst/Icons/namespace.gif packages/visualgst/Icons/NUnit.Failed.png packages/visualgst/Icons/NUnit.Loading.png packages/visualgst/Icons/NUnit.None.png packages/visualgst/Icons/NUnit.NotRun.png packages/visualgst/Icons/NUnit.Running.
 png packages/visualgst/Icons/NUnit.SuccessAndFailed.png packages/visualgst/Icons/NUnit.Success.png packages/visualgst/Icons/overridden.png packages/visualgst/Icons/override.png packages/visualgst/Icons/visualgst.png packages/visualgst/Image/GtkImageModel.st packages/visualgst/Image/GtkImageWidget.st packages/visualgst/Implementors/GtkImageResultsWidget.st packages/visualgst/Implementors/GtkImplementorResultsWidget.st packages/visualgst/Implementors/GtkSenderResultsWidget.st packages/visualgst/Inspector/Extensions.st packages/visualgst/Inspector/GtkCharacterInspectorView.st packages/visualgst/Inspector/GtkCompiledBlockInspectorView.st packages/visualgst/Inspector/GtkCompiledMethodInspectorView.st packages/visualgst/Inspector/GtkContextInspectorView.st packages/visualgst/Inspector/GtkDictionaryInspectorView.st packages/visualgst/Inspector/GtkFloatInspectorView.st packages/visualgst/Inspector/GtkInspectorBrowserWidget.st packages/visualgst/Inspector/GtkInspectorSourceWidget.st packages
 /visualgst/Inspector/GtkInspector.st packages/visualgst/Inspector/GtkInspectorWidget.st packages/visualgst/Inspector/GtkIntegerInspectorView.st packages/visualgst/Inspector/GtkObjectInspectorView.st packages/visualgst/Inspector/GtkSequenceableCollectionInspectorView.st packages/visualgst/Inspector/GtkSetInspectorView.st packages/visualgst/Menus/CategoryMenus.st packages/visualgst/Menus/ClassMenus.st packages/visualgst/Menus/ContextMenus.st packages/visualgst/Menus/DebuggerToolbar.st packages/visualgst/Menus/EditMenus.st packages/visualgst/Menus/HistoryMenus.st packages/visualgst/Menus/InspectorMenus.st packages/visualgst/Menus/LauncherToolbar.st packages/visualgst/Menus/MenuBuilder.st packages/visualgst/Menus/MenuSeparator.st packages/visualgst/Menus/MethodMenus.st packages/visualgst/Menus/NamespaceMenus.st packages/visualgst/Menus/SimpleWorkspaceMenus.st packages/visualgst/Menus/SmalltalkMenus.st packages/visualgst/Menus/TabsMenus.st packages/visualgst/Menus/TextMenus.st packages/v
 isualgst/Menus/ToolbarSeparator.st packages/visualgst/Menus/ToolsMenus.st packages/visualgst/Menus/WorkspaceMenus.st packages/visualgst/Menus/WorkspaceVariableMenus.st packages/visualgst/MethodFinder.st packages/visualgst/Misc/KeySnooper.st packages/visualgst/Misc/TaskQueue.st packages/visualgst/Model/GtkColumnOOPType.st packages/visualgst/Model/GtkColumnPixbufType.st packages/visualgst/Model/GtkColumnTextType.st packages/visualgst/Model/GtkColumnType.st packages/visualgst/NamespaceFinder.st packages/visualgst/Notification/AbstractEvent.st packages/visualgst/Notification/AddedEvent.st packages/visualgst/Notification/CommentedEvent.st packages/visualgst/Notification/DoItEvent.st packages/visualgst/Notification/EventDispatcher.st packages/visualgst/Notification/EventMultiplexer.st packages/visualgst/Notification/Kernel/AbstractNamespace.st packages/visualgst/Notification/Kernel/Class.st packages/visualgst/Notification/Kernel/Metaclass.st packages/visualgst/Notification/Kernel/MethodDi
 ctionary.st packages/visualgst/Notification/ModifiedClassDefinitionEvent.st packages/visualgst/Notification/ModifiedEvent.st packages/visualgst/Notification/RecategorizedEvent.st packages/visualgst/Notification/RemovedEvent.st packages/visualgst/Notification/RenamedEvent.st packages/visualgst/Notification/ReorganizedEvent.st packages/visualgst/Notification/SystemChangeNotifier.st packages/visualgst/Notification/SystemEventManager.st packages/visualgst/Source/BrowserMethodSource.st packages/visualgst/Source/CategorySource.st packages/visualgst/Source/ClassHeaderSource.st packages/visualgst/Source/ClassSource.st packages/visualgst/Source/MethodSource.st packages/visualgst/Source/NamespaceHeaderSource.st packages/visualgst/Source/NamespaceSource.st packages/visualgst/Source/PackageSource.st packages/visualgst/Source/SourceFormatter.st packages/visualgst/State/BrowserState.st packages/visualgst/State/CategoryState.st packages/visualgst/State/ClassState.st packages/visualgst/State/Method
 State.st packages/visualgst/State/NamespaceState.st packages/visualgst/StBrowser/GtkCategorizedClassWidget.st packages/visualgst/StBrowser/GtkCategorizedNamespaceWidget.st packages/visualgst/StBrowser/GtkCategoryWidget.st packages/visualgst/StBrowser/GtkClassBrowserWidget.st packages/visualgst/StBrowser/GtkClassHierarchyWidget.st packages/visualgst/StBrowser/GtkMethodWidget.st packages/visualgst/SUnit/GtkSUnitResultWidget.st packages/visualgst/SUnit/GtkSUnit.st packages/visualgst/SUnit/TestBacktraceLog.st packages/visualgst/SyntaxHighlighter.st packages/visualgst/Tests/AddClassUndoCommandTest.st packages/visualgst/Tests/AddNamespaceUndoCommandTest.st packages/visualgst/Tests/CategoryTest.st packages/visualgst/Tests/CompiledMethodTest.st packages/visualgst/Tests/EmptyTest.st packages/visualgst/Tests/ExtractLiteralsTest.st packages/visualgst/Tests/FinderTest.st packages/visualgst/Tests/GtkAssistantTest.st packages/visualgst/Tests/GtkCategorizedClassWidgetTest.st packages/visualgst/Tes
 ts/GtkCategorizedNamespaceWidgetTest.st packages/visualgst/Tests/GtkCategoryWidgetTest.st packages/visualgst/Tests/GtkConcreteWidgetTest.st packages/visualgst/Tests/GtkMethodWidgetTest.st packages/visualgst/Tests/GtkScrollTreeWidgetTest.st packages/visualgst/Tests/GtkSimpleListWidgetTest.st packages/visualgst/Tests/MenuBuilderTest.st packages/visualgst/Tests/PragmaTest.st packages/visualgst/Tests/StateTest.st packages/visualgst/Tetris/BlockWidget.st packages/visualgst/Tetris/HighScores.st packages/visualgst/Tetris/Score.st packages/visualgst/Tetris/TetrisField.st packages/visualgst/Tetris/TetrisPieceI.st packages/visualgst/Tetris/TetrisPieceJ.st packages/visualgst/Tetris/TetrisPieceL.st packages/visualgst/Tetris/TetrisPieceO.st packages/visualgst/Tetris/TetrisPieceS.st packages/visualgst/Tetris/TetrisPiece.st packages/visualgst/Tetris/TetrisPieceT.st packages/visualgst/Tetris/TetrisPieceWidget.st packages/visualgst/Tetris/TetrisPieceZ.st packages/visualgst/Tetris/Tetris.st packages/
 visualgst/Text/GtkFindWidget.st packages/visualgst/Text/GtkReplaceWidget.st packages/visualgst/Text/GtkSaveTextWidget.st packages/visualgst/Text/GtkSourceCodeWidget.st packages/visualgst/Text/GtkTextPluginWidget.st packages/visualgst/Text/GtkTextWidget.st packages/visualgst/Undo/Text/DeleteTextCommand.st packages/visualgst/Undo/Text/InsertTextCommand.st packages/visualgst/Undo/Text/ReplaceTextCommand.st packages/visualgst/Undo/UndoCommand.st packages/visualgst/Undo/UndoStack.st packages/visualgst/WorkspaceVariableTracker.st
+packages/visualgst/AbstractFinder.st packages/visualgst/Category/AbstractNamespace.st packages/visualgst/Category/ClassCategory.st packages/visualgst/Category/Class.st packages/visualgst/ClassFinder.st packages/visualgst/Clock/GtkClock.st packages/visualgst/Commands/CategoryMenus/AddCategoryCommand.st packages/visualgst/Commands/CategoryMenus/CategoryCommand.st packages/visualgst/Commands/CategoryMenus/FileoutCategoryCommand.st packages/visualgst/Commands/CategoryMenus/RenameCategoryCommand.st packages/visualgst/Commands/ClassMenus/AddClassCommand.st packages/visualgst/Commands/ClassMenus/ClassCommand.st packages/visualgst/Commands/ClassMenus/DeleteClassCommand.st packages/visualgst/Commands/ClassMenus/FileoutClassCommand.st packages/visualgst/Commands/ClassMenus/InspectClassCommand.st packages/visualgst/Commands/ClassMenus/RenameClassCommand.st packages/visualgst/Commands/Command.st packages/visualgst/Commands/DebugMenus/ContinueDebugCommand.st packages/visualgst/Commands/DebugMenu
 s/DebugCommand.st packages/visualgst/Commands/DebugMenus/StepIntoDebugCommand.st packages/visualgst/Commands/DebugMenus/StepOverDebugCommand.st packages/visualgst/Commands/EditMenus/CancelEditCommand.st packages/visualgst/Commands/EditMenus/CopyEditCommand.st packages/visualgst/Commands/EditMenus/CutEditCommand.st packages/visualgst/Commands/EditMenus/FindEditCommand.st packages/visualgst/Commands/EditMenus/PasteEditCommand.st packages/visualgst/Commands/EditMenus/RedoEditCommand.st packages/visualgst/Commands/EditMenus/ReplaceEditCommand.st packages/visualgst/Commands/EditMenus/SelectAllEditCommand.st packages/visualgst/Commands/EditMenus/UndoEditCommand.st packages/visualgst/Commands/HistoryCommands/HistoryBackCommand.st packages/visualgst/Commands/HistoryCommands/HistoryDisplayCommand.st packages/visualgst/Commands/HistoryCommands/HistoryForwardCommand.st packages/visualgst/Commands/InspectorMenus/InspectorBackCommand.st packages/visualgst/Commands/InspectorMenus/InspectorDiveCom
 mand.st packages/visualgst/Commands/MethodMenus/DebugTestCommand.st packages/visualgst/Commands/MethodMenus/DeleteMethodCommand.st packages/visualgst/Commands/MethodMenus/FileoutMethodCommand.st packages/visualgst/Commands/MethodMenus/InspectMethodCommand.st packages/visualgst/Commands/MethodMenus/MethodCommand.st packages/visualgst/Commands/NamespaceMenus/AddNamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/DeleteNamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/FileoutNamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/InspectNamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/NamespaceCommand.st packages/visualgst/Commands/NamespaceMenus/RenameNamespaceCommand.st packages/visualgst/Commands/OpenBrowserCommand.st packages/visualgst/Commands/OpenTabbedBrowserCommand.st packages/visualgst/Commands/OpenWorkspaceCommand.st packages/visualgst/Commands/SaveImageAsCommand.st packages/visualgst/Commands/SaveImageCommand.st packages/visualgst
 /Commands/SmalltalkMenus/AcceptItCommand.st packages/visualgst/Commands/SmalltalkMenus/CancelCommand.st packages/visualgst/Commands/SmalltalkMenus/DebugItCommand.st packages/visualgst/Commands/SmalltalkMenus/DoItCommand.st packages/visualgst/Commands/SmalltalkMenus/InspectItCommand.st packages/visualgst/Commands/SmalltalkMenus/PrintItCommand.st packages/visualgst/Commands/System/AddClassCommand.st packages/visualgst/Commands/System/AddMethodCommand.st packages/visualgst/Commands/System/AddNamespaceCommand.st packages/visualgst/Commands/System/DeleteClassCommand.st packages/visualgst/Commands/System/DeleteMethodCommand.st packages/visualgst/Commands/System/DeleteNamespaceCommand.st packages/visualgst/Commands/System/RenameCategoryCommand.st packages/visualgst/Commands/System/RenameClassCommand.st packages/visualgst/Commands/System/RenameNamespaceCommand.st packages/visualgst/Commands/TabsMenus/CloseTabCommand.st packages/visualgst/Commands/TabsMenus/NextTabCommand.st packages/visualg
 st/Commands/TabsMenus/PreviousTabCommand.st packages/visualgst/Commands/ToolsMenus/OpenAssistantCommand.st packages/visualgst/Commands/ToolsMenus/OpenBottomPaneCommand.st packages/visualgst/Commands/ToolsMenus/OpenImplementorCommand.st packages/visualgst/Commands/ToolsMenus/OpenPackageBuilderCommand.st packages/visualgst/Commands/ToolsMenus/OpenSenderCommand.st packages/visualgst/Commands/ToolsMenus/OpenSUnitCommand.st packages/visualgst/Commands/ToolsMenus/OpenWebBrowserCommand.st packages/visualgst/Commands/WorkspaceMenus/DeleteItemCommand.st packages/visualgst/Commands/WorkspaceMenus/InspectItemCommand.st packages/visualgst/Commands/WorkspaceMenus/WorkspaceVariableCommand.st packages/visualgst/Debugger/Extensions.st packages/visualgst/Debugger/GtkContextWidget.st packages/visualgst/Debugger/GtkDebugger.st packages/visualgst/Debugger/GtkStackInspector.st packages/visualgst/Debugger/GtkStackInspectorView.st packages/visualgst/Extensions.st packages/visualgst/FakeNamespace.st packag
 es/visualgst/GtkAbstractConcreteWidget.st packages/visualgst/GtkAnnouncer.st packages/visualgst/GtkAssistant.st packages/visualgst/GtkBrowsingTool.st packages/visualgst/GtkClassSelectionChanged.st packages/visualgst/GtkClassSUnitWidget.st packages/visualgst/GtkConcreteWidget.st packages/visualgst/GtkEntryDialog.st packages/visualgst/GtkEntryWidget.st packages/visualgst/Gtk/GtkEntryBuffer.st packages/visualgst/Gtk/GtkEntry.st packages/visualgst/GtkHistoryWidget.st packages/visualgst/GtkHSidebarWidget.st packages/visualgst/GtkLauncher.st packages/visualgst/GtkListModel.st packages/visualgst/GtkMainWindow.st packages/visualgst/GtkMethodSUnitWidget.st packages/visualgst/GtkNamespaceSelectionChanged.st packages/visualgst/GtkNotebookWidget.st packages/visualgst/GtkPackageBuilderWidget.st packages/visualgst/GtkScrollTreeWidget.st packages/visualgst/GtkSidebarWidget.st packages/visualgst/GtkSimpleListWidget.st packages/visualgst/GtkTranscriptWidget.st packages/visualgst/GtkTreeModel.st pack
 ages/visualgst/GtkVariableTrackerWidget.st packages/visualgst/GtkVisualGSTTool.st packages/visualgst/GtkVSidebarWidget.st packages/visualgst/GtkWebBrowser.st packages/visualgst/GtkWebView.st packages/visualgst/GtkWorkspaceWidget.st packages/visualgst/HistoryStack.st packages/visualgst/Icons/category.gif packages/visualgst/Icons/extension.png packages/visualgst/Icons/go-bottom.png packages/visualgst/Icons/go-down.png packages/visualgst/Icons/go-first.png packages/visualgst/Icons/go-home.png packages/visualgst/Icons/go-jump.png packages/visualgst/Icons/go-last.png packages/visualgst/Icons/go-next.png packages/visualgst/Icons/go-previous.png packages/visualgst/Icons/go-run.png packages/visualgst/Icons/go-top.png packages/visualgst/Icons/go-up.png packages/visualgst/Icons/namespace.gif packages/visualgst/Icons/NUnit.Failed.png packages/visualgst/Icons/NUnit.Loading.png packages/visualgst/Icons/NUnit.None.png packages/visualgst/Icons/NUnit.NotRun.png packages/visualgst/Icons/NUnit.Runnin
 g.png packages/visualgst/Icons/NUnit.SuccessAndFailed.png packages/visualgst/Icons/NUnit.Success.png packages/visualgst/Icons/overridden.png packages/visualgst/Icons/override.png packages/visualgst/Icons/visualgst.png packages/visualgst/Image/GtkImageModel.st packages/visualgst/Image/GtkImageWidget.st packages/visualgst/Implementors/GtkImageResultsWidget.st packages/visualgst/Implementors/GtkImplementorResultsWidget.st packages/visualgst/Implementors/GtkSenderResultsWidget.st packages/visualgst/Inspector/Extensions.st packages/visualgst/Inspector/GtkCharacterInspectorView.st packages/visualgst/Inspector/GtkCompiledBlockInspectorView.st packages/visualgst/Inspector/GtkCompiledMethodInspectorView.st packages/visualgst/Inspector/GtkContextInspectorView.st packages/visualgst/Inspector/GtkDictionaryInspectorView.st packages/visualgst/Inspector/GtkFloatInspectorView.st packages/visualgst/Inspector/GtkInspectorBrowserWidget.st packages/visualgst/Inspector/GtkInspectorSourceWidget.st packag
 es/visualgst/Inspector/GtkInspector.st packages/visualgst/Inspector/GtkInspectorWidget.st packages/visualgst/Inspector/GtkIntegerInspectorView.st packages/visualgst/Inspector/GtkObjectInspectorView.st packages/visualgst/Inspector/GtkSequenceableCollectionInspectorView.st packages/visualgst/Inspector/GtkSetInspectorView.st packages/visualgst/Menus/CategoryMenus.st packages/visualgst/Menus/ClassMenus.st packages/visualgst/Menus/ContextMenus.st packages/visualgst/Menus/DebuggerToolbar.st packages/visualgst/Menus/EditMenus.st packages/visualgst/Menus/HistoryMenus.st packages/visualgst/Menus/InspectorMenus.st packages/visualgst/Menus/LauncherToolbar.st packages/visualgst/Menus/MenuBuilder.st packages/visualgst/Menus/MenuSeparator.st packages/visualgst/Menus/MethodMenus.st packages/visualgst/Menus/NamespaceMenus.st packages/visualgst/Menus/SimpleWorkspaceMenus.st packages/visualgst/Menus/SmalltalkMenus.st packages/visualgst/Menus/TabsMenus.st packages/visualgst/Menus/TextMenus.st packages
 /visualgst/Menus/ToolbarSeparator.st packages/visualgst/Menus/ToolsMenus.st packages/visualgst/Menus/WorkspaceMenus.st packages/visualgst/Menus/WorkspaceVariableMenus.st packages/visualgst/MethodFinder.st packages/visualgst/Misc/TaskQueue.st packages/visualgst/Model/GtkColumnOOPType.st packages/visualgst/Model/GtkColumnPixbufType.st packages/visualgst/Model/GtkColumnTextType.st packages/visualgst/Model/GtkColumnType.st packages/visualgst/NamespaceFinder.st packages/visualgst/Notification/AbstractEvent.st packages/visualgst/Notification/AddedEvent.st packages/visualgst/Notification/CommentedEvent.st packages/visualgst/Notification/DoItEvent.st packages/visualgst/Notification/EventDispatcher.st packages/visualgst/Notification/EventMultiplexer.st packages/visualgst/Notification/Kernel/AbstractNamespace.st packages/visualgst/Notification/Kernel/Class.st packages/visualgst/Notification/Kernel/Metaclass.st packages/visualgst/Notification/Kernel/MethodDictionary.st packages/visualgst/Notif
 ication/ModifiedClassDefinitionEvent.st packages/visualgst/Notification/ModifiedEvent.st packages/visualgst/Notification/RecategorizedEvent.st packages/visualgst/Notification/RemovedEvent.st packages/visualgst/Notification/RenamedEvent.st packages/visualgst/Notification/ReorganizedEvent.st packages/visualgst/Notification/SystemChangeNotifier.st packages/visualgst/Notification/SystemEventManager.st packages/visualgst/Source/BrowserMethodSource.st packages/visualgst/Source/CategorySource.st packages/visualgst/Source/ClassHeaderSource.st packages/visualgst/Source/ClassSource.st packages/visualgst/Source/MethodSource.st packages/visualgst/Source/NamespaceHeaderSource.st packages/visualgst/Source/NamespaceSource.st packages/visualgst/Source/PackageSource.st packages/visualgst/Source/SourceFormatter.st packages/visualgst/State/BrowserState.st packages/visualgst/State/CategoryState.st packages/visualgst/State/ClassState.st packages/visualgst/State/MethodState.st packages/visualgst/State/Na
 mespaceState.st packages/visualgst/StBrowser/GtkCategorizedClassWidget.st packages/visualgst/StBrowser/GtkCategorizedNamespaceWidget.st packages/visualgst/StBrowser/GtkCategoryWidget.st packages/visualgst/StBrowser/GtkClassBrowserWidget.st packages/visualgst/StBrowser/GtkClassHierarchyWidget.st packages/visualgst/StBrowser/GtkMethodWidget.st packages/visualgst/SUnit/GtkSUnitResultWidget.st packages/visualgst/SUnit/GtkSUnit.st packages/visualgst/SUnit/TestBacktraceLog.st packages/visualgst/SyntaxHighlighter.st packages/visualgst/Tests/AddClassUndoCommandTest.st packages/visualgst/Tests/AddNamespaceUndoCommandTest.st packages/visualgst/Tests/CategoryTest.st packages/visualgst/Tests/CompiledMethodTest.st packages/visualgst/Tests/EmptyTest.st packages/visualgst/Tests/ExtractLiteralsTest.st packages/visualgst/Tests/FinderTest.st packages/visualgst/Tests/GtkAssistantTest.st packages/visualgst/Tests/GtkCategorizedClassWidgetTest.st packages/visualgst/Tests/GtkCategorizedNamespaceWidgetTest
 .st packages/visualgst/Tests/GtkCategoryWidgetTest.st packages/visualgst/Tests/GtkConcreteWidgetTest.st packages/visualgst/Tests/GtkMethodWidgetTest.st packages/visualgst/Tests/GtkScrollTreeWidgetTest.st packages/visualgst/Tests/GtkSimpleListWidgetTest.st packages/visualgst/Tests/MenuBuilderTest.st packages/visualgst/Tests/PragmaTest.st packages/visualgst/Tests/StateTest.st packages/visualgst/Tetris/BlockWidget.st packages/visualgst/Tetris/HighScores.st packages/visualgst/Tetris/Score.st packages/visualgst/Tetris/TetrisField.st packages/visualgst/Tetris/TetrisPieceI.st packages/visualgst/Tetris/TetrisPieceJ.st packages/visualgst/Tetris/TetrisPieceL.st packages/visualgst/Tetris/TetrisPieceO.st packages/visualgst/Tetris/TetrisPieceS.st packages/visualgst/Tetris/TetrisPiece.st packages/visualgst/Tetris/TetrisPieceT.st packages/visualgst/Tetris/TetrisPieceWidget.st packages/visualgst/Tetris/TetrisPieceZ.st packages/visualgst/Tetris/Tetris.st packages/visualgst/Text/GtkFindWidget.st pack
 ages/visualgst/Text/GtkReplaceWidget.st packages/visualgst/Text/GtkSaveTextWidget.st packages/visualgst/Text/GtkSourceCodeWidget.st packages/visualgst/Text/GtkTextPluginWidget.st packages/visualgst/Text/GtkTextWidget.st packages/visualgst/Undo/Text/DeleteTextCommand.st packages/visualgst/Undo/Text/InsertTextCommand.st packages/visualgst/Undo/Text/ReplaceTextCommand.st packages/visualgst/Undo/UndoCommand.st packages/visualgst/Undo/UndoStack.st packages/visualgst/WorkspaceVariableTracker.st
 $(VisualGST_FILES):
 $(srcdir)/packages/visualgst/stamp-classes: $(VisualGST_FILES)
  touch $(srcdir)/packages/visualgst/stamp-classes
diff --git a/packages/visualgst/Misc/KeySnooper.st b/packages/visualgst/Misc/KeySnooper.st
deleted file mode 100644
index a81e8a1..0000000
--- a/packages/visualgst/Misc/KeySnooper.st
+++ /dev/null
@@ -1,91 +0,0 @@
-"======================================================================
-|
-| KeySnooper class definition
-|
-======================================================================"
-
-"======================================================================
-|
-| Copyright (c) 2013
-| Gwenael Casaccio <[hidden email]>,
-|
-|
-| This file is part of VisualGST.
-|
-| Permission is hereby granted, free of charge, to any person obtaining
-| a copy of this software and associated documentation files (the
-| 'Software'), to deal in the Software without restriction, including
-| without limitation the rights to use, copy, modify, merge, publish,
-| distribute, sublicense, and/or sell copies of the Software, and to
-| permit persons to whom the Software is furnished to do so, subject to
-| the following conditions:
-|
-| The above copyright notice and this permission notice shall be
-| included in all copies or substantial portions of the Software.
-|
-| THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-| EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-|
-======================================================================"
-
-Object subclass: KeySnooper [
-
-    KeySnooper class [ | uniqueInstance | ]
-
-    KeySnooper class >> initialize [
-        <category: 'initialization'>
-
-        ObjectMemory addDependent: self.
-    ]
-
-    KeySnooper class >> uniqueInstance [
-        <category: 'instance creation'>
-
-        ^ uniqueInstance ifNil: [ uniqueInstance := self new ]
-    ]
-
-    KeySnooper class >> new [
-        <category: 'instance creation'>
-
-        ^ super new
-            initialize;
-            yourself
-    ]
-
-    KeySnooper class >> update: aSymbol [
-        <category: 'initialize'>
-
-        aSymbol == #returnFromSnapshot ifTrue: [ uniqueInstance := nil ].
-    ]
-
-    | callback |
-
-    initialize [
-        <category: 'initialization'>
-
-        callback := CCallbackDescriptor
-                            for: [ :aWidget :aGdkEventKey :aPointer |
-                                    [  self keyHandling: (GTK.GdkEventKey address: aGdkEventKey) ]
-                                            on: Exception do: [ :ex | ex context backtrace. false]]
-                            returning: #boolean
-                            withArgs: #(#long #long #long).
-        GTK.Gtk keySnooperInstall: callback funcData: nil.
-    ]
-
-    keyHandling: aGdkEventKey [
-
-        ^ ((aGdkEventKey state value bitAnd: 4) = 4 and: [ aGdkEventKey keyval value = GTK.Gdk gdkPeriod ])
-                                                            ifTrue: [ VisualGST.TaskQueue uniqueInstance flush.
-                                                                      true ]
-                                                            ifFalse: [ false ]
-    ]
-]
-
-Eval [
-    KeySnooper initialize.
-]
diff --git a/packages/visualgst/Misc/TaskQueue.st b/packages/visualgst/Misc/TaskQueue.st
index 150008d..5922309 100644
--- a/packages/visualgst/Misc/TaskQueue.st
+++ b/packages/visualgst/Misc/TaskQueue.st
@@ -77,15 +77,5 @@ Object subclass: TaskQueue [
             sem wait.
             currentProcess := nil ] repeat ] fork
     ]
-
-    flush [
-        <category: 'accessing'>
-
-        queueHandler ifNotNil: [:p | p terminate].
-        currentProcess ifNotNil: [:p | p terminate].
-        self
-            initialize;
-            run.
-    ]
 ]
 
diff --git a/packages/visualgst/package.xml b/packages/visualgst/package.xml
index 69ac38a..c68f146 100644
--- a/packages/visualgst/package.xml
+++ b/packages/visualgst/package.xml
@@ -72,7 +72,6 @@
   <filein>Gtk/GtkEntryBuffer.st</filein>
   <filein>Extensions.st</filein>
   <filein>Misc/TaskQueue.st</filein>
-  <filein>Misc/KeySnooper.st</filein>
   <filein>Notification/AbstractEvent.st</filein>
   <filein>Notification/AddedEvent.st</filein>
   <filein>Notification/CommentedEvent.st</filein>
--
2.0.1


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

[PATCH 3/3] gst-sunit: Spawn the event loop last to avoid crashes

Holger Freyther
In reply to this post by Holger Freyther
It was possible that while we started to show the VisualGST
window GTK+ would call back into Smalltalk and we would run
the Glib dispatch while showing the window. This lead to a
timer expiring on a non-fully realized window and leading to
a crash inside GTK+/X11.

Run the event loop after we have intitialized all of the
VisualGST code.

2014-07-20  Holger Hans Peter Freyther  <[hidden email]>

        * scripts/Test.st: Spawn the event loop last.
---
 ChangeLog       |  4 ++++
 scripts/Test.st | 11 ++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index db932dd..73738d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-07-20  Holger Hans Peter Freyther  <[hidden email]>
+
+ * scripts/Test.st: Spawn the event loop last.
+
 2014-06-21  Holger Hans Peter Freyther  <[hidden email]>
 
  * kernel/RecursionLock.st: Return the result of >>#critical:
diff --git a/scripts/Test.st b/scripts/Test.st
index 28409bb..20e552d 100644
--- a/scripts/Test.st
+++ b/scripts/Test.st
@@ -56,12 +56,8 @@ Object subclass: SUnitUnhandledDebugger [
         LoadedDebugger := true.
         PackageLoader fileInPackage: 'VisualGST'.
 
-        "Start the event-loop and avoid scope look-ups. This is why
-        we look-up the class by hand."
-        [
-            ((Smalltalk at: #VisualGST) at: #TaskQueue) uniqueInstance run.
-            ((Smalltalk at: #GTK) at: #Gtk) main
-        ] fork.
+        "Start to run the VisualGST task queue"
+        ((Smalltalk at: #VisualGST) at: #TaskQueue) uniqueInstance run.
     ]
 
     SUnitUnhandledDebugger class >> keepRunningOnFailure [
@@ -70,7 +66,8 @@ Object subclass: SUnitUnhandledDebugger [
     ]
 
     SUnitUnhandledDebugger class >> keepRunning [
-        Semaphore new wait
+        Processor activeProcess name: 'Main-loop for SUnit'.
+        ((Smalltalk at: #GTK) at: #Gtk) main
     ]
 ]
 
--
2.0.1


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: GLib/GTK+ event loop fiasco

Holger Freyther
In reply to this post by Holger Freyther
On Sun, Jul 20, 2014 at 04:00:07PM +0200, Holger Hans Peter Freyther wrote:

Hi,


> > I've looked at this code for a bit and I wonder why we don't inhibit the
> > process switching here? Or at least add a way to crash hard if a process
> > change is scheduled so I can see which mutex is hit.
>
> I have hit the wesp nest here. So GtkImage of VisualGST is adding various
> "Processor activeProcess yield" into for loops as otherwise we get issues
> with the garbage collector:
>
> ...scripts/Test.st:181: Too many garbage collections, finalizers missed!
> ...scripts/Test.st:181: This is a bug, please repor
>
> Couldn't we copy the content of gcArray to a new array? Or run the
> finalizer at another point?

ignoring nested event loops I am running glib with the below local
modification. The intention is to find places where a callback has
yielded (either voluntarily or due waiting on a semaphore) the CPU
while being in a call-in process.

The code will then loop inside the pause() and I can attach with
gdb and execute code to inspect it.

diff --git a/packages/glib/Makefile.am b/packages/glib/Makefile.am
index 182c12a..eddfb72 100644
--- a/packages/glib/Makefile.am
+++ b/packages/glib/Makefile.am
@@ -1,7 +1,7 @@
 CLEANFILES = $(BUILT_SOURCES)
 
 gst_module_ldflags = -rpath $(moduleexecdir) -release $(VERSION) -module \
-       -no-undefined -export-symbols-regex gst_initModule
+       -no-undefined -export-symbols-regex "gst_initModule|gst_glib_set_inhibit_dispatch"
 
 ALL_LIBS = $(GLIB_LIBS) $(GTHREAD_LIBS)
 
diff --git a/packages/glib/gst-glib.c b/packages/glib/gst-glib.c
index fb86974..cad11db 100644
--- a/packages/glib/gst-glib.c
+++ b/packages/glib/gst-glib.c
@@ -140,6 +140,15 @@ static GSList *loop_list;
 static GPollFD *fds;
 static int allocated_nfds, nfds;
 static int maxprio;
+static int inhibit_dispatch;
+
+int
+gst_glib_set_inhibit_dispatch(int do_inhibit)
+{
+  int old_inhibit = inhibit_dispatch;
+  inhibit_dispatch = do_inhibit;
+  return old_inhibit;
+}
 
 static void
 main_loop_dispatch (void)
@@ -148,6 +157,12 @@ main_loop_dispatch (void)
   if (!g_main_context_acquire (context))
     abort ();
 
+  /* Do we inhibit running dispatch? */
+  if (inhibit_dispatch) {
+   printf("BAD.. dispatch during execution\n");
+    while(1) pause();
+  }
+
   g_main_context_dispatch (context);
   g_main_context_release (context);
 }
diff --git a/packages/glib/gst-gobject.c b/packages/glib/gst-gobject.c
index 949d547..dab7703 100644
--- a/packages/glib/gst-gobject.c
+++ b/packages/glib/gst-gobject.c
@@ -401,7 +401,7 @@ invoke_smalltalk_closure (GClosure     *closure,
   OOP *args = alloca (sizeof (OOP) * stc->n_params);
 
   OOP resultOOP;
-  int i;
+  int i, inhibit;
 
   /* Less parameters than the event has, discard the ones in excess.  */
   if (stc->n_params < n_param_values)
@@ -437,7 +437,10 @@ invoke_smalltalk_closure (GClosure     *closure,
         args[i++] = stc->widget;
     }
 
+  inhibit = gst_glib_set_inhibit_dispatch(1);
   resultOOP = gst_nvmsg_send (stc->receiver, stc->selector, args, i);
+  gst_glib_set_inhibit_dispatch(inhibit);
+  
 
   /* FIXME Need to init return_value's type? */
   if (return_value)


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk