Page 1 of 1

DocuVieware 3.2.20 provokes a TypeLoadException

Posted: Tue Mar 21, 2023 10:15 am
by lchorley
Greetings team DocuVieware,

I have just updated DocuVieware and GdPicture to the, as of this moment, latest versions which are the 3.2.20 and 14.2.20 respectively.
The only real change that I made apart from the update is to use the nuget package for integrating GdPicture instead of via dlls which was imposed by DocuVieware I believe. (nuget package : GdPicture.API and NewtonSoft 13.0.3)
I'm now getting the following error.
Any ideas ?

Thanking you in advance
Loren

Code: Select all

2023-03-20 16:58:29 [15:58:29 ERROR] An unhandled exception has occurred while executing the request. {"EventId": {"Id": 1, "Name": "UnhandledException"}, "SourceContext": "Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware", "RequestId": "0HMP9B84RHMTE:00000002", "RequestPath": "/is-pfd/viewer-app", "ConnectionId": "0HMP9B84RHMTE", "Application": "Isagri.Documents.Viewer"}
2023-03-20 16:58:29 System.TypeLoadException: A ByRef-like type cannot be used as the type for an instance field in a non-ByRef-like type.
2023-03-20 16:58:29    at ProtoBuf.Serializer.Serialize[T](Stream destination, T instance, Object userState)
2023-03-20 16:58:29    at ProtoBuf.Serializer.Serialize[T](Stream destination, T instance)
2023-03-20 16:58:29    at ᜔.ᜉ()
2023-03-20 16:58:29    at ᜖.ᜀ(᜔ A_0, Boolean A_1)
2023-03-20 16:58:29    at ᜔..ctor(String A_0, Int32 A_1, DocuViewareControlState A_2, Boolean A_3)
2023-03-20 16:58:29    at ᜕.ᜀ(String A_0, DocuViewareControlState A_1, Boolean A_2, Int32 A_3, Boolean A_4, Boolean A_5, Boolean& A_6)
2023-03-20 16:58:29    at GdPicture14.WEB.DocuViewareControl..ctor(String SessionID, String ClientID, Int32 Timeout)
2023-03-20 16:58:29    at Isagri.DocumentsViewer.Pages.Pages_Index.ExecuteAsync() in C:\outils.tfs\DocumentsViewer\Main\src\Viewer\DV.WebSite\Pages\Index.cshtml:line 92
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeResultAsync>g__Logged|22_0(ResourceInvoker invoker, IActionResult result)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|30_0[TFilter,TFilterAsync](ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext[TFilter,TFilterAsync](State& next, Scope& scope, Object& state, Boolean& isCompleted)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
2023-03-20 16:58:29 --- End of stack trace from previous location ---
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
2023-03-20 16:58:29    at Isagri.AspNetCore.Authentication.Middleware.AuthenticationMiddleware.Invoke(HttpContext context, IAuthenticationService authService)
2023-03-20 16:58:29    at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

Re: DocuVieware 3.2.20 provokes a TypeLoadException

Posted: Fri Mar 24, 2023 8:43 am
by anshadali
Hi team,
I got the same Issue with the latest version.
Please help me to figure out the issue.

Code: Select all

System.TypeLoadException: A ByRef-like type cannot be used as the type for an instance field in a non-ByRef-like type.
   at ProtoBuf.Serializer.Serialize[T](Stream destination, T instance, Object userState)
   at ᜔.ᜉ()
   at ᜖.ᜀ(᜔ A_0, Boolean A_1)
   at GdPicture14.WEB.DocuViewareManager.CreateDocuViewareSession(String SessionID, String ClientID, Int32 Timeout)
   at angular15_rest_core.Controllers.DocuViewareRestController.GetDocuViewareControl(DocuViewareConfiguration controlConfiguration) in C:\Anshad Files\TestApps\new  testapp\angular15_rest_core\angular15_rest_core\Controllers\DocuViewareRestController.cs:line 22
   at lambda_method7(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
[/quote]

Re: DocuVieware 3.2.20 provokes a TypeLoadException

Posted: Mon Mar 27, 2023 2:36 pm
by Fabio
Hello there,

This issue should be corrected in our latest release.
It occurred on the .NET 6.0 API version of our DLL.

If the issue remains, could you please create a ticket on our helpdesk with a way to reproduce it, please? (sample or guideline)
-> https://orpalis.zendesk.com/hc/en-us/requests/new

Best regards,
Fabio

Re: DocuVieware 3.2.20 provokes a TypeLoadException

Posted: Mon Mar 27, 2023 4:54 pm
by lchorley
Hello Fabio

Thank you, I've tried 3.2.21 and after a lot of reloading of packages, it doesn't seem to be doing this any more. But I have further problems after that. I've created a second thread as it pertains to a different issue

Thank you for you help !
Loren