Editor Utility Widgets Feedback

in that case, i have some issues with the functions that are available. when i call any functions that are being called by the viewport toolbar, it crashes my project and gives me an error regarding the following:

Can not open the new map because the current map can not been garbage collected.
Conflict with a shared pointer.
No errors-> Unhandled Exception.
Do not use engine flags (this is for internal use only). DO NOT USE.

Also, when the editor widget is left opened, it crashes, when i reopen my project. the window where the widget used to be would be empty, i would click on my button to open a new level, and it would crashed and one of the following errors above.

I would use the one of the following functions
ToggleGameView()
ToggleActorCameraView()
bool bLocked;
SetGameView()

Is there a certain process that I am missing to have the ability to call editor functions within my editor widget?