[Bug 17796] New: Citavi: No network access
http://bugs.winehq.org/show_bug.cgi?id=17796 Summary: Citavi: No network access Product: Wine Version: 1.1.17 Platform: PC-x86-64 URL: http://www.citavi.org/de/materialien/CitaviSetup.exe OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs(a)winehq.org ReportedBy: winehq(a)sase.de An essential feature of Citavi is to search in network based databases (severty=normal). If you click on "Recherchieren..." an error occcours after some seconds (see screenshot). There is only this errormessage in the console: fixme:ole:Context_QueryInterface interface not implemented {51372ae0-cae7-11cf-be81-00aa00a2fa25} fixme:dciman:DCICreatePrimary 0x340 0x543129c fixme:dciman:DCICreatePrimary 0x35c 0x5431cb4 fixme:ole:Context_CC_ContextCallback (0x1f92e7b8/0x1f92e7bc)->(0x79f277a5, 0x2a9e488, {d7174f82-36b8-4aa8-800a-e963ab2dfab9}, 2, (nil)) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17796 --- Comment #1 from cosmo <winehq(a)sase.de> 2009-03-19 15:31:28 --- Created an attachment (id=20024) --> (http://bugs.winehq.org/attachment.cgi?id=20024) error message -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17796 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17796 --- Comment #2 from Austin English <austinenglish(a)gmail.com> 2010-09-12 03:43:06 CDT --- I can't get the program to open a file in wine-1.3.2-115-gd822555. I think the program has been updated...can you please retest in current (1.3.2 or newer) wine and if still present, give steps to reproduce (especially for non-German speakers). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17796 butraxz(a)gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |butraxz(a)gmail.com --- Comment #3 from butraxz(a)gmail.com 2012-05-20 11:22:23 CDT --- This bug has not been updated for three years. Is this still an issue in current (1.5.4 or newer) wine? Or should this be changed to abandoned ? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17796 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx(a)gmail.com --- Comment #4 from Bruno Jesus <00cpxxx(a)gmail.com> 2013-02-06 18:33:32 CST --- The application no longer gets past the first menu so currently it's not possible to test. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17796 mobam <tl(a)ewetel.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tl(a)ewetel.net --- Comment #5 from mobam <tl(a)ewetel.net> 2013-03-22 10:40:18 CDT --- I just installed Citavi 2.5.2 under wine 1.5.16. It needs additional: winetricks dotnet20sp2 gdiplus ie7 mdac28 jet40 (look here for further info (german): http://forum.ubuntuusers.de/topic/citavi-und-wine-erfolg/2/ ) But still the Internet Connection does not work. Surprisingly the internet connection and research via ISBN works under Citavi 3.x -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17796 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet Status|UNCONFIRMED |NEW CC| |focht(a)gmx.net Component|-unknown |wininet Summary|Citavi: No network access |Citavi: No network access | |(wininet.dll | |InternetGetConnectedStateEx | |W returns incorrect network | |connection state) Ever Confirmed|0 |1 --- Comment #6 from Anastasius Focht <focht(a)gmx.net> 2013-03-22 13:56:49 CDT --- Hello folks, confirming. I extracted the .NET code the app uses to check for network connectivity with "Reflector" tool from "$WINEPREFIX/drive_c/Program Files/Citavi/bin/Asz.dll": --- snip --- [DllImport("wininet.dll")] public static extern int InternetGetConnectedStateEx(out int lpdwFlags, StringBuilder lpszConnectionName, int dwNameLen, int dwReserved); [DllImport("sensapi.dll")] public static extern bool IsNetworkAlive(ref int flags); public bool HasLAN() { if (!_detectConnectedState) { Diagnostics.Trace(_detectConnectedState, "Value of \"_detectConnectedState\" flag."); return true; } bool flag = false; try { int lpdwFlags = 0; StringBuilder lpszConnectionName = new StringBuilder(0x100); int dwNameLen = 0; int dwReserved = 0; if (Native.InternetGetConnectedStateEx(out lpdwFlags, lpszConnectionName, dwNameLen, dwReserved) == 1) { flag = true; } } catch (Exception exception) { Diagnostics.Trace(exception); } Diagnostics.Trace(flag, "Value of \"hasLAN\" flag"); bool flag2 = Native.IsNetworkAlive(ref Native.NETWORK_ALIVE_LAN); Diagnostics.Trace(flag2, "Value of \"isNetworkAlive\" flag"); return (flag && flag2); } ... --- snip --- The problem is the way Wine's wininet InternetGetConnectedStateEx() is written. Source: http://source.winehq.org/git/wine.git/blob/ae77b3d368519b5518dbe485dfac2e812... --- snip --- 1131 /*********************************************************************** 1132 * InternetGetConnectedStateExW (WININET.@) 1133 * 1134 * Return connected state 1135 * 1136 * PARAMS 1137 * 1138 * lpdwStatus [O] Flags specifying the status of the internet connection. 1139 * lpszConnectionName [O] Pointer to buffer to receive the friendly name of the internet connection. 1140 * dwNameLen [I] Size of the buffer, in characters. 1141 * dwReserved [I] Reserved. Must be set to 0. 1142 * 1143 * RETURNS 1144 * TRUE if connected 1145 * if lpdwStatus is not null, return the status (off line, 1146 * modem, lan...) in it. 1147 * FALSE if not connected 1148 * 1149 * NOTES 1150 * If the system has no available network connections, an empty string is 1151 * stored in lpszConnectionName. If there is a LAN connection, a localized 1152 * "LAN Connection" string is stored. Presumably, if only a dial-up 1153 * connection is available then the name of the dial-up connection is 1154 * returned. Why any application, other than the "Internet Settings" CPL, 1155 * would want to use this function instead of the simpler InternetGetConnectedStateW 1156 * function is beyond me. 1157 */ 1158 BOOL WINAPI InternetGetConnectedStateExW(LPDWORD lpdwStatus, LPWSTR lpszConnectionName, 1159 DWORD dwNameLen, DWORD dwReserved) 1160 { 1161 TRACE("(%p, %p, %d, 0x%08x)\n", lpdwStatus, lpszConnectionName, dwNameLen, dwReserved); 1162 1163 /* Must be zero */ 1164 if(dwReserved) 1165 return FALSE; 1166 1167 if (lpdwStatus) { 1168 WARN("always returning LAN connection.\n"); 1169 *lpdwStatus = INTERNET_CONNECTION_LAN; 1170 } 1171 return LoadStringW(WININET_hModule, IDS_LANCONNECTION, lpszConnectionName, dwNameLen); 1172 } --- snip --- Returning the connection state through LoadStringW() result looks plain wrong to me (using result of that function call and/or return type int (num of chars) vs. bool). MSDN: http://msdn.microsoft.com/en-us/library/windows/desktop/aa384705%28v=vs.85%2... --- quote --- BOOL InternetGetConnectedStateEx( _Out_ LPDWORD lpdwFlags, _Out_ LPTSTR lpszConnectionName, _In_ DWORD dwNameLen, _In_ DWORD dwReserved ); ... Remarks A return value of TRUE from InternetGetConnectedState indicates that at least one connection to the Internet is available. It does not guarantee that a connection to a specific host can be established. Applications should always check for errors returned from API calls that connect to a server. InternetCheckConnection can be called to determine if a connection to a specific destination can be established. A return value of TRUE indicates that either the modem connection is active, or a LAN connection is active and a proxy is properly configured for the LAN. A return value of FALSE indicates that neither the modem nor the LAN is connected. If FALSE is returned, the INTERNET_CONNECTION_CONFIGURED flag may be set to indicate that autodial is configured to "always dial" but is not currently active. If autodial is not configured, the function returns FALSE. --- quote --- Digging through the application .NET code I also found a debug trace capability: --- snip --- $ find . -name "Settings.xml" ./drive_c/users/focht/Application Data/Academic Software Zurich/Settings.xml --- snip --- Set "EnableTrace" in XML file to "true" and you can use +debugstr channel to get more verbose diagnostics (OutputDebugString). +debugstr with builtin wininet --- snip --- warn:debugstr:OutputDebugStringA "3/22/2013 7:28:02 PM - _activeControlResolved is: OnlineSearchWaitDialog\r\n" warn:debugstr:OutputDebugStringA "3/22/2013 7:28:02 PM - Value of \"hasLAN\" flag: False\r\n" warn:debugstr:OutputDebugStringA "3/22/2013 7:28:02 PM - Value of \"isNetworkAlive\" flag: True\r\n" --- snip --- +debugstr with native wininet (winetricks wininet): --- snip --- warn:debugstr:OutputDebugStringA "3/22/2013 7:26:36 PM - _activeControlResolved is: OnlineSearchWaitDialog\r\n" fixme:ras:RasEnumConnectionsW (0x1e6ea0,0x32c68c,0x76c623e4),stub! fixme:ras:RasEnumConnectionsW RAS support is not implemented! Configure program to use LAN connection/winsock instead! fixme:service:EnumServicesStatusW resume handle not supported warn:debugstr:OutputDebugStringA "3/22/2013 7:26:37 PM - Value of \"hasLAN\" flag: True\r\n" warn:debugstr:OutputDebugStringA "3/22/2013 7:26:37 PM - Value of \"isNetworkAlive\" flag: True\r\n" warn:debugstr:OutputDebugStringA "3/22/2013 7:26:37 PM - Starting RetrievalDefinitions.UpdateAllFavorites.\r\n" ... --- snip --- You can work around easily by either changing application setting: "Extras" -> "Projektübergreifende Optionen" -> "Recherche" -> check "Internet-Verbindungsmeldungen von WIndows ignorieren" near the proxy settings. or use native wininet ('winetricks wininet'). $ du -sh CitaviSetup.exe 26M CitaviSetup.exe $ sha1sum CitaviSetup.exe bf840b949f9210654a31ba8488046e1ac47d51e5 CitaviSetup.exe $ wine --version wine-1.5.26-19-g6ed2d9b Regards -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17796 --- Comment #7 from Anastasius Focht <focht(a)gmx.net> --- Hello folks, not fully fixed yet. Although commit http://source.winehq.org/git/wine.git/commitdiff/2ef27a232239bcd614e53ff4805... was technically correct, there is another problem in InternetGetConnectedStateExA() --- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Citavi/bin $ WINEDEBUG=+tid,+seh,+relay,+wininet wine ./Citavi\ Program.exe >>log.txt 2>&1 ... 002b:Call wininet.InternetGetConnectedStateEx(0f6de084,114786b0,00000000,00000000) ret=04950f05 002b:trace:wininet:InternetGetConnectedStateExA (0xf6de084, 0x114786b0, 0, 0x00000000) 002b:trace:wininet:InternetGetConnectedStateExW (0xf6de084, (nil), 0, 0x00000000) 002b:warn:wininet:InternetGetConnectedStateExW always returning LAN connection. 002b:Call user32.LoadStringW(7e020000,00000500,00000000,00000000) ret=7e04ae39 002b:Ret user32.LoadStringW() retval=00000000 ret=7e04ae39 002b:Ret wininet.InternetGetConnectedStateEx() retval=00000000 ret=04950f05 ... 002b:Call KERNEL32.OutputDebugStringW(01128298 L"1/30/2014 9:59:01 PM - Value of \"hasLAN\" flag: False\r\n") ret=049505de --- snip --- Wine only allocates a wide-character buffer in InternetGetConnectedStateExA() in case of non-NULL lpszConnectionName' _and_ non-zero 'dwNameLen'. The .NET code passes a valid buffer ptr but zero 'dwNameLen' (see .NET code from my comment #6) hence InternetGetConnectedStateExW() always gets NULL buffer, leading to LoadStringW() failure. Source: http://source.winehq.org/git/wine.git/blob/2ef27a232239bcd614e53ff48054ac5fe... --- snip --- 1229 BOOL WINAPI InternetGetConnectedStateExA(LPDWORD lpdwStatus, LPSTR lpszConnectionName, 1230 DWORD dwNameLen, DWORD dwReserved) 1231 { 1232 LPWSTR lpwszConnectionName = NULL; 1233 BOOL rc; 1234 1235 TRACE("(%p, %p, %d, 0x%08x)\n", lpdwStatus, lpszConnectionName, dwNameLen, dwReserved); 1236 1237 if (lpszConnectionName && dwNameLen > 0) 1238 lpwszConnectionName = heap_alloc(dwNameLen * sizeof(WCHAR)); 1239 1240 rc = InternetGetConnectedStateExW(lpdwStatus,lpwszConnectionName, dwNameLen, 1241 dwReserved); 1242 if (rc && lpwszConnectionName) 1243 { 1244 WideCharToMultiByte(CP_ACP,0,lpwszConnectionName,-1,lpszConnectionName, 1245 dwNameLen, NULL, NULL); 1246 heap_free(lpwszConnectionName); 1247 } 1248 return rc; 1249 } --- snip --- Native can somehow cope with this situation, probably ignoring 'dwNameLen', using a fixed size temporary wide-character buffer which is passed to InternetGetConnectedStateExW(). Even if the caller never gets a filled buffer due to 'dwNameLen' being zero, the function can still return 'TRUE' when InternetGetConnectedStateExW() returns 'TRUE'. I think this is what the .NET code implies by passing zero 'dwNameLen': only interested in return value, not the actual connection name. $ sha1sum CitaviSetup.exe bf840b949f9210654a31ba8488046e1ac47d51e5 CitaviSetup.exe $ du -sh CitaviSetup.exe 26M CitaviSetup.exe $ wine --version wine-1.7.11-206-g82b3813 Regards -- 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.
http://bugs.winehq.org/show_bug.cgi?id=17796 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs(a)winehq.org |00cpxxx(a)gmail.com --- Comment #8 from Bruno Jesus <00cpxxx(a)gmail.com> --- Thanks again for the report Anastasius. I was thinking this could be a simple 1 patch line bug fix... I'll write proper tests and fix the function correctly. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=17796 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |5e13e7f809075f28c0a8fb9fe7d | |3aa6cf0f50e80 Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #9 from Bruno Jesus <00cpxxx(a)gmail.com> --- Fixed now. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=17796 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #10 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 1.7.30. -- 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.
participants (1)
-
wine-bugs@winehq.org