Exception on closing a window.

View: New views
7 Messages — Rating Filter:   Alert me  

Exception on closing a window.

by libin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear All,
 
I am getting an exception while closing a child window using 'X' button of the window.
The whole application is crashing after giving the following messages.
Interestingly, this is only happening when running the application using .net framework and not when running the application using mono.
 
We suspected some 'Dispose()' code in the OnDeleteEvent, but it is happening even if I comment the whole code inside OnDeleteEvent.
 
Message: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." 
 
Source: glib-sharp
 
Stack Trace:
 
   at GLib.Object.PerformQueuedUnrefs()
   at GLib.Timeout.TimeoutProxy.Handler()
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at LmEdit.LmEdit.Main() in D:\Lm_Edit\src\common\LmEdit.cs:line 49
 
Any help  would be highly appreciated.
 
Many Thanks,
 
Libin

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com


_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@...
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Re: Exception on closing a window.

by Anders Rune Jensen-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi 

I this using mono 2.0? I had a similar problem and upgrading to mono 2.4 fixed the problem.

On Mon, Jun 15, 2009 at 10:39 AM, libin <libin.mohanan@...> wrote:
Dear All,
 
I am getting an exception while closing a child window using 'X' button of the window.
The whole application is crashing after giving the following messages.
Interestingly, this is only happening when running the application using .net framework and not when running the application using mono.
 
We suspected some 'Dispose()' code in the OnDeleteEvent, but it is happening even if I comment the whole code inside OnDeleteEvent.
 
Message: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." 
 
Source: glib-sharp
 
Stack Trace:
 
   at GLib.Object.PerformQueuedUnrefs()
   at GLib.Timeout.TimeoutProxy.Handler()
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at LmEdit.LmEdit.Main() in D:\Lm_Edit\src\common\LmEdit.cs:line 49
 
Any help  would be highly appreciated.
 
Many Thanks,
 
Libin


--
Anders Rune Jensen
http://people.iola.dk/arj/

_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@...
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Re: Exception on closing a window.

by libin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi jensen,
Thanks for the input.
I am using mono 2.0.1
But the problem is only happening when running without mono
 
1. when I am running from visual studio with or without debugging
2. When using the application installed using MSI on windows
 
Using mono the application is working fine.

From: anders.rune.jensen@... [mailto:anders.rune.jensen@...] On Behalf Of Anders Rune Jensen
Sent: Monday, June 15, 2009 2:28 PM
To: libin
Cc: gtk-sharp-list@...
Subject: Re: [Gtk-sharp-list] Exception on closing a window.

Hi 

I this using mono 2.0? I had a similar problem and upgrading to mono 2.4 fixed the problem.

On Mon, Jun 15, 2009 at 10:39 AM, libin <libin.mohanan@...> wrote:
Dear All,
 
I am getting an exception while closing a child window using 'X' button of the window.
The whole application is crashing after giving the following messages.
Interestingly, this is only happening when running the application using .net framework and not when running the application using mono.
 
We suspected some 'Dispose()' code in the OnDeleteEvent, but it is happening even if I comment the whole code inside OnDeleteEvent.
 
Message: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." 
 
Source: glib-sharp
 
Stack Trace:
 
   at GLib.Object.PerformQueuedUnrefs()
   at GLib.Timeout.TimeoutProxy.Handler()
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at LmEdit.LmEdit.Main() in D:\Lm_Edit\src\common\LmEdit.cs:line 49
 
Any help  would be highly appreciated.
 
Many Thanks,
 
Libin


--
Anders Rune Jensen
http://people.iola.dk/arj/

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com


_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@...
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Parent Message unknown Re: Exception on closing a window.

by libin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

These are the warnings shown in the output console

'Project.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'Project.exe' (Managed): Loaded 'D:\Project_1\build\bin\Debug\Project.exe', Symbols loaded.

'Project.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC\gtk-sharp\2.8.0.0__35e10195dab3c99f\gtk-sharp.dll'

'Project.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC\glib-sharp\2.8.0.0__35e10195dab3c99f\glib-sharp.dll'

'Project.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC\atk-sharp\2.8.0.0__35e10195dab3c99f\atk-sharp.dll'

'Project.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'Project.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'Project.exe' (Managed): Loaded 'C:\WINNT\assembly\GAC\gdk-sharp\2.8.0.0__35e10195dab3c99f\gdk-sharp.dll'

 

(Project.exe:3364): Gtk-WARNING **: ../../../gtk+/gtk/gtktreestore.c:824: Unable to convert from GdkColor to gchararray

 

A first chance exception of type 'System.FormatException' occurred in mscorlib.dll

 

The above exception is repeated several times

 

 

