Window with Gecko WebControl does not reopen

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

Window with Gecko WebControl does not reopen

by Colin Beckingham :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a window A which contains a button which opens a new window B containing a WebControl. Each time the button in window A is pressed a new instance of window B opens with a different URL exposed in the B WebControl. This works fine repeatedly with new windows provided at least one child window remains open.

As soon as all child windows have been closed then a press on the button in window A crashes the application with the following stacktrace when the method ShowAll() is applied to the window:


  at (wrapper managed-to-native) Gtk.Widget.gtk_widget_show_all (intptr) <0x00004>
  at (wrapper managed-to-native) Gtk.Widget.gtk_widget_show_all (intptr) <0xffffffff>
  at Gtk.Widget.ShowAll () [0x00000] in /usr/src/packages/BUILD/gtk-sharp-2.12.1/gtk/generated/Widget.cs:6228
  at reports.report.rpt (string) [0x00153] in /home/colin/mobo/mobo/reports.cs:101
.....

I can put in a check that at least one window remains, but I am wondering if I am missing something else important?

Re: Window with Gecko WebControl does not reopen

by Chris Howie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Aug 6, 2008 at 10:15 AM, colbec <colbec@...> wrote:
> I have a window A which contains a button which opens a new window B
> containing a WebControl. Each time the button in window A is pressed a new
> instance of window B opens with a different URL exposed in the B WebControl.
> This works fine repeatedly with new windows provided at least one child
> window remains open.
>
> As soon as all child windows have been closed then a press on the button in
> window A crashes the application with the following stacktrace when the
> method ShowAll() is applied to the window:

Yes, I had this same issue.  My solution was to create a WebControl
and hold a reference to it while the program is open.  This seems to
be enough to keep it happy.

--
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers
_______________________________________________
Mono-list maillist  -  Mono-list@...
http://lists.ximian.com/mailman/listinfo/mono-list

Re: Window with Gecko WebControl does not reopen

by Colin Beckingham :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Chris Howie-3 wrote:
On Wed, Aug 6, 2008 at 10:15 AM, colbec <colbec@start.ca> wrote:
> I have a window A which contains a button which opens a new window B
> containing a WebControl. Each time the button in window A is pressed a new
> instance of window B opens with a different URL exposed in the B WebControl.
> This works fine repeatedly with new windows provided at least one child
> window remains open.
>
> As soon as all child windows have been closed then a press on the button in
> window A crashes the application with the following stacktrace when the
> method ShowAll() is applied to the window:

Yes, I had this same issue.  My solution was to create a WebControl
and hold a reference to it while the program is open.  This seems to
be enough to keep it happy.

--
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
Thanks for this suggestion of a dummy instance. At first it looked very good, in the MonoDevelop IDE the solution works very well, but when I run the app from the CLI it fails. I have updated my library refs to indicate that the libgtkembedmoz.so is in /usr/lib/xulrunner-1.8.1.13/.

In trying to trap the error in the CLI context I get "Object reference not set to an instance of an object" even though monodevelop thinks there is a reference. The window with the WebControl opens, but the control itself is missing. The rest of the app works fine from the CLI.

Re: Window with Gecko WebControl does not reopen

by Colin Beckingham :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


colbec wrote:
Chris Howie-3 wrote:
On Wed, Aug 6, 2008 at 10:15 AM, colbec <colbec@start.ca> wrote:
> I have a window A which contains a button which opens a new window B
> containing a WebControl. Each time the button in window A is pressed a new
> instance of window B opens with a different URL exposed in the B WebControl.
> This works fine repeatedly with new windows provided at least one child
> window remains open.
>
> As soon as all child windows have been closed then a press on the button in
> window A crashes the application with the following stacktrace when the
> method ShowAll() is applied to the window:

Yes, I had this same issue.  My solution was to create a WebControl
and hold a reference to it while the program is open.  This seems to
be enough to keep it happy.

--
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
Thanks for this suggestion of a dummy instance. At first it looked very good, in the MonoDevelop IDE the solution works very well, but when I run the app from the CLI it fails. I have updated my library refs to indicate that the libgtkembedmoz.so is in /usr/lib/xulrunner-1.8.1.13/.

In trying to trap the error in the CLI context I get "Object reference not set to an instance of an object" even though monodevelop thinks there is a reference. The window with the WebControl opens, but the control itself is missing. The rest of the app works fine from the CLI.
Temporarily resolved. This is what I did:
1. copid the shell script 'monodevelop' into a new file 'monoxxxx'
2. edit the script to remove mentions of monodevelop, leaving the other instructions
3. run mono from this new script such as
CLI> monoxxxx yyyyyy.exe

and now the WebControl behaves as expected in both monodevelop and run from the CLI.