Displaying 9 results from an estimated 9 matches for "gc_mark_wxwindow".
2007 May 22
0
[1032] trunk/wxruby2/swig: Preserve Sizers associated with Windows from GC; fix several sample
...n class="lines">@@ -22,6 +22,7 @@
</span><span class="cx"> // This is implemented in swig/wx.i
</span><span class="cx"> %{
</span><span class="cx"> extern void GcNullFreeFunc(void *);
</span><ins>+extern void GC_mark_wxWindow(void *);
</ins><span class="cx"> %}
</span><span class="cx">
</span><span class="cx"> // Macro definitions.
</span><span class="lines">@@ -33,27 +34,39 @@
</span><span class="cx"> %feature...
2007 Jul 05
0
[1109] trunk/wxruby2/swig: Move marking of MenuBar from direct %markfunc to via mark_wxFrame, so
...wig/wx.i
</del><ins>+// These are implemented in swig/wx.i, so they are shared among all classes
</ins><span class="cx"> %{
</span><span class="cx"> extern void GcNullFreeFunc(void *);
</span><span class="cx"> extern void GC_mark_wxWindow(void *);
</span><ins>+extern void GC_mark_wxFrame(void *);
</ins><span class="cx"> %}
</span><span class="cx">
</span><span class="cx"> // Macro definitions.
</span><span class="lines">@@ -48,11 +49...
2007 Jul 21
0
[1135] trunk/wxruby2/swig/mark_free_impl.i: Convert from DOS to Unix newlines
...p;nbsp        rb_gc_mark( SWIG_RubyInstanceFor(menu) );
-        }
-
-}
-
-// Default mark routine for Windows - preserve the main sizer and caret
-// belong to this window
-void GC_mark_wxWindow(void *ptr)
-{
- if ( GC_IsWindowDeleted(ptr) ) return;
-
- wxWindow* wx_win = (wxWindow*)ptr;
- wxSizer* wx_sizer = wx_win->GetSizer();
- if ( wx_sizer )
-        {
-      &nb...
2007 Jul 21
0
[1127] trunk/wxruby2: Move shared C++ GC functions into separate file included into wx.i
...p;nbsp        rb_gc_mark( SWIG_RubyInstanceFor(menu) );
+        }
+
+}
+
+// Default mark routine for Windows - preserve the main sizer and caret
+// belong to this window
+void GC_mark_wxWindow(void *ptr)
+{
+ // can occasionally be NULL if called in an evt_create handler
+ if ( ! ptr ) return;
+ if ( GC_IsWindowDeleted(ptr) ) return;
+
+ wxWindow* wx_win = (wxWindow*)ptr;
+ wxSizer* wx_sizer = wx_win->GetSizer();
+ if ( wx_sizer )
+     &...
2008 Feb 17
15
A bug in wxRuby. Segmentation fault in random situations.
Hello,
I wrote an application in wxRuby:
ruby 1.8.6
wxruby 1.9.4 installed from gem
windows xp sp2
After several minutes of running it crashes with the following error:
"c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27: [BUG]
Segmentation fault
ruby 1.8.6 (2007-03-13) [i386-mswin32]
This application has requested the Runtime to terminate it in an unusual way.
Please contact
2007 Jul 22
0
[1141] trunk/wxruby2/swig/mark_free_impl.i: ControlWithItems call default Window mark routine to preserve ToolTips etc
...-130,6 +130,8 @@
</span><span class="cx"> if ( GC_IsWindowDeleted(ptr) )
</span><span class="cx">         return;
</span><span class="cx">
</span><ins>+ GC_mark_wxWindow(ptr);
+
</ins><span class="cx"> wxControlWithItems* wx_cwi = (wxControlWithItems*) ptr;
</span><span class="cx"> int count = wx_cwi->GetCount();
</span><span class="cx"> if ( count == 0 )
</span></span></pre&g...
2007 Jun 27
0
[1090] trunk/wxruby2/swig/wx.i: Fix a rare crasher if GC runs mid-way thru window creation via an evt_window_create handler
...     2007-06-27 23:10:03 UTC (rev 1090)
</span><span class="lines">@@ -31,7 +31,8 @@
</span><span class="cx"> // Default mark routine for Windows - preserve sizers
</span><span class="cx"> void GC_mark_wxWindow(void *ptr)
</span><span class="cx"> {
</span><del>-
</del><ins>+ // can occasionally be NULL if called in an evt_create handler
+ if ( ! ptr ) return;
</ins><span class="cx"> if ( GC_IsWindowDeleted(ptr) ) return;
</span>...
2007 Jul 21
0
[1134] trunk/wxruby2/swig/mark_free_impl.i: When window is deleted, unhook ruby obj from DATA_PTR to avoid MSW crashes
...p }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -92,8 +96,6 @@
</span><span class="cx"> // belong to this window
</span><span class="cx"> void GC_mark_wxWindow(void *ptr)
</span><span class="cx"> {
</span><del>- // can occasionally be NULL if called in an evt_create handler
- if ( ! ptr ) return;
</del><span class="cx"> if ( GC_IsWindowDeleted(ptr) ) return;
</span><span class="cx&...
2007 Jul 04
0
[1108] trunk/wxruby2/swig: Revised mem mgmt for Sizers to address more GC crashes in Sizers demo
...  { GC_mark_SizerBelongingToWindow(child_sizer); }
+        }
+
+}
+
+// Default mark routine for Windows - preserve the main sizer and caret
+// belong to this window
</ins><span class="cx"> void GC_mark_wxWindow(void *ptr)
</span><span class="cx"> {
</span><span class="cx"> // can occasionally be NULL if called in an evt_create handler
</span><span class="lines">@@ -38,9 +65,8 @@
</span><span class="cx"> wxWindow* w...