I'm fine on having a workaround, but not if it's too invasive, which IMO right now it is.
So, I'm fine with only removing the biggest envars (which are much less likely to be important), like !6140 does
It's just only around 40 lines added, and it has no performance impact if the envars block is small, so I don't really see why not that instead.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9423#note_121864
> there would be a clear message pointing out the issue
I don't want to accuse you of https://xkcd.com/2501/, but the average user doesn't launch Wine from the terminal, and may not know what environment variables are (if they blindly follow guides, they won't understand that the log is related to their issue).
> as opposed to an obscure crash [it actually isn't a crash, it's an error message]
Which is what the logs of my MR are about (which I could make more specific so that they explicitly specify EA app).
So, back to the beginning: better to not change anything and add a logs that explain an old problem, or to add a workaround and add logs to explain new problems created by it? Due to all the reasoning I already gave, I'd prefer the former.
Now, I know you may accuse me of https://xkcd.com/1172/, but
> To me it seems like an improvement.
let's consider the effect of the change to the population of users who have a large environment block:
- They don't use EA App -> The change may only be negative
- They do use EA App -> The change is positive... but still has the negative side effects (so it's a sidegrade, not an upgrade)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9423#note_121859
I'm aware that this is a lose-lose scenario, due to EA not fixing their issue on the end, since it's either:
- Workaround the issue, but cause breaking changes outside of it
- Do nothing, but EA app remains not working without manual intervention
And IMO, the second choice is better.
And many things can still be done, like having better documentation about the issue. For instance, Wine's wiki has a [Known Issues page](https://gitlab.winehq.org/wine/wine/-/wikis/Known-Issues), where this definitely belongs. Or maybe it could be added to the Arch Wiki as well.
Or [make changes to systems that set huge environment variables to be less wasteful](https://github.com/NixOS/nixpkgs/pull/451031) (which is nice even outside of this).
(And if there is still intention of doing a workaround for the issue... would it be possible to unset environment variables only if the executable `EADesktop.exe` is launched, to minimize the impact of breaking changes elsewhere?)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9423#note_121852
> It's a change that breaks configurations for little gain
Obviously the gain is that a commonly-used app no longer crashes. How would you suggest to achieve that otherwise? Printing a warning may make it easier to determine the cause of the crash, but it doesn't improve the user's experience.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9423#note_121847
Your change would be nice even with the warning I'm proposing, considering that it helps with trimming the environment block.
I don't understand why it should still not import the environment block at all.
I'll reiterate why I think conditionally not importing it is a bad idea:
- If modern Windows allows unlimited environment block size, Wine should allow it too
- It's a change that breaks configurations for little gain
- Because it's conditional, documentation becomes much more cumbersome. Think of all the resources online saying something like "set this environment variable", which will now need to be updated with "unless your environment block is too big, you'll also have to trim the environment block too" (which is more complicated than this sentence). And that's assuming it gets updated at all. Add in users why follow guides and then don't notice the log (either because they don't use the terminal or because they are newbies and can't see that this log is related to why the guide is not working), and you get a mess.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9423#note_121846
--
v3: winex11: Lock and flush display in X11DRV_ChangeDisplaySettings.
winex11: Retrieve full modes before applying new display settings.
winex11: Introduce a x11drv_mode structure for full modes.
winex11: Always return full modes from settings handlers.
winex11: Copy XF86VidModeModeInfo to the DEVMODEW driver data.
https://gitlab.winehq.org/wine/wine/-/merge_requests/9394