Hi all,
I'm trying to get xulrunner embedded into a WX application, but the
application keeps coring.  A really stripped down version (error
checking illiminated for readability) of the code looks like:
<includes snipped>
class MyApp: public wxApp {
public:
  virtual bool OInit();
  int OnExi() {return 1; }
}

IMPLEMENT_APP_NO_MAIN(MyApp)
int main(int argc, char **argv) {
  return exEntry(argc, argv);
}

bool MyApp::OnInt() {
  myFrame = new wxFrame( NULL, "WxWindow", wxPoint(100, 100), wxSize
(400, 400), wxDEFAULT_FRAME_STYLE);
  myFrame->Show(TRUE);

  nsCOMPtr<nsIBaseWindow> baseWindow;
  nsCOMPtr<nsIWebBrowser> webBrowser;
  nsCOMPtr<nsIWebNavigation> webNavigation;

  int rv;
  NS_InitEmbeddingEmbedding(nsnull, nsnull);
  webBrowser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID, &rv);
  baseWindow = do_QueryInterface(webBrowser);
  baseWindow->InitWindow(myFrame->m_wxWindow, 0, 0, 0, 300, 400);
  baseWindow->Create();
  baseWindow->SetVisibility(PR_TRUE);
  webNavigation = doQueryInterface(webBrowser);
  webNavigation->LoadURI(NS_LITERAL_STRING("http://www.google.com";).get
(), nsIWebNavigation::LOAD_FLAGS_NONE, 0, 0, 0);
  return true;
}

When I run the problem, the stack trace generated is:
[1] mutex_lock_impl()
[2] atomic_pointer_get()
[3] gdk_drawable_get_type()
[4] gdk_drawable_unref()
[5] nsGTKToolkit::CreateSharedGC(this=0x5ce088), line 93
[6] nsGTKToolkit::Init(this=0x5ce088, aThread=0x52e908), line 107
[7] ns_GetCurrentToolkit(aResult=0x5cfb28), line 148
[8] nsBaseWidget::BaseCreate(this=0xcfb00, aParent=(nil),
aRect=STRUCT, aHandleEventFunction=0x7d599068 =
&nsWebBrowser::HandleEvent(), aContext=(nil), aAppShell=(nill),
aToolkit=(nil), aInitData=0xffbf9b80), line 182
[9] nsWindow::NativeCreate(this=0xcfb00, aParent=(nil),
aNativeParent=0x52b058, aRect=STRUCT, aHandleEventFunction=0x7d599068
= &nsWebBrowser::HandleEvent(), aContext=(nil), aAppShell=(nill),
aToolkit=(nil), aInitData=0xffbf9b80), line 3032
[10] nsWindow::Create(this=0x5cfb00, aParent=0x52b058, aRect=STRUCT,
aHandleEventFunction=0x7d599068 = &nsWebBrowser::HandleEvent(),
aContext=(nil), aAppShell=(nill), aToolkit=(nil),
aInitData=0xffbf9b80), line 3032
[11] nsWebBrowser::Create(this=0x5cfb00), line 1132
[12] MyApp::OnInit(this = 0x500688), lnie 126
.
.
.

I am running on Solaris 10, using Sun's Forte 10 compiler.  The
version numbers of the software I am using are:
glib 2.14.1
gtk 2.12.0
wx 2.8.3
xulrunner 1.9

I know that this is a long shot, but I am pulling my hair out.  Does
anyone have any ideas for things to try?  Thanks for the help,
Bryce
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to