A first chance exception of type 'System.ArgumentException' occurred in gdk-sharp.dll

 

The above exception is also repeated several times

 

'Project.exe' (Managed): Loaded 'D:\Project_1\build\bin\Debug\nunit.framework.dll'

 

(Project.exe:3364): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.

 

The above Warning is also repeated several times

 

Now this exception seems the problem because the exception thrown while crashing comes from  glib-sharp.dll

 

(Project.exe:3364): GLib-GObject-CRITICAL **: g_type_free_instance: assertion `instance != NULL && instance->g_class != NULL' failed

Exception while disposing a Project.ModuleWindow in Gtk#

A first chance exception of type 'System.AccessViolationException' occurred in glib-sharp.dll

The program '[3364] Project.exe: Managed' has exited with code 0 (0x0).

 

Application crashes with this message.

 

-Libin 

-----Original Message-----

Subject: Re: [Gtk-sharp-list] Exception on closing a window.

libin wrote:

> I am getting an exception while closing a child window using 'X'

> button of the window.

> The whole application is crashing after giving the following messages.

> Interestingly, this is only happening when running the application

> using .net framework and not when running the application using mono.

>

> We suspected some 'Dispose()' code in the OnDeleteEvent, but it is

> happening even if I comment the whole code inside OnDeleteEvent.

>

> Message: "*Attempted to read or write protected memory. This is often

> an indication that other memory is corrupt." *

> **

> Source: *glib-sharp*

>

> Stack Trace:

>

> * at GLib.Object.PerformQueuedUnrefs()

> at GLib.Timeout.TimeoutProxy.Handler()

> at Gtk.Application.gtk_main()

> at Gtk.Application.Run()

> at LmEdit.LmEdit.Main() in D:\Lm_Edit\src\common\LmEdit.cs:line 49*

> **

> Any help would be highly appreciated.

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com


_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@...
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Re: Exception on closing a window.

by Christian Hoff :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

libin wrote:

>
> *These are the warnings shown in the output console*
>
> **
>
>  
>
> *Now this exception seems the problem because the exception thrown
> while crashing comes from  glib-sharp.dll*
>
> **
>
> **(Project.exe:3364): GLib-GObject-CRITICAL **: g_type_free_instance:
> assertion `instance != NULL && instance->g_class != NULL' failed
>
> Exception while disposing a Project.ModuleWindow in Gtk#
>
> A first chance exception of type 'System.AccessViolationException'
> occurred in glib-sharp.dll
>
> The program '[3364] Project.exe: Managed' has exited with code 0 (0x0).
>
I have no idea what is really going on here, but it seems like an object
is disposed by your code before Gtk# tries to do that.

Set the environment variable "GTK_SHARP_DEBUG" to some value before you
run your program from the console. You should get a stack trace of the
GLib-Critical then. Post the stack trace to the list or file a bug
report with a small test case.

>
>  
>
> *Application crashes with this message.*
>
> >
>
> > Message: "*Attempted to read or write protected memory. This is often
>
> > an indication that other memory is corrupt." *
>
> > **
>
> > Source: *glib-sharp*
>
> >
>
> > Stack Trace:
>
> >
>
> > * at GLib.Object.PerformQueuedUnrefs()
>
> > at GLib.Timeout.TimeoutProxy.Handler()
>
> > at Gtk.Application.gtk_main()
>
> > at Gtk.Application.Run()
>
> > at LmEdit.LmEdit.Main() in D:\Lm_Edit\src\common\LmEdit.cs:line 49*
>
> > **
>
> > Any help would be highly appreciated.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list@...
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>  

_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@...
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Re: Exception on closing a window.

by libin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


 
I got cause of this problem.
Inside the child window (Which I am closing using 'x' button causing the
exception)code I am using 5 events of that window.

  1.WindowStateEvent
            2.ConfigureEvent
            3.FocusInEvent
            4.ResizeChecked
  5.DeleteEvent

And in configure event I am using with [GLib.ConnectBefore] attribute for
calling that event ahead of all.

When I am commenting the focusin event and resizechecked event the code is
running fine.

Is there any problem in using both of this events? Or whether there is any
problem in using these two events in conjunction with the configure event
with Glib.ConnectBefore?

Please throw some light on this.

Many Thanks,

Libin



-----Original Message-----
From: Christian Hoff [mailto:christian_hoff@...]
Sent: Wednesday, June 17, 2009 5:07 PM
To: libin
Cc: gtk-sharp-list@...
Subject: Re: [Gtk-sharp-list] Exception on closing a window.

libin wrote:

