http://bugs.winehq.org/show_bug.cgi?id=58962 Bernd Herd <codeberg(a)herdsoft.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |codeberg(a)herdsoft.com --- Comment #2 from Bernd Herd <codeberg(a)herdsoft.com> --- I've just filed a merge request that adds saving the data source selected by the user to the registry. You might want to check if this fills your need: https://gitlab.winehq.org/wine/wine/-/merge_requests/9731 I'd see the cause of what you've observed here in the twain_32.dll (which is now calling twaindsm.dll). The uninitialized data for the data source version has been addressed recently in commit https://gitlab.winehq.org/wine/wine/-/commit/5b50d54a7d2bcb2435c2868c7a443db... That memset in dlls/twaindsm/dsm_ctrl.c:80 was added to initialize those non-initialized variables. Maybe the sane.ds should set some non-zero values for version, maybe the wine version? But before the change, the value was uninitialized and thus more or less random. The fact that the get_identity code is called 4 times when there are 3 scanners is part of the design: It is called from dsm_ctrl.c until it repeats itself in line 94, so there must be always one call more than there are configured scanners, just to detect the repitition. That method of having more that one value for TW_IDENTITY from one .DS data source is not part of the Twain specification. I guess it was introduced for sane.ds and gphoto2.ds. The reason that unloading / realoading the twain_32.dll alias twaindsm.dll does not reset the iterator is also in the twaindsm source code: https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/twaindsm/dsm_ctrl.c?r... /* This causes crashes due to still open Windows, so leave out for now. * FreeLibrary (currentDS->hmod); */ That means the twaindsm.dll does not free the sane.ds when the DS gets closed because there is still this workaround for a bug already addressed in this commit: https://gitlab.winehq.org/wine/wine/-/commit/46305670a3488770d73077f7b074705... If the sane.ds would get unloaded, the iterator would be reset on every reload of twain_32.dll / sane.ds. However I'd not currently want to remove this obsolete workaround while wine is in a code freeze state. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.