Page 1 of 1

Crash on button click in plugin dll

Posted: 15 May 2014, 19:44
by noesis_user
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 =

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

//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*>

 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?


Re: Crash on button click in plugin dll

Posted: 16 May 2014, 21:12
by sfernandez
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?

Re: Crash on button click in plugin dll

Posted: 20 May 2014, 11:30
by sfernandez
Have you managed to reproduce this issue again?
Can you provide a sample so we can fix it?

Re: Crash on button click in plugin dll

Posted: 23 May 2014, 18:07
by noesis_user
Fixed this !!

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