Help decrypting logs for Affinity Designer Linux

Questions about Wine on Linux
Locked
bitsandnumbers
Newbie
Newbie
Posts: 2
Joined: Tue Jan 28, 2020 4:49 am

Help decrypting logs for Affinity Designer Linux

Post by bitsandnumbers »

Hi,

After an attempt to run Affinity products (https://affinity.serif.com) on Linux through Wine, a small community of people at https://forum.affinity.serif.com/index. ... lly-works/ have managed to make Affinity Designer work partially. One major issue though is that once one try to draw anything on a document canvas, the app crash abruptly with this log :

Code: Select all

002d:fixme:wincodecs:ImagingFactory_CreateEncoder ignoring vendor GUID
002d:fixme:path:parse_url failed to parse L"System.Drawing"
003d:fixme:d3d9:d3d9_swapchain_Present Ignoring dirty_region 0000000049F70680.
002d:fixme:d2d:d2d_factory_CreatePathGeometry1 iface 0000000050A97C70, geometry 0000000050BED798 stub!
002d:fixme:ver:GetCurrentPackageId (0x528ce0 (nil)): stub
002d:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime"): stub
002d:fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00000402,(nil),0x0001,0x00000000,0x52ad20,(nil)): stub
002d:err:eventlog:ReportEventW L"Application: Designer.exe\nFramework Version: v4.0.30319\nDescription: The process was terminated due to an unhandled exception.\nException Info: System.AccessViolationException\n   at Serif.Interop.Persona.UserInterface.DocumentRenderControl.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean"...
002d:fixme:advapi:DeregisterEventSource (0xcafe4242) stub

Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at Serif.Interop.Persona.UserInterface.DocumentRenderControl.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndHost.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.IntGetMessageW(MSG& msg, HandleRef hWnd, Int32 uMsgFilterMin, Int32 uMsgFilterMax)
   at MS.Win32.UnsafeNativeMethods.GetMessageW(MSG& msg, HandleRef hWnd, Int32 uMsgFilterMin, Int32 uMsgFilterMax)
   at System.Windows.Threading.Dispatcher.GetMessage(MSG& msg, IntPtr hwnd, Int32 minMessage, Int32 maxMessage)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at Designer.Application.Main(String[] args)
