https://bugs.winehq.org/show_bug.cgi?id=45273
Bug ID: 45273 Summary: Chessbase 11 cannot draw arrows Product: Wine Version: 3.9 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdiplus Assignee: wine-bugs@winehq.org Reporter: dav75uk@yahoo.co.uk Distribution: ---
Similar issue to
https://bugs.winehq.org/show_bug.cgi?id=42809
but with slightly differing unimplemented requirements from GdipWidenPath. Originally mentioned on https://bugs.winehq.org/show_bug.cgi?id=37275
In this case:
0064:fixme:gdiplus:brush_fill_pixels path gradient blend not implemented 0064:fixme:gdiplus:resample_bitmap_pixel Unimplemented interpolation 7 0064:fixme:gdiplus:GdipSetCustomLineCapStrokeCaps not implemented 0064:fixme:gdiplus:GdipWidenPath unimplemented end cap ff 0064:fixme:gdiplus:GdipWidenPath unimplemented end cap ff
The first two error messages have been around a long while so are probably unrelated.
The last two (same) messages are multiplied for each extra arrow drawn, which probably indicates only the last needs to be implemented.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #1 from David dav75uk@yahoo.co.uk --- I believe the problem is that:
GpStatus WINGDIPAPI GdipSetCustomLineCapStrokeCaps(GpCustomLineCap* custom, GpLineCap start, GpLineCap end)
cannot be implemented because GpCustomLineCap does not have anywhere to store the values of the start and end caps.
Novell's implementation: https://stuff.mit.edu/afs/athena/software/mono_v4.9/arch/amd64.../customline...
stores these values in GpCustomLineCap so it's likely wine's structure is incomplete.
I'm guessing somewhere that pen picks up these values and so when GdipWidenPath is called these values now exist. Whether that's enough for the arrow to get drawn remains to be seen.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #2 from David dav75uk@yahoo.co.uk --- So I tried a nieve fix by adding the fields above, implementing GdipSetCustomLineCapStrokeCaps and getting the values from the customcaps in the set start and end caps in the pen routines. This got rid of the fixme in GdipWidenPath, however all that happened is the arrow stem had rounded edges. So either my fix was incorrect, or there is additional work to get chessbase to display arrows (such as fixes to the arrow routine).
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #3 from David dav75uk@yahoo.co.uk --- After a bit more investigation I suspect the problem is just that GdipWidenPath can't handle a custom end cap and while they look like arrows, I suspect they are custom arrows. Thus this is more unimplemented code rather than issues with start and end caps.
https://bugs.winehq.org/show_bug.cgi?id=45273
Bartosz gang65@poczta.onet.pl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gang65@poczta.onet.pl
--- Comment #4 from Bartosz gang65@poczta.onet.pl --- @David could you please share your code with the patches?
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #5 from David dav75uk@yahoo.co.uk --- This was too long ago. As my comments above I applied a very naive fix to stop it complaining as detailed. This should be easy for someone familiar with the code to redo. It only quietened the fixme warning, it didn't result in arrows as I guess they are custom and needs special code.
If someone is seriously looking to fix this you can download Chessbase Reader for free: https://en.chessbase.com/pages/download and I can provide a simple chessbase database with a sample game with some arrows in it. I'm assuming running the latest reader (assuming it runs under wine) will use exactly the same function and fail to draw the arrows in the same way.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #6 from David dav75uk@yahoo.co.uk --- Created attachment 73294 --> https://bugs.winehq.org/attachment.cgi?id=73294 test database - sample game with arrows
A database (unzip it) for chessbase which can be used on chessbase reader. Contains a single 'game' where the initial position and only move have arrow annotations. Might be able to compare what happens on windows and wine to work out how to implement the missing routine.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #7 from David dav75uk@yahoo.co.uk --- Note that back in 2020 Jeff Smith was looking this so I don't know if he's contactable to find out how far he got:
' Jeff Smith whydoubt@gmail.com To:David Flynn
Hi David,
I have made some progress in this, but there are some peculiarities that I still need to deal with before submitting up to wine. Most of my time on wine lately has been focused on other areas, but line caps is still high on my list of areas to address.
Thanks, Jeff '
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #8 from Bartosz gang65@poczta.onet.pl --- After running ChessBase/CBaseReader14, I got crash caused by unimplemented function:
00a0:fixme:imm:ImeSetActiveContext (0000000000010026, 0): stub 00a0:fixme:imm:ImmReleaseContext (0000000000010020, 0000000000010026): stub 0024:fixme:reg:RegQueryInfoKeyA security argument not supported. wine: Call from 7B0411F5 to unimplemented function ucrtbase.dll._mbslwr_s_l, aborting wine: Unimplemented function ucrtbase.dll._mbslwr_s_l called at address 7B0411F5 (thread 0024), starting debugger... 0110:fixme:imm:ImeSetActiveContext (00010090, 1): stub 0110:fixme:imm:ImmReleaseContext (0001009E, 00010090): stub
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #9 from Bartosz gang65@poczta.onet.pl --- More information about missing library is available at: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/strlwr-s-s...
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #10 from Bartosz gang65@poczta.onet.pl --- Patch which resolve the crash of ChessBase/CBaseReader 14 was submitted here: https://gitlab.winehq.org/wine/wine/-/merge_requests/1090
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #11 from David dav75uk@yahoo.co.uk --- Good news. So chessbase reader now starts, fix released in the next wine? Will it let you load the (unzipped) database (*.cbh) I sent so you can see it attempt to draw arrows?
Also this will be useful if it's running to help work with the other short comings of CB on wine (media not playing, registration not working, engine (kibitzer) thread eats all the CPU so it gets stuck, etc) as you won't need the actual database, just the reader and I suspect the bugs will be the same with the same underlying code.
Happy to jump on a zoom call some time so I can go through the bugs. I personally would like to get off CB 11 onto a much more modern one, but without registration issues being fixed (I currently use a workaround bug) it would be something I can't use on wine.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #12 from Bartosz gang65@poczta.onet.pl --- (In reply to David from comment #11)
Good news. So chessbase reader now starts, fix released in the next wine? Will it let you load the (unzipped) database (*.cbh) I sent so you can see it attempt to draw arrows?
I can load *cbh files and I was able to reproduce the draw arrow issue. Please try to install the development version of wine and confirm if solution is works for you: https://wiki.winehq.org/Download
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #13 from David dav75uk@yahoo.co.uk --- Confirming as of wine 7.20 chessbase reader works.
Hopefully you'll be able to implement the arrows now. I'll also check when I get a moment some of the other bugs against chessbase which should be able to be reproduced and hopefully they can be solved too as I suspect many of the bugs overlap (the registration might be able to be tested as you can register media).
It also seems there were a few other issues with chessbase reader than I didn't see with chessbase 11 (missing close and maximum icon in the top right of the window) and it was going really slow as well at one point when opening a game from megadatabase 2018 (which has millions of games) - so maybe I'll open a appdb report on the reader as well.
If you're fixing drawing issues, then the warnings: 0024:fixme:gdiplus:resample_bitmap_pixel Unimplemented interpolation 7 and 0024:fixme:gdiplus:brush_fill_pixels path gradient blend not implemented
have always been annoying but I'm not sure what's missing without them, but maybe a chance to implement them or at least understand them as you can run the app now.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #14 from Bartosz gang65@poczta.onet.pl --- More logs:
0024:trace:gdiplus:GdipSetCustomLineCapStrokeCaps (0804BF00,2,2) 0024:trace:gdiplus:GdipSetCustomLineCapStrokeJoin (0804BF00, 2) 0024:trace:gdiplus:GdipSetAdjustableArrowCapMiddleInset (0804BF00,1.00) 0024:trace:gdiplus:GdipSetPenCustomEndCap (080879B8, 0804BF00) 0024:trace:gdiplus:GdipCloneCustomLineCap (0804BF00, 0215F74C) 0024:trace:gdiplus:GdipCloneCustomLineCap <-- 08087A20 0024:trace:gdiplus:GdipDeleteCustomLineCap (00000000) 0024:trace:gdiplus:GdipCreateFromHDC (344105A9, 0215F7E8) 0024:trace:gdiplus:GdipCreateFromHDC2 (344105A9, 00000000, 0215F7E8) 0024:trace:gdiplus:GdipSetMatrixElements (0807A95C, 1.00, 0.00, 0.00, 1.00, 0.00, 0.00) 0024:trace:gdiplus:GdipCreateRegion 0807A978 0024:trace:gdiplus:GdipCreateRegion => 0807A9D8 0024:trace:gdiplus:GdipSetMatrixElements (0807A99C, 1.00, 0.00, 0.00, 1.00, 0.00, 0.00) 0024:trace:gdiplus:GdipCreateFromHDC2 <-- 0807A918 0024:trace:gdiplus:GdipSetSmoothingMode (0807A918, 2) 0024:trace:gdiplus:GdipDrawLineI (0807A918, 080879B8, 375, 657, 375, 477) 0024:trace:gdiplus:GdipDrawLine (0807A918, 080879B8, 375.00, 657.00, 375.00, 477.00) 0024:trace:gdiplus:GdipDrawLines (0807A918, 080879B8, 0215F6D0, 2) 0024:trace:gdiplus:GdipCreatePath (0, 0215F67C) 0024:trace:gdiplus:GdipAddPathLine2 (0807A3B8, 0215F6D0, 2) 0024:trace:gdiplus:GdipDrawPath (0807A918, 080879B8, 0807A3B8) 0024:trace:gdiplus:GdipSetMatrixElements (0215F5E0, 1.00, 0.00, 0.00, 1.00, 0.00, 0.00) 0024:trace:gdiplus:GdipMultiplyMatrix (0215F5E0, 0807A95C, 1) 0024:trace:gdiplus:GdipScaleMatrix (0215F5E0, 1.00, 1.00, 1) 0024:trace:gdiplus:GdipMultiplyMatrix (0215F5E0, 0807A99C, 1) 0024:trace:gdiplus:GdipTransformMatrixPoints (0215F5E0, 0215F5C8, 3) 0024:trace:gdiplus:GdipClonePath (0807A3B8, 0215F5C8) 0024:trace:gdiplus:GdipSetMatrixElements (0215F5E0, 1.00, 0.00, 0.00, 1.00, 0.00, 0.00) 0024:trace:gdiplus:GdipMultiplyMatrix (0215F5E0, 0807A95C, 1) 0024:trace:gdiplus:GdipScaleMatrix (0215F5E0, 1.00, 1.00, 1) 0024:trace:gdiplus:GdipMultiplyMatrix (0215F5E0, 0807A99C, 1) 0024:trace:gdiplus:GdipWidenPath (0807A400,080879B8,00000000,1.00) 0024:trace:gdiplus:GdipClonePath (0807A400, 0215F538) 0024:trace:gdiplus:GdipFlattenPath (0807A460, 00000000, 1.00) 0024:trace:gdiplus:GdipTransformPath (0807A460, 00000000) 0024:fixme:gdiplus:GdipWidenPath unimplemented end cap ff
https://bugs.winehq.org/show_bug.cgi?id=45273
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45273
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #15 from Fabian Maurer dark.shadow4@web.de --- Is this fixed by https://gitlab.winehq.org/wine/wine/-/commit/1271ae3ebdf9b5b6e39c5688b64c8a3... ?
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #16 from David dav75uk@yahoo.co.uk --- I'll check as soon as there is a release and build. Looks like there should be one in the next couple of days.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #17 from David dav75uk@yahoo.co.uk --- It's nearly there, but not quite accurate. The arrow heads are being drawn, but they look a little on the large side from memory. I'll try to fire up a windows machine and get some screenshots (of course you can do a side-by-side compare on reader and I could make a dummy database with lots of arrows in the 'game'). The arrow from one square to the next looks overly large that you just get an arrow head and virtually no stem.
The second part (separate bug or not) is the end of the line is showing up under the arrow. Either there is some truncation needed, the line isn't quite in the right place or the arrow shape isn't quite right to hide it. Thus you get an arrow where the tip is a square.
However it's much better than when it was just a line. Thanks for the good work, let's get the rest of this nailed.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #18 from David dav75uk@yahoo.co.uk --- Of course it can also be the other way around that everything is fine except the position the arrow is in needs adjusting to hide the stem or v/v which might also fix and explain the square to square arrow seeming too large.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #19 from David dav75uk@yahoo.co.uk --- E.g.
https://www.youtube.com/watch?v=xvJd97ZnHAk
At 4:58 an arrow is showing from g8 to f6 pointing to a knight that has just moved. I've also set up this arrow on chessbase 11 with wine 7.22. Note later chessbase draws arrows slightly different, so reader might be giving different results.
On wine 7.22 in CB 11 the stem of the arrow looks approx in the right place. It crosses f7/g7 (the squares occupied by pawns) at the right point. The tip of the arrow is in the right place on the knight between the white on the mane and the chin. On wine 7.22 the endcap square (some default catch in a switch statement maybe) is being drawn which is not on native chessbase (thus the arrow isn't meant to hide it). Finally the back of the arrow head is in the wrong place (some scaling maybe?) which is making it too large. On wine 7.22 the back of the arrow is drawn from the right shoulder of the pawn on f7 (the one nearest the king) to near (left of) the base of the one on g7. In the video the arrow appears from under the base of the f7 pawn (almost but not quite lined up horizontally the bishop on f8's cross right hand edge) to just inside the corner of the square the knight is on.
Thus I think there are two bugs here, the first is the line's square endcap shouldn't be drawn, the second is the arrow needs scaling centred around the tip so it's smaller. Hopefully that's enough to work from.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #20 from David dav75uk@yahoo.co.uk --- Created attachment 73568 --> https://bugs.winehq.org/attachment.cgi?id=73568 Arrow as drawn in 7.22 on cb11
Compare with video link (native windows) above
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #21 from Bartosz gang65@poczta.onet.pl --- The issue will be fixed with Merge Request: https://gitlab.winehq.org/wine/wine/-/merge_requests/1539
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #22 from Bartosz gang65@poczta.onet.pl --- The issue with arror scale should be fixed with: https://gitlab.winehq.org/wine/wine/-/commit/0fd51346e10839b336dc7c80124b4f2...
and issue with tool long line was fixed with: https://gitlab.winehq.org/wine/wine/-/commit/be7db8457d3e766c456f875c61fa70f...
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #23 from Bartosz gang65@poczta.onet.pl --- Please retest the application with Wine 8.0-rc1: https://www.winehq.org/announce/8.0-rc1
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #24 from David dav75uk@yahoo.co.uk --- The square on the arrow's head has gone. However the arrow is still drawn too large. The arrow head appears no different in size to the previous version (from g8 to f6 - the knight's move). It's a bit weird when pointing to the next square (e.g. c2 to c3) as it looks like triangle. Perfectly usable, but not drawn as on windows.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #25 from Bartosz gang65@poczta.onet.pl --- I cannot reproduce it with Chessbase Reader. Please attach logs with:
WINEDEBUG=+gdiplus
You could attach only part of the logs, where wrong Arrow is drawn.
The screenshot will be also useful.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #26 from David dav75uk@yahoo.co.uk --- Created attachment 73671 --> https://bugs.winehq.org/attachment.cgi?id=73671 Log of drawing an arrow with wine-8.0-rc1
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #27 from David dav75uk@yahoo.co.uk --- Created attachment 73672 --> https://bugs.winehq.org/attachment.cgi?id=73672 Screenshot of arrow after drawing
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #28 from Bartosz gang65@poczta.onet.pl --- Created attachment 73673 --> https://bugs.winehq.org/attachment.cgi?id=73673 CBReader 12 (2013) screenshot from Wine 8.0-rc1
The CBReader12 (2013) could be downloaded from: https://web.archive.org/web/20130826072132/http://fritzload.com/Download/Che...
Unfortunately arrows size looks good there (I cannot reproduce issue).
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #29 from Bartosz gang65@poczta.onet.pl --- @David Could you please try to reproduce the issue with CBReader?
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #30 from Bartosz gang65@poczta.onet.pl --- Created attachment 73674 --> https://bugs.winehq.org/attachment.cgi?id=73674 Screenshot from native (Windows) gdiplus.dll library
There is no difference between native and buildin gdiplus.dll library on CBReader12
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #31 from David dav75uk@yahoo.co.uk --- Confirming the arrows look reasonable (not compared it to on windows) size on CBReader14.
Anything in the log I provided which might suggest some kind of transformation taking place to make the arrow smaller on ChessBase 11 which isn't being applied while drawing the arrow?
If you can't reproduce it, given the arrow size might be unrelated, is it worth closing this bug (since arrows are now being drawn) and opening a new one about the large arrows, referencing this one for logs?
Other than that I guess it needs someone else to raise a bug that an arrow is too large on software you can obtain.
Any point raising a bug on the annoying gdiplus fixmes ( 0064:fixme:gdiplus:brush_fill_pixels path gradient blend not implemented 0064:fixme:gdiplus:resample_bitmap_pixel Unimplemented interpolation 7 ) as I don't know where they are being used.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #32 from Fabian Maurer dark.shadow4@web.de --- IMHO, a separate bug for this new issue would make sense.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #33 from David dav75uk@yahoo.co.uk --- New issue as in big arrows? - happy to have this one marked resolved and the new problem covered there since this adds value to CBReader14 and no doubt other apps. Just checking that's what you meant. Please confirm.
On the fixmes, I can raise if you want (also confirm). This also appears on starting up CBReader, but imagine it'll need a sharp eye to notice that some kind of gradient or interpolation is wrong.
There is another glitch I've noticed in that sometimes part of the arrow gets cleared and not redrawn. I believe it's in some cases where a piece is hovered over a square but not moved so returns to its original square but part of the arrow isn't redrawn. I'll try to get reproduction steps. Perhaps something is going wrong in the repaint sequence.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #34 from Fabian Maurer dark.shadow4@web.de --- (In reply to David from comment #33)
New issue as in big arrows? - happy to have this one marked resolved and the new problem covered there since this adds value to CBReader14 and no doubt other apps. Just checking that's what you meant. Please confirm.
Yes, exactly.
On the fixmes, I can raise if you want (also confirm). This also appears on starting up CBReader, but imagine it'll need a sharp eye to notice that some kind of gradient or interpolation is wrong.
For the "path gradient" fixme we already potentially have bug 44900 and bug 43736.
If you see an actual difference because of aliasing (the interpolation), you can report it as "trivial" or "minor" bug.
There is another glitch I've noticed in that sometimes part of the arrow gets cleared and not redrawn. I believe it's in some cases where a piece is hovered over a square but not moved so returns to its original square but part of the arrow isn't redrawn. I'll try to get reproduction steps. Perhaps something is going wrong in the repaint sequence.
Possibly, please open a separate bug for that. Would be great if we found a way to reproduce the issue without having to buy the program though.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #35 from David dav75uk@yahoo.co.uk --- Yes there is a way to reproduce it. It's also possible on CBaseReader14:
Open a board, hold alt-left shift to draw a red arrow from g2 to g4 (drag to do that). Now pick up the pawn on g2, and drop somewhere illegal (i.e. not back at g2, g3 or g4). You'll notice the part of the arrow on the g2 square is now missing. In Chessbase11 this also affects the default to square (so two bits missing), that is if you click the piece, it moves to that square as a 'smart move'.
Quite possible the redraw sequence/priorities are a problem.
I can raise this as a new bug if you can't obviously see what it is causing it now (and if it's not related to the bugs fixed here).
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #36 from Fabian Maurer dark.shadow4@web.de --- Eh, different program, different bug. Please open a new one and link it here.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #37 from Fabian Maurer dark.shadow4@web.de --- *Different problem, different bug
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #38 from David dav75uk@yahoo.co.uk --- Fair enough. Raised 54143 and 54145 as the new issues and linked them to Chessbase11. Will link 54145 also to the reader.
Happy that the problem of the arrow not being drawn has been resolved so this can be closed and the issues arising from it can be looked at under the new bugs.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #39 from David dav75uk@yahoo.co.uk --- Note that CBReader is not appearing in the AppDB. I'm sure I submitted an entry for it under ChessBase as either the reader or 14. If that can be approved and adopted I can cross reference the bugs.
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #40 from David dav75uk@yahoo.co.uk --- Both linked bugs look like native chessbase issues, so given arrows can now be drawn, I guess this can be closed as complete?
https://bugs.winehq.org/show_bug.cgi?id=45273
--- Comment #41 from Bartosz gang65@poczta.onet.pl --- The issue was already resolved. Please close is as fixed
https://bugs.winehq.org/show_bug.cgi?id=45273
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #42 from Esme Povirk madewokherd@gmail.com --- Reported fixed.
https://bugs.winehq.org/show_bug.cgi?id=45273
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #43 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.15.