GeckoFX does not work on visual studio 2013

465 Views Asked by At

i use GeckoFX 22 and xulrunner 22. \After set a GeckoWebBrowser to a Winform program, a lot of work of my program done well, but when i set set a GeckoNode, it did not work, VS2013 throw an Exception with note:

"An exception of type 'System.NullReferenceException' occurred in Fifa17.exe but was not handled in user code Additional information: Object reference not set to an instance of an object."

my code in that VS2013 throw an Exception is like that:

    GeckoNode gncMatchEvents = myBrowser.Document.GetElementById("content").ChildNodes[0];

The mistery is that: if i do not set a GeckoNode, another compose of GeckoFX still work like that:

    textBox1.Text = myBrowser.Document.GetElementById("content").ChildNodes[0].Length.ToString();

It's reaaly difficult to understand for me, thank for the answer.

1

There are 1 best solutions below

0
On

i could repair the problem. There no any thing wrong in my code, but when i changed the version of GeckoFx and Xulrunner, everything run smoothly. I changed to GeckoFx29 and Xulrunner29 and running on street. But if i use GeckoFx14 and Xulrunner14, it's also run well. I was crazy in a week because that hell.