[49:54:20200127,021034.200:WARNING pe_image_reader.cc:168] CodeView debug entry of unexpected size in C:\windows\system32\gecko\2.47.1\wine_gecko\xul.dll
[49:54:20200127,021034.200:WARNING pe_image_reader.cc:168] CodeView debug entry of unexpected size in C:\windows\system32\gecko\2.47.1\wine_gecko\lgpllibs.dll
[49:54:20200127,021034.201:WARNING pe_image_reader.cc:168] CodeView debug entry of unexpected size in C:\windows\system32\gecko\2.47.1\wine_gecko\nss3.dll
[49:54:20200127,021034.201:WARNING pe_image_reader.cc:168] CodeView debug entry of unexpected size in C:\windows\system32\gecko\2.47.1\wine_gecko\mozglue.dll
[49:54:20200127,021034.418:WARNING in_range_cast.h:38] value 1801439851048861696 out of range
[49:54:20200127,021034.418:WARNING in_range_cast.h:38] value 2522015791595913216 out of range
[49:54:20200127,021034.418:WARNING in_range_cast.h:38] value 2522015791595913216 out of range
[49:54:20200127,021034.418:WARNING in_range_cast.h:38] value 2522015791595913216 out of range
[49:54:20200127,021034.418:WARNING in_range_cast.h:38] value 17969751061706849340 out of range
[49:54:20200127,021034.418:WARNING in_range_cast.h:38] value 4107282863668330496 out of range
[49:54:20200127,021034.419:WARNING in_range_cast.h:38] value 17807833401688850432 out of range
[49:54:20200127,021034.419:WARNING in_range_cast.h:38] value 13835058059560353792 out of range
[49:54:20200127,021034.419:WARNING in_range_cast.h:38] value 18237070513411433216 out of range
[49:54:20200127,021034.419:WARNING in_range_cast.h:38] value 18374686483949813760 out of range
[49:54:20200127,021034.419:WARNING in_range_cast.h:38] value 18443917233609506560 out of range
[49:54:20200127,021034.419:WARNING in_range_cast.h:38] value 18446742978492890880 out of range
[49:54:20200127,021034.419:WARNING in_range_cast.h:38] value 18446742978492890880 out of range
[49:54:20200127,021034.419:WARNING in_range_cast.h:38] value 18441374063186893568 out of range
[49:54:20200127,021034.419:WARNING in_range_cast.h:38] value 18402943932766879744 out of range
[49:54:20200127,021034.420:WARNING in_range_cast.h:38] value 18430353658152550656 out of range
[49:54:20200127,021034.420:WARNING in_range_cast.h:38] value 18446742978448349184 out of range
[49:54:20200127,021034.420:WARNING in_range_cast.h:38] value 18434875764793933824 out of range
[49:54:20200127,021034.420:WARNING in_range_cast.h:38] value 18403509081765334016 out of range
[49:54:20200127,021034.420:WARNING in_range_cast.h:38] value 18435440922360545280 out of range
[49:54:20200127,021034.420:WARNING in_range_cast.h:38] value 13837036079922218752 out of range
[49:54:20200127,021034.420:WARNING in_range_cast.h:38] value 18436006079927156736 out of range
[49:54:20200127,021034.420:WARNING in_range_cast.h:38] value 18436571237493768192 out of range
[49:54:20200127,021034.420:WARNING in_range_cast.h:38] value 18436853816277073920 out of range
0032:fixme:kernelbase:AppPolicyGetProcessTerminationMethod FFFFFFFFFFFFFFFA, 000000000022FA80
We think it may be related to .NET as we can see by looking for this kind of issue on a search engine. The investigation stops here though, as we are not familiar enough with Windows or Wine to nail this issue further on.

My personal Wine settings (which provide the same outcome as for the others) :

- Wine Lutris 5.0 (which provide Vulkan support) or Lutris VKChildWindow 5.0rc2 (both provide the same outcome) ---- Standard Wine 5.0 does not work
- DXVK version 1.4.6 (newer versions throw another error and crash before displaying a new document, whereas this version actually display a document but crash when one tries to draw anything on it)
- D9VK disabled
- MSCMS dll override with n,b value

So as we're stuck at this stage, we're looking for help on the matter.
Thanks
qwertymnb
Level 4
Level 4
Posts: 237
Joined: Sun Jan 17, 2016 4:36 pm

Re: Help decrypting logs for Affinity Designer Linux

Post by qwertymnb »

Hi, I gave this a try and run into the same error...
- Tested https://store.serif.com/en-us/update/windows/photo/1/ and then version 1.7.2 (Affinity Photo)
- Installed dotnet35sp1 and dotnet40 dotnet48 and dxvk151 with winetricks.

I can confirm dxvk151 does not fully work, i had to set d3d9 to builtin (somehow dxvk sets it to native (???))

The crash is apparently probably caused by:

002d:fixme:d2d:d2d_factory_CreatePathGeometry1 iface 0000000050A97C70, geometry 0000000050BED798 stub!

