dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.47k stars 4.76k forks source link

Issue with Aspose PDF library under net6.0 #59327

Closed theolivenbaum closed 3 years ago

theolivenbaum commented 3 years ago

Description

I've updated our app to net6.0 since it got the go-live release, and I'm hitting an issue with an external library we use. The code to set the license to the library works fine under net5.0, but fails with an exception under net6.0. As they use obfuscation to hide their code, its hard to know what could be the issue. I'll report this to them as well, but I was hoping this to work without problems on net6.0, so maybe there was some breaking change affecting this?

Configuration

Works: 5.0.206 [C:\Program Files\dotnet\sdk] Crashes: 6.0.100-rc.1.21458.32 [C:\Program Files\dotnet\sdk] Code to reproduce the bug: https://github.com/theolivenbaum/aspose.pdf.net6.0.bug

I've added a "evaluation license" from Aspose in the repository so you can test.

Regression?

Yes, it works on all previous versions up to net5.0. I've not tested with other preview releases from net6.0, just the RC1.

Other information

Unhandled exception. System.Exception: Exception of type 'System.Exception' was thrown.
   at #=q4IEUrftjYU$par8Q9LJ00tW0gvtn27t33MOXq5jf7M0=.#=zm2cl7e0sXMFI6CAz8GMWXa_CMUfb(Byte[] #=zk9pPDeEfDHy22YjFMAlVx0cxiTST)
   at #=q4IEUrftjYU$par8Q9LJ00tW0gvtn27t33MOXq5jf7M0=.#=zPVpv3SzZ1CG$Di_ZuxYXoFoj07C2.#=zxt3_HDWhjN$4oMngrT44m9fvCgAl(#=zs8gGwxHrwrLZ9DXJuKXjng$xZuQI #=zsbRRE7AVBvV3yHW9uMR0FY578JqX)
   at #=q4IEUrftjYU$par8Q9LJ00tW0gvtn27t33MOXq5jf7M0=.#=zTqtbr11T7uz9hvN15ZLrQ0E=(String #=z3Wip5cJegV_KU1U2UCRZzT0G7YSz)
   at #=qllKshT1pDip__5yQ1ZgMiWDnbgdvt6nJ0fuG6Etljzo=.#=zf7dkfEHN3MSp_16VNe0pi9j03P_u.#=zqIcwKZMDy3Q8$arprL6dpBZ2D5JB(String #=zA4HqL1Q6fx2uPZWw9_3LJVI=)
   at #=qllKshT1pDip__5yQ1ZgMiWDnbgdvt6nJ0fuG6Etljzo=.#=zf7dkfEHN3MSp_16VNe0pi9j03P_u.#=zAdY_up4H0SHCQ_WxCsKHAaiqiR0f()
   at #=qllKshT1pDip__5yQ1ZgMiWDnbgdvt6nJ0fuG6Etljzo=.#=zHJlfs2Em$KlgrYM_MYqEa2_WTDpn(String #=zUtwuUIQ=)
   at #=qllKshT1pDip__5yQ1ZgMiWDnbgdvt6nJ0fuG6Etljzo=.#=zeipXVKFia$bbNYxCsJFt9FUXD$7u(Object #=zOnlNdH_Up8Kjb9JvdUt$InO7FyKI, ResolveEventArgs #=zHhfzUp9CFMKt9iHTtaNZ6ysSXwSR)
   at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name)
   at System.Runtime.Loader.AssemblyLoadContext.OnResourceResolve(RuntimeAssembly assembly, String resourceName)
   at System.Reflection.RuntimeAssembly.GetResource(QCallAssembly assembly, String resourceName, UInt32& length)
   at System.Reflection.RuntimeAssembly.GetManifestResourceStream(String name)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zxuF$jnLgINNQfljIuekeJx2UcJzXGCQgp6ZT7fL$rkwB(Object #=ztP_oExU=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=z3oKjnwT0PKmWpniwq5pmOBOAq38bbeWXfFSxHck=(MethodBase #=ztP_oExU=, Boolean #=zAnxkIpI=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=z8xO7ggDamJCJdp_W1pIVojSMG97gOz5o5BfcaIQ=(#=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4= #=ztP_oExU=, #=q1qifqgbfO3$0lc0sUiNkrTaSFK1NEzFbCILcNw5ryyY= #=zAnxkIpI=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zeUIgvJDdEIsbJe6MKA==()
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zFbEgpGbjV$l48im3Ipw7MFmbN7GbaHuddQ==(Boolean #=ztP_oExU=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zxuF$jnLgINNQfljIuekeJx2UcJzXGCQgp6ZT7fL$rkwB(Object #=ztP_oExU=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=z0wv4aWr_StW7lzxSbLraXQc=()
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zWHkNMgef8e8BbSeDK1w928k=(#=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4= #=ztP_oExU=, #=q1qifqgbfO3$0lc0sUiNkrTaSFK1NEzFbCILcNw5ryyY= #=zAnxkIpI=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zeUIgvJDdEIsbJe6MKA==()
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zFbEgpGbjV$l48im3Ipw7MFmbN7GbaHuddQ==(Boolean #=ztP_oExU=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zxuF$jnLgINNQfljIuekeJx2UcJzXGCQgp6ZT7fL$rkwB(Object #=ztP_oExU=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=z0wv4aWr_StW7lzxSbLraXQc=()
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zeIevjL$Sx855B4bMruEAuR_ZPCBAV8OEI1OZfyM=(Object #=ztP_oExU=, UInt32 #=zAnxkIpI=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zFbEgpGbjV$l48im3Ipw7MFmbN7GbaHuddQ==(Boolean #=ztP_oExU=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zFbEgpGbjV$l48im3Ipw7MFmbN7GbaHuddQ==(Boolean #=ztP_oExU=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zNqP3E2sQff20dJ05o_iXWIThVoi2Sk_nmGhVExA=(Object[] #=ztP_oExU=, Type[] #=zAnxkIpI=, Type[] #=zmX1PT28=, Object[] #=zbYQAeF8=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zMtmAM_kxJVPx8bWzheDKWsk=(Int32 #=ztP_oExU=, Type[] #=zAnxkIpI=, Type[] #=zmX1PT28=, Boolean #=zbYQAeF8=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zPuoA45XCMdHlYrbSXg==(#=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4= #=ztP_oExU=, #=q1qifqgbfO3$0lc0sUiNkrTaSFK1NEzFbCILcNw5ryyY= #=zAnxkIpI=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zeUIgvJDdEIsbJe6MKA==()
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zFbEgpGbjV$l48im3Ipw7MFmbN7GbaHuddQ==(Boolean #=ztP_oExU=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zxuF$jnLgINNQfljIuekeJx2UcJzXGCQgp6ZT7fL$rkwB(Object #=ztP_oExU=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=z0wv4aWr_StW7lzxSbLraXQc=()
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zeIevjL$Sx855B4bMruEAuR_ZPCBAV8OEI1OZfyM=(Object #=ztP_oExU=, UInt32 #=zAnxkIpI=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zFbEgpGbjV$l48im3Ipw7MFmbN7GbaHuddQ==(Boolean #=ztP_oExU=)
   at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zNqP3E2sQff20dJ05o_iXWIThVoi2Sk_nmGhVExA=(Object[] #=ztP_oExU=, Type[] #=zAnxkIpI=, Type[] #=zmX1PT28=, Object[] #=zbYQAeF8=)
   at Aspose.Pdf.License.SetLicense(String licenseName)
   at Program.<Main>$(String[] args) in c:\dev\aspose.pdf.net60.bug\Program.cs:line 4
dotnet-issue-labeler[bot] commented 3 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

ghost commented 3 years ago

Tagging subscribers to this area: @vitek-karas, @agocke, @vsadov See info in area-owners.md if you want to be subscribed.

Issue Details
### Description I've updated our app to net6.0 since it got the go-live release, and I'm hitting an issue with an external library we use. The code to set the license to the library works fine under net5.0, but fails with an exception under net6.0. As they use obfuscation to hide their code, its hard to know what could be the issue. I'll report this to them as well, but I was hoping this to work without problems on net6.0, so maybe there was some breaking change affecting this? ### Configuration Works: 5.0.206 [C:\Program Files\dotnet\sdk] Crashes: 6.0.100-rc.1.21458.32 [C:\Program Files\dotnet\sdk] Code to reproduce the bug: https://github.com/theolivenbaum/aspose.pdf.net6.0.bug I've added a "evaluation license" from Aspose in the repository so you can test. ### Regression? Yes, it works on all previous versions up to net5.0. I've not tested with other preview releases from net6.0, just the RC1. ### Other information ````` Unhandled exception. System.Exception: Exception of type 'System.Exception' was thrown. at #=q4IEUrftjYU$par8Q9LJ00tW0gvtn27t33MOXq5jf7M0=.#=zm2cl7e0sXMFI6CAz8GMWXa_CMUfb(Byte[] #=zk9pPDeEfDHy22YjFMAlVx0cxiTST) at #=q4IEUrftjYU$par8Q9LJ00tW0gvtn27t33MOXq5jf7M0=.#=zPVpv3SzZ1CG$Di_ZuxYXoFoj07C2.#=zxt3_HDWhjN$4oMngrT44m9fvCgAl(#=zs8gGwxHrwrLZ9DXJuKXjng$xZuQI #=zsbRRE7AVBvV3yHW9uMR0FY578JqX) at #=q4IEUrftjYU$par8Q9LJ00tW0gvtn27t33MOXq5jf7M0=.#=zTqtbr11T7uz9hvN15ZLrQ0E=(String #=z3Wip5cJegV_KU1U2UCRZzT0G7YSz) at #=qllKshT1pDip__5yQ1ZgMiWDnbgdvt6nJ0fuG6Etljzo=.#=zf7dkfEHN3MSp_16VNe0pi9j03P_u.#=zqIcwKZMDy3Q8$arprL6dpBZ2D5JB(String #=zA4HqL1Q6fx2uPZWw9_3LJVI=) at #=qllKshT1pDip__5yQ1ZgMiWDnbgdvt6nJ0fuG6Etljzo=.#=zf7dkfEHN3MSp_16VNe0pi9j03P_u.#=zAdY_up4H0SHCQ_WxCsKHAaiqiR0f() at #=qllKshT1pDip__5yQ1ZgMiWDnbgdvt6nJ0fuG6Etljzo=.#=zHJlfs2Em$KlgrYM_MYqEa2_WTDpn(String #=zUtwuUIQ=) at #=qllKshT1pDip__5yQ1ZgMiWDnbgdvt6nJ0fuG6Etljzo=.#=zeipXVKFia$bbNYxCsJFt9FUXD$7u(Object #=zOnlNdH_Up8Kjb9JvdUt$InO7FyKI, ResolveEventArgs #=zHhfzUp9CFMKt9iHTtaNZ6ysSXwSR) at System.Runtime.Loader.AssemblyLoadContext.InvokeResolveEvent(ResolveEventHandler eventHandler, RuntimeAssembly assembly, String name) at System.Runtime.Loader.AssemblyLoadContext.OnResourceResolve(RuntimeAssembly assembly, String resourceName) at System.Reflection.RuntimeAssembly.GetResource(QCallAssembly assembly, String resourceName, UInt32& length) at System.Reflection.RuntimeAssembly.GetManifestResourceStream(String name) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zxuF$jnLgINNQfljIuekeJx2UcJzXGCQgp6ZT7fL$rkwB(Object #=ztP_oExU=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=z3oKjnwT0PKmWpniwq5pmOBOAq38bbeWXfFSxHck=(MethodBase #=ztP_oExU=, Boolean #=zAnxkIpI=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=z8xO7ggDamJCJdp_W1pIVojSMG97gOz5o5BfcaIQ=(#=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4= #=ztP_oExU=, #=q1qifqgbfO3$0lc0sUiNkrTaSFK1NEzFbCILcNw5ryyY= #=zAnxkIpI=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zeUIgvJDdEIsbJe6MKA==() at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zFbEgpGbjV$l48im3Ipw7MFmbN7GbaHuddQ==(Boolean #=ztP_oExU=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zxuF$jnLgINNQfljIuekeJx2UcJzXGCQgp6ZT7fL$rkwB(Object #=ztP_oExU=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=z0wv4aWr_StW7lzxSbLraXQc=() at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zWHkNMgef8e8BbSeDK1w928k=(#=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4= #=ztP_oExU=, #=q1qifqgbfO3$0lc0sUiNkrTaSFK1NEzFbCILcNw5ryyY= #=zAnxkIpI=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zeUIgvJDdEIsbJe6MKA==() at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zFbEgpGbjV$l48im3Ipw7MFmbN7GbaHuddQ==(Boolean #=ztP_oExU=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zxuF$jnLgINNQfljIuekeJx2UcJzXGCQgp6ZT7fL$rkwB(Object #=ztP_oExU=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=z0wv4aWr_StW7lzxSbLraXQc=() at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zeIevjL$Sx855B4bMruEAuR_ZPCBAV8OEI1OZfyM=(Object #=ztP_oExU=, UInt32 #=zAnxkIpI=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zFbEgpGbjV$l48im3Ipw7MFmbN7GbaHuddQ==(Boolean #=ztP_oExU=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zFbEgpGbjV$l48im3Ipw7MFmbN7GbaHuddQ==(Boolean #=ztP_oExU=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zNqP3E2sQff20dJ05o_iXWIThVoi2Sk_nmGhVExA=(Object[] #=ztP_oExU=, Type[] #=zAnxkIpI=, Type[] #=zmX1PT28=, Object[] #=zbYQAeF8=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zMtmAM_kxJVPx8bWzheDKWsk=(Int32 #=ztP_oExU=, Type[] #=zAnxkIpI=, Type[] #=zmX1PT28=, Boolean #=zbYQAeF8=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zPuoA45XCMdHlYrbSXg==(#=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4= #=ztP_oExU=, #=q1qifqgbfO3$0lc0sUiNkrTaSFK1NEzFbCILcNw5ryyY= #=zAnxkIpI=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zeUIgvJDdEIsbJe6MKA==() at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zFbEgpGbjV$l48im3Ipw7MFmbN7GbaHuddQ==(Boolean #=ztP_oExU=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zxuF$jnLgINNQfljIuekeJx2UcJzXGCQgp6ZT7fL$rkwB(Object #=ztP_oExU=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=z0wv4aWr_StW7lzxSbLraXQc=() at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zeIevjL$Sx855B4bMruEAuR_ZPCBAV8OEI1OZfyM=(Object #=ztP_oExU=, UInt32 #=zAnxkIpI=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zFbEgpGbjV$l48im3Ipw7MFmbN7GbaHuddQ==(Boolean #=ztP_oExU=) at #=qhjhU8nqLJtFY8LRMoZFhVoeECt_CgG4DqITeBJqkpr4=.#=zNqP3E2sQff20dJ05o_iXWIThVoi2Sk_nmGhVExA=(Object[] #=ztP_oExU=, Type[] #=zAnxkIpI=, Type[] #=zmX1PT28=, Object[] #=zbYQAeF8=) at Aspose.Pdf.License.SetLicense(String licenseName) at Program.
$(String[] args) in c:\dev\aspose.pdf.net60.bug\Program.cs:line 4 `````
Author: theolivenbaum
Assignees: -
Labels: `area-AssemblyLoader-coreclr`, `untriaged`
Milestone: -
Whiletru3 commented 3 years ago

FYI, Same issue with the Net6 RC2

Whiletru3 commented 3 years ago

according to this post https://forum.aspose.com/t/aspose-pdf-setlicense-throws-under-net6-0/235277/7 , issue is still there with Net6 official release

agocke commented 3 years ago

Sorry, with obfuscation it's very difficult to tell whether this is a runtime bug or a product issue with the library. We would need a non-obfuscated form of the binary to investigate further.

theolivenbaum commented 3 years ago

@agocke we might be out of luck here then, I doubt they will provide anything here. I've posted the issue on their forum, but no follow up till now.

Whiletru3 commented 3 years ago

they fixed this issue in version 21.11 So it is definitely not a runtime bug, for me you can close this issue