运行 Windows 应用程序时 WINE 错误
一位用户报告说我们的一个应用程序无法在 WINE 下运行。它会一直运行,直到他通过某种形式,然后冻结。 WINE 给出以下输出:
~/.wine/drive_c/HeroLab$ wine HeroLab.exe
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 30000
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 30000
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:HTTPREQ_QueryOption Semi-STUB INTERNET_OPTION_SECURITY_FLAGS: 0
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_SECURITY_FLAGS; STUB
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 30000
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 30000
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 30000
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 30000
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
谁能向我解释这些消息吗?我假设它们是来自 WINE 的消息,报告我们正在以 WINE 不支持的方式调用函数,但我们的代码根本不调用 CreateBitmapIndirect。
我们如何找到这个问题的根源,并修复我们的应用程序,使其在 WINE 下运行?
谢谢。
A user reports that one of our applications doesn't work under WINE. It runs until he proceeds past a certain form, and then freezes. WINE gives the following output:
~/.wine/drive_c/HeroLab$ wine HeroLab.exe
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 30000
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 30000
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:HTTPREQ_QueryOption Semi-STUB INTERNET_OPTION_SECURITY_FLAGS: 0
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_SECURITY_FLAGS; STUB
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 30000
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 30000
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 30000
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT 30000
fixme:wininet:InternetSetOptionW Option INTERNET_OPTION_CONNECT_TIMEOUT (30000): STUB
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
fixme:bitmap:CreateBitmapIndirect planes = 0
Can anyone explain these messages to me? I assume they are messages from WINE reporting that we are calling functions in ways that WINE doesn't support, but our code doesn't call CreateBitmapIndirect at all.
How can we locate the source of this problem, and fix our app so it runs under WINE?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Ok Wine 处于不断发展的状态,你需要找出一些事情;
- 您使用的是哪个版本的 wine 1.1.38 是撰写本文时的最新版本,您可能使用的是旧版本,您遇到的问题已得到解决。
-什么应用程序有问题?您搜索过应用程序数据库吗? http://appdb.winehq.org/ 您可以在 Wine 下找到应用程序运行的当前状态,并且用户遇到的任何问题。
Okay Wine is in a constant state of development, you need to find out a few things;
-Which version of wine are you using 1.1.38 is the latest at the time of writing, chances are you might be using an old version whereby the problem your are encountering has been fixed.
-What application is having problems? Have you searched the Application Database? http://appdb.winehq.org/ You can find the current status of running your application under Wine and any of problems users have been encountering.
http://source.winehq.org/source/dlls/wininet/internet。 c
阅读:InternetSetOptionW 正文。大多数标志都未实现。解决方法之一是阅读此调用的 Microsoft 文档并找到类似的内容,但这是不可能的。
http://source.winehq.org/source/dlls/wininet/internet.c
Read the: InternetSetOptionW body. Most flags are unimplemented. One of way to fix is read Microsoft documentation of this call and find similar, but it is rather impossible.
在 Wine 下调试您自己的应用程序。向 Wine 开发者发送反馈。
例如:
WINEDEBUG=+GDI wine ./HeroLab.exe
Debug your own application under Wine. Send feedback to Wine developers.
For example:
WINEDEBUG=+GDI wine ./HeroLab.exe
最好的选择是实现一个日志文件,您可以在其中编写调试跟踪语句。添加代码来编写一行指示您所在的位置、变量的值等。您可能需要进行多次迭代,添加许多日志记录语句,直到缩小问题发生的范围。
通过启动应用程序的命令 (
/D
) 上的开关来激活日志记录。每次写入日志文件时,通过关闭并重新打开日志文件来“刷新”日志文件。您需要这个,因为如果您的应用程序崩溃,它将无法到达将关闭日志文件的正常终止代码。
让用户向您发送该文件的副本。享受尸检的乐趣。
请注意,Wine 很脆弱,并且会由于 Windows 容忍的违规行为而崩溃。例如。 NULL 窗口句柄、无效窗口类等。这是改进代码的机会。
(我意识到这已经很旧了,并且 OP 已经继续前进,我希望它会对其他遇到类似问题的人有所帮助)。
Your best bet is to implement a log file where you can write debugging trace statements. Add code to write a line indicating where you are, the value of variables, etc. You might have to do several iterations, add many logging statements, until you narrow down where the problem occurs.
Activate the logging with a switch on the command that launches your app (
/D
).'Flush' the log file by closing and re-opening it every time you write to it. You need this because if your app crashes, it will not reach normal termination code where the log files would be closed.
Get the user to send you a copy of the file. Have fun with the autopsy.
Note that Wine is brittle, and will crash due to irregularities that Windows tolerates. Eg. NULL window handles, invalid window classes, etc. This is an opportunity to improve your code.
(I realize this is old and the OP has moved on, bit I hope it will be of assistance to others with similar problems).