I attach a (wrong) hack that enabled me to draw a line and type some text. Program will probably break/crash when using other features, it`s mainly to pinpoint where the crash comes from....

Tested with tk-glitch and the below patch (save as some_name.mypatch ,and put in directory wine-tkg-userpatches/ before compiling).

(Side-note: I know lutris/tk-glitch is not supported here, but both wine nor Staging got me to the canvas screen...)

Code: Select all

diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c
index 48a2efb96b..1b9e3132e6 100644
--- a/dlls/d2d1/factory.c
+++ b/dlls/d2d1/factory.c
@@ -445,8 +445,19 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory2 *i
 static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry1(ID2D1Factory2 *iface, ID2D1PathGeometry1 **geometry)
 {
     FIXME("iface %p, geometry %p stub!\n", iface, geometry);
+    struct d2d_geometry *object;
 
-    return E_NOTIMPL;
+    TRACE("iface %p, geometry %p.\n", iface, geometry);
+
+    if (!(object = heap_alloc_zero(sizeof(*object))))
+        return E_OUTOFMEMORY;
+
+    d2d_path_geometry_init(object, (ID2D1Factory *)iface);
+
+    TRACE("Created path geometry %p.\n", object);
+    *geometry = (ID2D1PathGeometry1 *)&object->ID2D1Geometry_iface;
+
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock1(ID2D1Factory2 *iface,
Screenshot from 2020-01-29 18-27-46.png
Regards
bitsandnumbers
Newbie
Newbie
Posts: 2
Joined: Tue Jan 28, 2020 4:49 am

Re: Help decrypting logs for Affinity Designer Linux

Post by bitsandnumbers »

Thank you @qwertymnb ! I didn't have time to test until now and it really work, even if display refresh is not always working (you have to move your the canvas to refresh the display). Apart from that, I didn't find anything that didn't work for now.

So if I understand correctly, it's a "simple" d2d geometry issue, but what exactly did your patch do ? And why does it work only with wine-tk-glitch ?

Anyway, awesome job, thank you again !
qwertymnb wrote: Wed Jan 29, 2020 12:53 pm Hi, I gave this a try and run into the same error...
- Tested https://store.serif.com/en-us/update/windows/photo/1/ and then version 1.7.2 (Affinity Photo)
- Installed dotnet35sp1 and dotnet40 dotnet48 and dxvk151 with winetricks.

I can confirm dxvk151 does not fully work, i had to set d3d9 to builtin (somehow dxvk sets it to native (???))

The crash is apparently probably caused by:

002d:fixme:d2d:d2d_factory_CreatePathGeometry1 iface 0000000050A97C70, geometry 0000000050BED798 stub!

I attach a (wrong) hack that enabled me to draw a line and type some text. Program will probably break/crash when using other features, it`s mainly to pinpoint where the crash comes from....

Tested with tk-glitch and the below patch (save as some_name.mypatch ,and put in directory wine-tkg-userpatches/ before compiling).

(Side-note: I know lutris/tk-glitch is not supported here, but both wine nor Staging got me to the canvas screen...)

Code: Select all

diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c
index 48a2efb96b..1b9e3132e6 100644
--- a/dlls/d2d1/factory.c
+++ b/dlls/d2d1/factory.c
@@ -445,8 +445,19 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_CreateStrokeStyle1(ID2D1Factory2 *i
 static HRESULT STDMETHODCALLTYPE d2d_factory_CreatePathGeometry1(ID2D1Factory2 *iface, ID2D1PathGeometry1 **geometry)
 {
     FIXME("iface %p, geometry %p stub!\n", iface, geometry);
+    struct d2d_geometry *object;
 
-    return E_NOTIMPL;
+    TRACE("iface %p, geometry %p.\n", iface, geometry);
+
+    if (!(object = heap_alloc_zero(sizeof(*object))))
+        return E_OUTOFMEMORY;
+
+    d2d_path_geometry_init(object, (ID2D1Factory *)iface);
+
+    TRACE("Created path geometry %p.\n", object);
+    *geometry = (ID2D1PathGeometry1 *)&object->ID2D1Geometry_iface;
+
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock1(ID2D1Factory2 *iface,
Screenshot from 2020-01-29 18-27-46.png

Regards
qwertymnb
Level 4
Level 4
Posts: 237
Joined: Sun Jan 17, 2016 4:36 pm

Re: Help decrypting logs for Affinity Designer Linux

Post by qwertymnb »

Hi,
bitsandnumbers wrote: Tue Feb 04, 2020 2:01 pm
So if I understand correctly, it's a "simple" d2d geometry issue, but what exactly did your patch do ?
[/quote]

Good question but I`m just ignorant on this stuff as well ;)
I just copied/pasted code for CreatePathGeometry (in same source file) into CreatePathGeometry1 so it returns a (i guess rather similar) implemented method instead of returning (fatal) E_NOTIMPL, and apparently Affinity seems happy enough with it. I think once the other bugs that prevent Affinity Photo from running in wine/staging are resolved, it would be worth to open a bugreport for this issue.
And why does it work only with wine-tk-glitch ?
I think it`s this bug: https://bugs.winehq.org/show_bug.cgi?id=45277

Affinity Photo is also mentioned in that bugreport. Could be checked by applying the patch in that bugreport on top of Staging i think.

Regards
nymusicman
Newbie
Newbie
Posts: 1
Joined: Mon Mar 09, 2020 3:24 pm

Re: Help decrypting logs for Affinity Designer Linux

Post by nymusicman »

Well, after following all instructions (TKG wine with patch, dxvk 1.4.6) I still can't open or save files.

I can start a new file and draw stuff, apply effects, change colors, etc... but all that is a bit useless if I can't save, open or import anything.

Oddly enough, I can export through Designer.

This is what I get when trying to save or open a file.

Code: Select all

01f1:fixme:sxs:SxsLookupClrGuid Ignored flags: 10000
01f1:fixme:commdlg:IFileDialog2_fnQueryInterface Unknown interface requested: {c3fcc19e-a970-11d2-8b5a-00a0c9b7c9c4}.
01f1:fixme:commdlg:IFileDialog2_fnQueryInterface Unknown interface requested: {b196b283-bab4-101a-b69c-00aa00341d07}.
01f1:fixme:commdlg:IFileDialog2_fnQueryInterface Unknown interface requested: {af86e2e0-b12d-4c6a-9c5a-d7aa65101e90}.
01f1:fixme:commdlg:IFileDialog2_fnQueryInterface Unknown interface requested: {ecc8691b-c1db-4dc0-855e-65f6c551af49}.
01f1:fixme:commdlg:IFileDialog2_fnQueryInterface Unknown interface requested: {94ea2b94-e9cc-49e0-c0ff-ee64ca8f5b90}.
01f1:fixme:commdlg:IFileDialog2_fnQueryInterface Unknown interface requested: {00000003-0000-0000-c000-000000000046}.
01f1:fixme:commdlg:IFileDialog2_fnQueryInterface Unknown interface requested: {00000144-0000-0000-c000-000000000046}.
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {c3fcc19e-a970-11d2-8b5a-00a0c9b7c9c4} (unknown)
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {b196b283-bab4-101a-b69c-00aa00341d07} (unknown)
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {af86e2e0-b12d-4c6a-9c5a-d7aa65101e90} (unknown)
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {ecc8691b-c1db-4dc0-855e-65f6c551af49} (unknown)
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {94ea2b94-e9cc-49e0-c0ff-ee64ca8f5b90} (unknown)
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {00000003-0000-0000-c000-000000000046} (unknown)
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {00000144-0000-0000-c000-000000000046} (unknown)
01f1:fixme:commdlg:IServiceProvider_fnQueryService Interface {e07010ec-bc17-44c0-97b0-46c7c95b9edc} requested from unknown service {e07010ec-bc17-44c0-97b0-46c7c95b9edc}
01f1:fixme:shell:ViewModeToListStyle ViewMode 0 not implemented
01f1:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x46671700 (2, 1026, a003, 0, 0xafc658)
01f1:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x46671700 (2, 1026, a004, 0, 0xafc658)
01f1:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x46671700 (2, 1025, a003, 1, 0xafc658)
01f1:fixme:shell:IShellBrowser_fnSendControlMsg stub, 0x46671700 (2, 1025, a004, 1, 0xafc658)
01f1:fixme:nstc:NSTC2_fnSetControlStyle2 mask & style (0x00000004) contains unsupported style(s): 0x00000004
01f1:fixme:wtsapi:WTSUnRegisterSessionNotification Stub 00000000005000BE
0046:fixme:ole:Context_CC_ContextCallback (0000000040677820/0000000040677828)->(000000000141E910, 000000001AA5F788, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, 0000000000000000)
0046:fixme:ole:Context_CC_ContextCallback (0000000040677820/0000000040677828)->(000000000141E910, 000000001AA5F688, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, 0000000000000000)
01f1:fixme:wtsapi:WTSUnRegisterSessionNotification Stub 00000000005200C6
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {c3fcc19e-a970-11d2-8b5a-00a0c9b7c9c4} (unknown)
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {b196b283-bab4-101a-b69c-00aa00341d07} (unknown)
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {af86e2e0-b12d-4c6a-9c5a-d7aa65101e90} (unknown)
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {ecc8691b-c1db-4dc0-855e-65f6c551af49} (unknown)
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {94ea2b94-e9cc-49e0-c0ff-ee64ca8f5b90} (unknown)
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {00000003-0000-0000-c000-000000000046} (unknown)
01f1:fixme:shell:ShellItem_QueryInterface not implemented for {00000144-0000-0000-c000-000000000046} (unknown)
00e7:fixme:ktmw32:CreateTransaction (0000000000000000 0000000000000000 0x1 0x0 0x0, 0, L"File rename"): stub
00e7:fixme:file:MoveFileTransactedW (L"C:\\users\\nymusicman\\Application Data\\Affinity\\Photo\\1.0\\temp\\5e6bd682", L"C:\\users\\nymusicman\\Desktop\\untitled.afphoto", (nil), (nil), 11, 0x1)
wine: Call from 0x7b00fd5e to unimplemented function vcruntime140_1.dll.__CxxFrameHandler4, aborting
00e7:fixme:seh:call_stack_handlers nested exception
wine: Call from 0x7b00fd5e to unimplemented function vcruntime140_1.dll.__CxxFrameHandler4, aborting
00e7:fixme:seh:call_stack_handlers nested exception
00e7:fixme:seh:call_stack_handlers nested exception
Przemas
Level 2
Level 2
Posts: 14
Joined: Fri Nov 17, 2017 6:52 am

Re: Help decrypting logs for Affinity Designer Linux

Post by Przemas »

would be awesome to have it running correctly. I can start it with dxvk 1.4.6 , but on save it crashes immediately. In the logs I get:

Code: Select all

[51:56:20200508,134954.722:ERROR cpu_context_win.cc:144] non-x64 context
[51:56:20200508,134954.866:WARNING pe_image_reader.cc:181] CodeView debug entry of unexpected size in C:\windows\system32\gecko\2.47.1\wine_gecko\xul.dll
[51:56:20200508,134954.868:WARNING pe_image_reader.cc:181] CodeView debug entry of unexpected size in C:\windows\system32\gecko\2.47.1\wine_gecko\lgpllibs.dll
[51:56:20200508,134954.869:WARNING pe_image_reader.cc:181] CodeView debug entry of unexpected size in C:\windows\system32\gecko\2.47.1\wine_gecko\nss3.dll
[51:56:20200508,134954.871:WARNING pe_image_reader.cc:181] CodeView debug entry of unexpected size in C:\windows\system32\gecko\2.47.1\wine_gecko\mozglue.dll
Game is considered exited.
mvlad
Newbie
Newbie
Posts: 1
Joined: Sat Feb 08, 2020 9:41 am

Re: Help decrypting logs for Affinity Designer Linux

Post by mvlad »

According to Mark Ingram on the Affinity forums;
There is a log file that's normally written to %APPDATA%\Affinity\Photo\1.0\Log.txt that may contain information about the reasons for the crash.
Maybe looking in that folder (but the one made for Designer) and comparing the logs with the wine logs might yield some results?
Locked