>
> *These are the warnings shown in the output console*
>
> **
>
>  
>
> *Now this exception seems the problem because the exception thrown
> while crashing comes from  glib-sharp.dll*
>
> **
>
> **(Project.exe:3364): GLib-GObject-CRITICAL **: g_type_free_instance:
> assertion `instance != NULL && instance->g_class != NULL' failed
>
> Exception while disposing a Project.ModuleWindow in Gtk#
>
> A first chance exception of type 'System.AccessViolationException'
> occurred in glib-sharp.dll
>
> The program '[3364] Project.exe: Managed' has exited with code 0 (0x0).
>
I have no idea what is really going on here, but it seems like an object is
disposed by your code before Gtk# tries to do that.

Set the environment variable "GTK_SHARP_DEBUG" to some value before you run
your program from the console. You should get a stack trace of the
GLib-Critical then. Post the stack trace to the list or file a bug report
with a small test case.

>
>  
>
> *Application crashes with this message.*
>
> >
>
> > Message: "*Attempted to read or write protected memory. This is
> > often
>
> > an indication that other memory is corrupt." *
>
> > **
>
> > Source: *glib-sharp*
>
> >
>
> > Stack Trace:
>
> >
>
> > * at GLib.Object.PerformQueuedUnrefs()
>
> > at GLib.Timeout.TimeoutProxy.Handler()
>
> > at Gtk.Application.gtk_main()
>
> > at Gtk.Application.Run()
>
> > at LmEdit.LmEdit.Main() in D:\Lm_Edit\src\common\LmEdit.cs:line 49*
>
> > **
>
> > Any help would be highly appreciated.
>
>
> ----------------------------------------------------------------------
> --
>
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list@...
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>  




Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com
_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@...
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Re: Exception on closing a window.

by libin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


 Any update on this guys??..

Am stuck with this :(

-----Original Message-----
From: libin [mailto:libin.mohanan@...]
Sent: Friday, June 19, 2009 12:24 PM
To: 'Christian Hoff'
Cc: 'gtk-sharp-list@...'
Subject: RE: [Gtk-sharp-list] Exception on closing a window.

 
I got cause of this problem.
Inside the child window (Which I am closing using 'x' button causing the
exception)code I am using 5 events of that window.

  1.WindowStateEvent
            2.ConfigureEvent
            3.FocusInEvent
            4.ResizeChecked
  5.DeleteEvent

And in configure event I am using with [GLib.ConnectBefore] attribute for
calling that event ahead of all.

When I am commenting the focusin event and resizechecked event the code is
running fine.

Is there any problem in using both of this events? Or whether there is any
problem in using these two events in conjunction with the configure event
with Glib.ConnectBefore?

Please throw some light on this.

Many Thanks,

Libin



-----Original Message-----
From: Christian Hoff [mailto:christian_hoff@...]
Sent: Wednesday, June 17, 2009 5:07 PM
To: libin
Cc: gtk-sharp-list@...
Subject: Re: [Gtk-sharp-list] Exception on closing a window.

libin wrote:

>
> *These are the warnings shown in the output console*
>
> **
>
>  
>
> *Now this exception seems the problem because the exception thrown
> while crashing comes from  glib-sharp.dll*
>
> **
>
> **(Project.exe:3364): GLib-GObject-CRITICAL **: g_type_free_instance:
> assertion `instance != NULL && instance->g_class != NULL' failed
>
> Exception while disposing a Project.ModuleWindow in Gtk#
>
> A first chance exception of type 'System.AccessViolationException'
> occurred in glib-sharp.dll
>
> The program '[3364] Project.exe: Managed' has exited with code 0 (0x0).
>
I have no idea what is really going on here, but it seems like an object is
disposed by your code before Gtk# tries to do that.

Set the environment variable "GTK_SHARP_DEBUG" to some value before you run
your program from the console. You should get a stack trace of the
GLib-Critical then. Post the stack trace to the list or file a bug report
with a small test case.

>
>  
>
> *Application crashes with this message.*
>
> >
>
> > Message: "*Attempted to read or write protected memory. This is
> > often
>
> > an indication that other memory is corrupt." *
>
> > **
>
> > Source: *glib-sharp*
>
> >
>
> > Stack Trace:
>
> >
>
> > * at GLib.Object.PerformQueuedUnrefs()
>
> > at GLib.Timeout.TimeoutProxy.Handler()
>
> > at Gtk.Application.gtk_main()
>
> > at Gtk.Application.Run()
>
> > at LmEdit.LmEdit.Main() in D:\Lm_Edit\src\common\LmEdit.cs:line 49*
>
> > **
>
> > Any help would be highly appreciated.
>
>
> ----------------------------------------------------------------------
> --
>
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list@...
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>  




Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com
_______________________________________________
Gtk-sharp-list maillist  -  Gtk-sharp-list@...
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list