Exports with plugin views crash Smart Client.

Hi,

I have a integrator who has one customer were exports from plugin view items won’t work. Other installations they have works fine and it also works fine if exporting only native views.

They use 2023 R3, and when the export project is opened, the Smart Client crashes directly after loading. Can be reproduced on any machine.

This is the call stack Smart Client gives before it dies:

************** Outer Exception **************
Exception type:System.NullReferenceException
Exception message:Object reference not set to an instance of an object.
Exception source:VideoOS.RemoteClient.Application
Exception Target Site: Onboard
   at VideoOS.RemoteClient.Application.Managers.FileManagers.OnboardManager.Onboard()
   at VideoOS.RemoteClient.Application.Application.<CompleteLoginAsync>d__116.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VideoOS.RemoteClient.Application.Application.<>c__DisplayClass112_0.<<ProceedLoginAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at VideoOS.RemoteClient.Application.Managers.LoginExtensionManager.<uiTasks_Completed>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Don’t know how to debug this further. Any ideas?

I have an idea that you could debug the plugin like you do with more ordinary use of plugins in the Smart Client, only in this scenario get visual Studio to open the player/the export.. I am not sure but hoping it will give you information to solve the issue.

https://developer.milestonesys.com/s/article/debugging-techniques-for-Smart-Client-plugins

Thank you, Bo! The thing is that the export project crashes even if I remove our plugin folder completely from the export project (I double-checked that non of our DLLs have been loaded into the process at the time of the crash). As you can see from the call-stack, it is only Milestone/Microsoft modules involved. Maybe someone knows what is happening during the specific call in the call-stack? “CompleteLoginAsync”?

I tested with our DataExport plugin sample. (https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/dataexport/readme.html&tree=tree_1.html)

If I make an export including the plugin and data, then remove the plugin from the export (and from the general folder where it could be loaded from instead), then open the export, then it crashes with the same crash.

I have an idea that the Smart Client player should handle this better and not crash in this way. However it cannot load the plugin which I removed so it could never be a no error situation.

What I believe we can learn or guess is that in your situation your plugin is not exported correctly so that when you try to open the export it does not load, which then causes the exception.

If you look at the export, does your plugin appear to be correctly exported or can you see that parts are missing or similar?