Question on T@X 2021 / Elster transmission (German tax declaration program)

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Dieter Jurzitza
Newbie
Newbie
Posts: 1
Joined: Tue May 25, 2021 12:59 pm

Question on T@X 2021 / Elster transmission (German tax declaration program)

Post by Dieter Jurzitza »

Dear listmembers,
I am using the above mentioned application for creating my annual tax declaration (since years, mostly flawlessly with wine).
This year (nearly ...) everything went smoothly as well, however: when I finally want to hand over the declaration to the government via "Elster" the application freezes. So I am missing one final command before happiness ...
I started debugging via WINEDEBUG=+relay what created a ~ 30 GByte logfile prior to the apperance of the final message window of death, denoting "Fatal error. Do you want to continue?".
Interestingly there is no "YES" "NO" checkbox, but only the cross at the right upper corner instead killing the entire application.
I tried wine 6.8, wine 6.9, wine 6.0 - on five different computers, all show the same phenomenon.
I searched for the "MessageBox" in the logfile and checked somewhat above for anything that looks like a "Fatal exception", "Kernel panic", whatsoever - in vain. To me (most) of the messages look normal, however I found:

KERNEL32.RaiseException(e06d7363,00000001,00000003,0021b15c) ret=3635c28c

what can I do further - any idea?
Just for the records, I opened a bug report as well (#51139), however, nobody had had the time to look into (more than understandable ...) until now. However I would really love to issue my tax declaration - hence any support / idea how to continue debugging / how to better filter than "+relay" would be very much appreciated :-).
Thank you for reading through this,
take care


Dieter Jurzitza
andrew.smart
Level 2
Level 2
Posts: 33
Joined: Thu Dec 15, 2016 3:08 am

Re: Question on T@X 2021 / Elster transmission (German tax declaration program)

Post by andrew.smart »

Hello,

You can reduce the verbosity of the +relay: https://wiki.winehq.org/Wine_Developer% ... _behaviour

I have a set of convenient .reg files I swap out as needed to shrink the relay size to something more manageable. Here is one example you can try and build on if you want:

Code: Select all

$ cat ~/.config/wine/filter-wine-except-strings.reg 
REGEDIT4

[HKEY_CURRENT_USER\Software\Wine\Debug]
"RelayExclude"="ntdll.RtlEnterCriticalSection;ntdll.RtlTryEnterCriticalSection;ntdll.RtlLeaveCriticalSection;kernel32.48;kernel32.49;kernel32.94;kernel32.95;kernel32.96;kernel32.97;kernel32.98;kernel32.TlsGetValue;kernel32.TlsSetValue;kernel32.FlsGetValue;kernel32.FlsSetValue;kernel32.SetLastError;ntdll.RtlTimeToTimeFields;ntdll.RtlUTF8ToUnicodeN;ucrtbase.bsearch;ucrtbase.strcmp;KERNEL32.ReadProcessMemory;ntdll.RtlSizeHeap;ntdll.NtReadVirtualMemory;combase.CoTaskMemAlloc;KERNEL32.MultiByteToWideChar;ntdll.NtEnumerateValueKey;ucrtbase.towlower;ucrtbase.iswalpha;ucrtbase.iswspace;ucrtbase.iswalnum;ucrtbase._wcsnicmp;ucrtbase._wcsicmp;KERNEL32.SetFilePointerEx;ntdll.NtSetInformationFile;KERNEL32.ReadFile;ntdll.NtReadFile;KERNEL32.LCMapStringW;ntdll.RtlAllocateHeap;msvcr120.free;ucrtbase.free;ucrtbase.memset;ucrtbase.memcmp;ucrtbase.malloc;ucrtbase.memcpy;msvcr120.memcpy;ntdll.memcpy;ntdll.RtlNtStatusToDosError;KERNEL32.IsBadStringPtrW;ntdll.RtlFreeHeap;KERNEL32.HeapFree;;msvcrt.memcpy;msvcr120.memcpy_s;msvcrt.memcmp;msvcrt.iswcntrl;ntdll._wcsicmp;ntdll.NtQueryDefaultLocale;ntdll.LdrAccessResource;ntdll.LdrFindResource_U;ntdll.NtQueryValueKey;ntdll.NtEnumerateKey;advapi32.RegOpenKeyExW;advapi32.RegQueryValueExW;setupapi.SetupDiGetDevicePropertyW;ntdll.RtlInitializeCriticalSection;ntdll.RtlIsDosDeviceName_U;ntdll.RtlFreeUnicodeString;ntdll.RtlLockHeap;ntdll.RtlUnlockHeap;ntdll.NtOpenKeyEx;advapi32.RegOpenKeyW;msvcr120.realloc;msvcr120.malloc;msvcr120.tolower;msvcr120.toupper;msvcr120.memset;KERNEL32.InterlockedDecrement;KERNEL32.GlobalLock;KERNEL32.GlobalUnlock;KERNEL32.LockFileEx;KERNEL32.UnlockFileEx;ntdll.NtLockFile;ntdll.NtUnlockFile;msvcr120.feof;user32.GetDpiForSystem;ntdll.RtlDowncaseUnicodeChar;msvcr120.memcmp;msvcr120.ldiv;"
You're welcome to read that wiki page and run that command to figure out the lines taking up the most space, and add them to your RelayExclude if they're just noise.

Here is the gist of a helper script I use:

Code: Select all

$ cat /home/gaming/wine_jail/bin/0_exports.sh 
export WINE=/opt/wine-staging/bin/wine
export WINEPREFIX=/home/gaming/.bnet
export WINEDEBUG=-all

Code: Select all

$ /home/gaming/wine_jail/bin/0_exports.sh
$ $WINE regedit ~/.config/wine/filter-wine-except-strings.reg
This technique in logging is helpful to know: https://wiki.winehq.org/Wine_Developer% ... ing_output

Excerpts from the above wiki:

Code: Select all

$ mknod /tmp/debug_pipe p
$ $WINE setup.exe &>/tmp/debug_pipe
And on other terminal:

Code: Select all

$ cat /tmp/debug_pipe
Ctrl+c on that other terminal to halt that cat, which also halts WINE's execution, until that /tmp/debug_pipe is read from again.

Once you are about to approach the problematic part of the program, you ctrl+c the original cat, and you just do:

Code: Select all

$ cat /tmp/debug_pipe >> /tmp/wine.log
Also you can add in your own notes into the log as you're navigating the program, e.g.:

Code: Select all

$ echo "PRESSING OK ON MESSAGE BOX" >> /tmp/wine.log
or:

Code: Select all

$ echo "SHUTTING DOWN APP" >> /tmp/wine.log
or even prefixing the log before you start with bookkeeping info:

Code: Select all

$ echo "Wine version:" >> /tmp/wine.log
$ $WINE --version >> /tmp/wine.log
You can then search for your notes later in the log, and use them as "landmarks" in order to orient yourself.

Remember that >> appends, and > will replace the file.

The RelayExclude and also this technique in logging will help you substantially shrink down that log file.

My guess is that e06d7363 is an application specific exception was defined by a programmer of that application (I have not looked/verified this). If possible you could contact their support and ask them about that exception to get context. Personally I'd dig into the wine log and figure out what is going wrong as you'd have to do that anyway in order to get Wine working. I might be reading this situation wrong though.

EDIT: This looked informative, maybe this is the same exception https://devblogs.microsoft.com/oldnewth ... 0/?p=13273

Other suggestions:
Look for what is happening before the application-specific exception is raised. Search for 'exception', or ':seh:'. Looking for error return codes in the relay RETs might be illuminating. You can then add and refine WINEDEBUG trace channels and rerun as necessary to get better information. You can probably spend hours and hours doing this, trying to figure things out- I have.

I'm really an amateur at this others might be able to help far better.
andrew.smart
Level 2
Level 2
Posts: 33
Joined: Thu Dec 15, 2016 3:08 am

Re: Question on T@X 2021 / Elster transmission (German tax declaration program)

Post by andrew.smart »

Ok, I looked at the 3rd log you attached on the bug you opened on Bugzilla: https://bugs.winehq.org/show_bug.cgi?id=51139

I looked above the line you mentioned:

Code: Select all

KERNEL32.RaiseException(e06d7363,00000001,00000003,0021b15c) ret=3635c28c
And saw:

Code: Select all

0104:Call KERNEL32.LoadLibraryW(37018ed8 L"d2d1.dll") ret=35cb3b2a
0104:Call ntdll.RtlInitUnicodeString(0021ac08,37018ed8 L"d2d1.dll") ret=7b024597
0104:Ret  ntdll.RtlInitUnicodeString() retval=00000012 ret=7b024597
0104:Call ntdll.LdrGetDllPath(37018ed8 L"d2d1.dll",00000000,0021abb4,0021abb8) ret=7b023590
0104:Ret  ntdll.LdrGetDllPath() retval=00000000 ret=7b023590
0104:Call ntdll.LdrLoadDll(3e88f2d8 L"C:\\Program Files (x86)\\Buhl finance\\tax Steuersoftware 2021;C:\\windows\\system32;C:\\windows\\system;C:\\windows;.;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem",00000000,0021ac08,0021abb0) ret=7b023633
0104:Ret  ntdll.LdrLoadDll() retval=c0000135 ret=7b023633
0104:Call ntdll.RtlNtStatusToDosError(c0000135) ret=7b023691
0104:Ret  ntdll.RtlNtStatusToDosError() retval=0000007e ret=7b023691
0104:Call ntdll.RtlRunOnceExecuteOnce(7b09dce0,7b06e7a0,00000000,00000000) ret=7b06b678
0104:Ret  ntdll.RtlRunOnceExecuteOnce() retval=00000000 ret=7b06b678
0104:Call ntdll.wcscpy(0021aa68,7b09dd14 L"") ret=7b07241f
0104:Ret  ntdll.wcscpy() retval=0021aa68 ret=7b07241f
0104:Call ntdll.RtlReleasePath(3e88f2d8) ret=7b023648
0104:Ret  ntdll.RtlReleasePath() retval=00000001 ret=7b023648
0104:Ret  KERNEL32.LoadLibraryW() retval=00000000 ret=35cb3b2a
0104:Call KERNEL32.RaiseException(e06d7363,00000001,00000003,0021ac88) ret=3635c28c
You can find explanations for the error codes here: https://docs.microsoft.com/en-us/window ... rror-codes

Reference for NtStatus c0000135:

Code: Select all

0xC0000135
STATUS_DLL_NOT_FOUND
{Unable To Locate Component} This
application has failed to start because
%hs was not found. Reinstalling the
application might fix this problem.
Reference for DosError 0000007e:

Code: Select all

ERROR_MOD_NOT_FOUND

126 (0x7E)

The specified module could not be found.
Here is a reference for d2d1.dll: https://windows10dll.nirsoft.net/d2d1_dll.html

Wine appears to supply a builtin d2d1.dll so I'm not sure why it isn't being found in your log. Two suggestions:
  1. Find out why builtin d2d1.dll isn't being found.
  2. Try installing native d2d1.dll
I glanced through winetricks source to see if it had any helpers to install a native d2d1.dll and didn't see one. winetricks could possibly be modified to do so, or the dll copied from an existing MS Windows install.

But yet, your writing in bugzilla indicates that the builtin d2d1.dll was found and was in use in at least one of the environments you tried. Suggesting possibly:
  • your wine prefix for the 3rd log was improperly or failed to set up (thus missing the dll),
  • maybe after the failure to find d2d1.dll it looked again in a different location with success, but these lines were filtered out, or
  • these lines were manually filtered out to make a small log for upload to bugzilla:

Code: Select all

0280:fixme:d2d:d2d_geometry_sink_SetSegmentFlags iface 224E25A0, flags 0 stub!
0280:fixme:dwrite:dwritefactory3_GetSystemFontCollection checking for system font updates not implemented
0280:fixme:d2d:d2d_geometry_sink_SetSegmentFlags iface 3FEF9020, flags 0 stub!
0280:fixme:d2d:d2d_path_geometry_ComputeArea iface 3FEF8F88, transform 0021A7E0, tolerance 2.50000000e-01, area 0021A7DC stub!
0280:fixme:d2d:d2d_geometry_sink_SetSegmentFlags iface 3FEF99C8, flags 0 stub!
Anyway best for me not to speculate without trying the software myself, you can figure things out.

Another suggestion if it is in your ability is to implement the missing features which appear to be necessary for your application: https://source.winehq.org/git/wine.git/ ... ry.c#l2502

You seem quite motivated so maybe you're already investigating this. If you have more questions just ask here or on IRC.
andrew.smart
Level 2
Level 2
Posts: 33
Joined: Thu Dec 15, 2016 3:08 am

Re: Question on T@X 2021 / Elster transmission (German tax declaration program)

Post by andrew.smart »

P.S. Awesome patents. Reminds me of Alexander Graham Bell. I supported some electronics engineers in a power electronics lab while in University myself... writing software to support their work. I highly recommend this Open-source EEZ Studio for accessing SCPI instruments: https://www.eevblog.com/forum/testgear/ ... struments/ I just had to mention that software. Very very useful for automating and recording measurements, running tests, etc. My limited experience is that it would be very useful for power electronics experiments, but most all computer controlled multimeters and scopes use SCPI as well, not just power supplies and loads. But then again I wouldn't be surprised if where-ever you've worked has had an in-house equivalent... likely without the technical benefits of open-source though.

But, back on the topic of this tax software, if you want quick paid/premier support then you're welcome to email Code Weavers.

Forgive my lack of terminology earlier, "builtin" d2d1.dll means Wine's "builtin" replacement. "native" d2d1.dll means from "native" MS Windows.

Yes... copying a native d2d1.dll from MS Windows and setting winecfg to use that "native" dll might be the approach most likely to work with minimal time spent on your part. But again, I am just an amateur with Wine so no guarantees.
andrew.smart
Level 2
Level 2
Posts: 33
Joined: Thu Dec 15, 2016 3:08 am

Re: Question on T@X 2021 / Elster transmission (German tax declaration program)

Post by andrew.smart »

More evidence regarding d2d1.dll not being found:

Code: Select all

0104:Call KERNEL32.LoadLibraryW(37018ed8 L"d2d1.dll") ret=35cb3b2a
...
0104:Ret  KERNEL32.LoadLibraryW() retval=00000000 ret=35cb3b2a
0104:Call KERNEL32.RaiseException(e06d7363,00000001,00000003,0021ac88) ret=3635c28c
See documentation on KERNEL32.LoadLibraryW: https://docs.microsoft.com/en-us/window ... adlibraryw

Code: Select all

Return value
If the function succeeds, the return value is a handle to the module.

If the function fails, the return value is NULL. To get extended error information, call GetLastError.
In the line that says "Ret KERNEL32.LoadLibraryW" you can see the return value: "retval=00000000", which means NULL is the return value. The function had failed.

In the relay you provided GetLastError isn't called after the KERNEL32.LoadLibraryW call (meaning the software engineer who wrote the software did not gracefully test for this possibility). Probably meaning the handle (NULL) is used as if it were valid, and thus the exception. Again, why d2d1.dll isn't found I have no idea without trying to replicate the issue myself, and I do apologize that is not something I'm willing to do.
dspezz
Newbie
Newbie
Posts: 2
Joined: Sat Jul 03, 2021 12:01 pm

Re: Question on T@X 2021 / Elster transmission (German tax declaration program)

Post by dspezz »

Copying the native 32bit d2d1.dll version 7.0.6002.18107 from dll-files.com into the application folder and setting up wine to use the native d2d1.dll fixed the problem for me.
dspezz
Newbie
Newbie
Posts: 2
Joined: Sat Jul 03, 2021 12:01 pm

Re: Question on T@X 2021 / Elster transmission (German tax declaration program)

Post by dspezz »

I can confirm: "copying a native d2d1.dll from MS Windows and setting winecfg to use that "native" dll" worked for me. I used 32bit Version 7.0.6002.18107 from dll-files.com and copied it directly into the application folder of T@x.

After that every thing including Elster works.
yminus
Newbie
Newbie
Posts: 2
Joined: Sun Oct 24, 2021 4:27 pm

Re: Question on T@X 2021 / Elster transmission (German tax declaration program)

Post by yminus »

Where can I find a native d2d1.dll?
yminus
Newbie
Newbie
Posts: 2
Joined: Sun Oct 24, 2021 4:27 pm

Re: Question on T@X 2021 / Elster transmission (German tax declaration program)

Post by yminus »

yminus wrote: Sun Oct 24, 2021 4:33 pm Where can I find a native d2d1.dll?
Sorry, the answer is here: viewtopic.php?t=35318#p133592
Locked