http://bugs.winehq.org/show_bug.cgi?id=58914
Bug ID: 58914 Summary: Basic Windows pull-down lists are randomly missing entries Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: info@sartrack.nz Distribution: ---
Created attachment 79596 --> http://bugs.winehq.org/attachment.cgi?id=79596 A simple pull-down list in Windows10
I am the developer of the SARTrack free sofware for Search and Rescue. In development for 19 years. For a long time I get complaints from customers that under WINE the basic Windows pull-down boxes have randomly missing entries. There seems to be no logic behind it as of the content of the entry.
... Sems I can only add a single attachment at the time. Will send a second post with the second screenshot.
http://bugs.winehq.org/show_bug.cgi?id=58914
Bart Kindt info@sartrack.nz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |info@sartrack.nz
--- Comment #1 from Bart Kindt info@sartrack.nz --- Created attachment 79597 --> http://bugs.winehq.org/attachment.cgi?id=79597 Simple pull-down list in WINE. Is missing entries for no reason.
My software is written in Delphi Pascal 12.3, uses plain Windows, does NOT use any Themes. It is a basic 'XP compatible' program, that is, it does not use any extra features added from Vista onwards.
Bart Developer https://sartrack.nz
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #2 from Bart Kindt info@sartrack.nz --- I appologize. I got the two screenshots mixed up. The one with the missing "EOC" is the WINE version.
http://bugs.winehq.org/show_bug.cgi?id=58914
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |https://sartrack.nz/
http://bugs.winehq.org/show_bug.cgi?id=58914
Bart Kindt info@sartrack.nz changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |user32 Summary|Basic Windows pull-down |Basic Windows Combobox are |lists are randomly missing |randomly missing entries |entries |
--- Comment #3 from Bart Kindt info@sartrack.nz --- I am talking about the basic Combobox located in User32.dll or Comctl32.dll, probably the first one.
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #4 from Rafał Mużyło galtgendo@o2.pl --- A semi-random stab in the dark, but you might check bug 58932 - description seems unrelated, but perhaps it's a hit anyway, given that it can't be a missing font problem (after all, *you* would know if that was the case).
But if this is an even older problem, you might wanna define 'for a long time' a bit better, as in 'did it ever worked properly in wine ?'.
Still 'string not fitting allocated space, therefore getting rejected, instead of cropped' seems most promising research route.
As a side note: why does this program effectively hardcode its installation path not only in its installer, but also in the program itself ?
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #5 from Bart Kindt info@sartrack.nz --- Right. I found a Linux laptop back to test with. The previous data came from a user. Running Ubuntu 22.04, and the latest Wine from your website. Installed SARTrack. And I see exactly the same issues here.
Wrote a small test program, copied the relevant code over from the main program. Checked the Font and other settings, all the same. Guess what: Of course it works fine in the test program.
So I played with the SARTrack source code: In the entries 'Add "IMT" then Add "EOC" the "EOC" is missing. So I duplicated these two entries. And the second time both showed normally (under the missing first "EOC").
So I wanted to see what actually ended up in the Combobox by reading it back by Index: Index := RefTypeCombobox.Items.Add(rtrIMT); Log('RefTypeCombobox Index: '+Index.ToString+' = '+RefTypeCombobox.Items[Index]); Index := RefTypeCombobox.Items.Add(rtrEOC); Log('RefTypeCombobox Index: '+Index.ToString+' = '+RefTypeCombobox.Items[Index]);
And now it works. The Log entry inserted between the 'Combobox.Items.Add' caused the problem to go away. So I thought it is a timing issue. - I then replaced the Log entry with a 'Sleep(100)'. But this did NOT work. - I then added a 'application.processmessages' in between. But this also did not work.
The only way I can make it work, is to have a Log entry in between. This Log entry just processes the string, writes it into a TMemo or a TRichEdit, depending on a setting. Now the interesting bit: When the Log entry is saved to the (Windows DLL) TRichEdit, it works. If the Log entry is saved into a TMemo, it does NOT work.
So the call to RichEdit is causing the Combobox to work correctly.
Any ideas?
PS: The installation directory was selected 19 years ago, because it would not install on New Zealand Police laptops. It has stayed like that ever since: C:\users(username)\AppData\Roaming\SARTrack\ Everything is there, except the Debug lots etc. in Documents/SARTrack. The Registery is not used.
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #6 from Bart Kindt info@sartrack.nz --- Update: If I afterwards walk through the Items in the Combobox, it has indeed entered an _empty_ entry at the index where the value "EOC" should be.
It is not a display issue. It has entered an empty field/string at that index.
Note that I use this window as the working example. This issues is all over the program in many places. And always at the same index in these Comboboxes.
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #7 from Rafał Mużyło galtgendo@o2.pl ---
And always at the same index in these Comboboxes.
...when you were trying to make a testcase for this problem, are you sure you copied all the code involved in creating the combobox *and* populating its model ?
Cause that sounds like you're overwriting/reusing a var somewhere without noticing it...
Could also be some threading problem, but your line suggests otherwise.
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #8 from Bart Kindt info@sartrack.nz --- The Combox is created automaticaly when the form (window) is created by Delphi. These are standard drag-and-drop items in the IDE.
The adding of the entries is also super simple:
procedure TTeamNewForm.FormShow(Sender: TObject); var // i: integer; begin RefTypeComboBox.Clear;
RefTypeCombobox.Items.Add(vsTeam); // Works RefTypeCombobox.Items.Add(rtrIMT); // Works RefTypeCombobox.Items.Add(rtrEOC); // Empty string // DEBUG RETRY the last two: RefTypeCombobox.Items.Add(rtrIMT); // Works RefTypeCombobox.Items.Add(rtrEOC); // NOW it works!!
RefTypeCombobox.Items.Add(rtrARECStation); // Works etc. RefTypeCombobox.Items.Add(rtrCOMMSStation); RefTypeCombobox.Items.Add(rtrPlanning); RefTypeCombobox.Items.Add(rtrLogistics); RefTypeCombobox.Items.Add(rtrHub); RefTypeCombobox.Items.Add(rtrWelfare); RefTypeCombobox.Items.Add(rtrOther);
{for i := 0 to RefTypeCombobox.Items.Count-1 do begin Log(i.ToString+': '+RefTypeCombobox.Items[i]); << This shows 'EOC' entry is an empty string end; } end;
The vaiables like 'rtrEOC' are constants of the Delphi type 'resourcestring' which allows them to be translated. But here they are NOT translated, they are the original values. And it is also irrelevant because as shown above, if I add it again later as a test, it IS added normally.
This issue is at many different comboboxes in the program, the location of the empty string(s) is always at the same index at these comboboxes. In some cases, 3 entries in a row are missing. All of this only under Linux Wine, and I see the identical situation on my own freshly installed Wine as the original reporter who send be lots of screen shots.
This the most basic Windows item. I do not understand why Wine would have these weird issues with it...
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #9 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Bart Kindt from comment #0)
Created attachment 79596 [details] A simple pull-down list in Windows10
I am the developer of the SARTrack free sofware for Search and Rescue. In development for 19 years. For a long time I get complaints from customers that under WINE the basic Windows pull-down boxes have randomly missing entries. There seems to be no logic behind it as of the content of the entry.
What are the steps to reproduce the bug? You were mentioning a test program, could you attach it to this bug report?
(In reply to Bart Kindt from comment #2)
I appologize. I got the two screenshots mixed up. The one with the missing "EOC" is the WINE version.
You can edit the details for the attachments.
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #10 from Bart Kindt info@sartrack.nz --- The problem is that in the test program, the problem does NOT occur.
But it is only a tiny program. The MAIN SARTrack program has 100+ Forms, and 250,000 lines of source code... Why that would make a difference, I don't know.
I upload a ZIP file containing both the executable and the entire Delphi project code.
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #11 from Bart Kindt info@sartrack.nz --- Created attachment 79752 --> http://bugs.winehq.org/attachment.cgi?id=79752 Demo for Combobox issue. Demo works normally.
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #12 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Bart Kindt from comment #10)
The problem is that in the test program, the problem does NOT occur.
But it is only a tiny program. The MAIN SARTrack program has 100+ Forms, and 250,000 lines of source code... Why that would make a difference, I don't know.
What are the steps that one need to perform to see the bug in SARTrack?
I upload a ZIP file containing both the executable and the entire Delphi project code.
If the problem can not be reproduced to the test, then it's not very useful?
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #13 from Bart Kindt info@sartrack.nz --- Yes, the test program is not usefull as the issue does not occur there.
Problem for you is, you need to install both the Local Database Server, and the SARTrack Client, to be able to get to the issues. If you install SARTrack as the simple Amateur Radio APRS program, all the features where the problems occur are not available. It then works completely different.
So the steps have to be: - Install a SARTrack Local Database Server, using any "callsign-SSID". Make someting up. - Remember the 'ServerAdmin' password. - Install the SARTrack client (in SAR mode), using any *different* Callsign-ssid. - Start SARTrack. Use the login "ServerAdmin" and the password for that. - Start a new 'LandSAR' Operation (Top of Menu). - Now, from the Main Menu, 'Team Setup', click 'New Team'.
In the 'Type' combobox, you will see the missing 'EOC' entry.
Sorry, there is no other way for you to actually see the problem...
Contact me direct with questions at info@sartrack.nz
Bart
http://bugs.winehq.org/show_bug.cgi?id=58914
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |10.19 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #14 from Dmitry Timoshkov dmitry@baikal.ru --- Many thanks for the instructions! Looks like this is a regression, in wine-9.0 the EOC entry exists. Current wine.git (wine-10.19-127-gf49b8aec794) also shows some regressions with theme painting, so for the testing purposes it's required to disable theme in winecfg.
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #15 from Bart Kindt info@sartrack.nz --- As I am not really familiar with Wine (I am with Linux itself) , is there something I can tell to my users to change a setting, so it works for them?
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #16 from Bart Kindt info@sartrack.nz --- Also note, SARTrack does NOT use 'themes'. It is a basic Windows-XP program. And the problem is not in the 'painting' if I understand you correctly; it actually does not add the actual string to the combobox.
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #17 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Bart Kindt from comment #15)
As I am not really familiar with Wine (I am with Linux itself) , is there something I can tell to my users to change a setting, so it works for them?
For the time being you could ask your users to use wine-9.0 as a workaround.
(In reply to Bart Kindt from comment #16)
Also note, SARTrack does NOT use 'themes'. It is a basic Windows-XP program.
However, the application does use themed painting, probably Delphi uses it.
And the problem is not in the 'painting' if I understand you correctly; it actually does not add the actual string to the combobox.
Looks like that, yes.
http://bugs.winehq.org/show_bug.cgi?id=58914
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Regression SHA1| |05d727a935b9009f188cc74ca77 | |e14afc44aef30 CC| |rbernon@codeweavers.com
--- Comment #18 from Dmitry Timoshkov dmitry@baikal.ru --- The regression is cased by
05d727a935b9009f188cc74ca77e14afc44aef30 is the first bad commit commit 05d727a935b9009f188cc74ca77e14afc44aef30 Author: Rémi Bernon rbernon@codeweavers.com Date: Sat Jun 15 21:09:37 2024 +0200
win32u: Update the layered surface attributes in apply_window_pos.
And after layered window creation in NtUserUpdateLayeredWindow.
This commit is part of wine-9.13, wine-9.12 is the last version without the bug.
So, it looks like the problem is with painting. After building at this commit git reset --hard 05d727a935b9009f188cc74ca77e14afc44aef30 the problem is reprodicable, after git show 05d727a935b9009f188cc74ca77e14afc44aef30 | patch -p1 -R and rebuilding the EOC entry is the combobox is visible.
http://bugs.winehq.org/show_bug.cgi?id=58914
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|user32 |win32u
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #19 from Rafał Mużyło galtgendo@o2.pl ---
If I afterwards walk through the Items in the Combobox, it has indeed entered an _empty_ entry at the index where the value "EOC" should be.
{for i := 0 to RefTypeCombobox.Items.Count-1 do begin Log(i.ToString+': '+RefTypeCombobox.Items[i]); << This shows 'EOC' entry is an empty string end; }
Sorry, but how do you reconcile 'it's a painting problem' with those lines ?
Anyway, great job, Dmitry (though the conflicting data makes a bit anxious...; any chance those are distinct problems ?).
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #20 from Rafał Mużyło galtgendo@o2.pl --- ...also, to the original poster: do things change if you add a bracket of .Items.BeginUpdate - .Items.EndUpdate around the whole insertion block (including first clear) ?
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #21 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Rafał Mużyło from comment #19)
Sorry, but how do you reconcile 'it's a painting problem' with those lines ?
Anyway, great job, Dmitry (though the conflicting data makes a bit anxious...; any chance those are distinct problems ?).
It should be pretty easy to verify the regression test result, shouldn't it?
http://bugs.winehq.org/show_bug.cgi?id=58914
--- Comment #22 from Bart Kindt info@sartrack.nz --- Good point regarding the .Items.BeginUpdate / EndUpdate.
Just done that, unfortunately it makes no difference for the issue at hand.
Thanks, Bart