noesis_user
Topic Author
Posts: 14
Joined: 08 May 2014, 00:04

Crash on button click in plugin dll

15 May 2014, 19:44

Hello,
We have a plugin architecture for that we are adding plugin xaml root to mainwindow xaml. The plugin root is sent to plugin dll to access its components and events.

At core side:
Noesis::Gui::FrameworkElement* main_root = (Noesis::Gui::FrameworkElement*)(mUIRoot);

Noesis::Core::Ptr<Noesis::Gui::FrameworkElement> root =
            Noesis::Gui::LoadXaml<Noesis::Gui::FrameworkElement>(xaml_filename.c_str());

 panel->GetChildren()->Add((Noesis::Core::BaseComponent*) root.GetPtr());
   
renderFrame();

//Passing plugin xaml root to plugin dll
_plugin->setGuiRoot((Noesis::Core::BaseComponent*) root.GetPtr());
At Plugin dll:
Noesis::Gui::FrameworkElement* p1_root = (Noesis::Gui::FrameworkElement*)root_;
      
  Noesis::Gui::RadioButton* expand_patient_list_button = NsStaticCast<RadioButton*>
  (p1_root>FindName("RadioExpandCaseLoader"));

 expand_patient_list_button->Click() += MakeDelegate(this,&SetCaseLoaderGui::OnExpandPatientListButtonClicked);
Now it gets valid button pointer n all but when we click on that it crashes in MouseButtonUp event in Noesis.dll (renderer). What could lead this crash?

Thanks.
 
User avatar
sfernandez
Site Admin
Posts: 1942
Joined: 22 Dec 2011, 19:20

Re: Crash on button click in plugin dll

16 May 2014, 21:12

I don't see anything wrong in your code.
Could you please provide a bit more information? What kind of crash are you getting? Could you attach a crash dump?
 
User avatar
sfernandez
Site Admin
Posts: 1942
Joined: 22 Dec 2011, 19:20

Re: Crash on button click in plugin dll

20 May 2014, 11:30

Have you managed to reproduce this issue again?
Can you provide a sample so we can fix it?
 
noesis_user
Topic Author
Posts: 14
Joined: 08 May 2014, 00:04

Re: Crash on button click in plugin dll

23 May 2014, 18:07

Fixed this !!

Plugin object was getting destroyed before it could use it so was the crash.

Who is online

Users browsing this forum: Google [Bot] and 2 guests