[Mono-dev] Strange bug in System.Timers.Timer i guess
gigi gogu
dantes_programmer at yahoo.com
Thu Dec 29 09:45:46 EST 2005
Hy guys,
I'm trying to port a windows.forms software in gtk with mono, and everything was ok until i tried to implement two timers.... That made my application crush without a reason after a while. Here is the message i received
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Stacktrace:
in <0x4> (wrapper managed-to-native) Gtk.Container:gtk_container_remove (intptr,
intptr)
in <0xffffffe3> (wrapper managed-to-native) Gtk.Container:gtk_container_remove (
intptr,intptr)
in <0x3b> Gtk.Container:Remove (WidgGtk.)
in <0x75> pl_gui.myTableList:refresh ()
in <0x13> pl_gui.myTableList:loadMese (pl_db.DB.Lists.dbListaMese)
in <0x180> Forms.frm_Main:refreshMese ()
in <0xa> Forms.frm_Main:on_tmrRefreshMese_Tick (object,System.Timers.ElapsedEven
tArgs)
in <0xffffff85> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_o
bject_ElapsedEventArgs (object,System.Timers.ElapsedEventArgs)
in <0x1d5> System.Timers.Timer:Callback (object)
in <0xffffff95> (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_o
bject (object)
in <0xf061a8a> (wrapper runtime-invoke) System.Object:runtime_invoke_void_object
(object,intptr,intptr,intptr)
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Practicaly, the timer does an refresh on a component on a specified interval... that means it removes all widgets inside that component and add them again (updated from a database); The code for this is (if it matthers):
private void refresh()
{
int nr = this.Children.Length;
for(int i=nr-1; i>=0; i--){
Widget w=this.Children[i];
try{
this.Remove(w);
}catch(Exception ex){
Console.WriteLine(ex.Message);
}
}
Classes.gdiMasa m;
for (int i = 0; i < lista_mese.Count; i++)
{
m = new Classes.gdiMasa(lista_mese.getMasa(i));
this.Put(m,m.db_masa.pozX,m.db_masa.pozY);
m.myClick +=ev_mese;
}
}
---------------------------------
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20051229/c27021d8/attachment.html
More information about the Mono-devel-list
mailing list