gpt4 book ai didi

crash - Inno Setup 在静默模式下运行时频繁崩溃

转载 作者:行者123 更新时间:2023-12-02 10:43:41 28 4
gpt4 key购买 nike

所以我使用以下命令运行安装程序:

C:\Program Files (x86)\Example\ExampleSetup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART

但由于某些奇怪的原因,安装程序有 50% 的几率失败,当失败时,它会返回 0-3 之间的随机退出代码。
我认为这可能是因为 /VERYSILENT 因为我在非静默运行时从未见过这种行为。
我还在[Setup]部分中使用了SetupMutex,那么是否会出现一半时间崩溃的情况?
如果进程确实崩溃,我还希望获得有意义的退出代码,以便我可以调试问题。
这是日志输出:

2016-05-02 11:33:01.421   Log opened. (Time zone: UTC+03:00)
2016-05-02 11:33:01.421 Setup version: Inno Setup version 5.5.6 (u)
2016-05-02 11:33:01.421 Original Setup EXE: C:\Program Files (x86)\Maprinter\MaprinterSetup.exe
2016-05-02 11:33:01.421 Setup command line: /SL5="$F403AE,242855,184832,C:\Program Files (x86)\Maprinter\MaprinterSetup.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART "/LOG=C:\Program Files (x86)\Maprinter\MaprinterSetup.log" Restart
2016-05-02 11:33:01.421 Windows version: 10.0.10586 (NT platform: Yes)
2016-05-02 11:33:01.421 64-bit Windows: Yes
2016-05-02 11:33:01.421 Processor architecture: x64
2016-05-02 11:33:01.421 User privileges: Administrative
2016-05-02 11:33:01.422 64-bit install mode: No
2016-05-02 11:33:01.425 Created temporary directory: C:\WINDOWS\TEMP\is-SM12R.tmp
2016-05-02 11:33:01.494 Extracting temporary file: C:\WINDOWS\TEMP\is-SM12R.tmp\InnoCallback.dll
2016-05-02 11:33:01.593 Extracting temporary file: C:\WINDOWS\TEMP\is-SM12R.tmp\unzipper.dll
2016-05-02 11:33:01.723 Exception message:
2016-05-02 11:33:01.723 Defaulting to OK for suppressed message box (OK):
Error reading WelcomeLabel2.Caption: System Error. Code: 1411.
Class does not exist.
2016-05-02 11:33:01.723 Deinitializing Setup.
2016-05-02 11:33:01.728 Log closed.

这是同一问题的不同日志输出:

2016-05-02 12:04:50.495   Log opened. (Time zone: UTC+03:00)
2016-05-02 12:04:50.495 Setup version: Inno Setup version 5.5.6 (u)
2016-05-02 12:04:50.495 Original Setup EXE: C:\Program Files (x86)\Maprinter\MaprinterSetup.exe
2016-05-02 12:04:50.495 Setup command line: /SL5="$177016C,242855,184832,C:\Program Files (x86)\Maprinter\MaprinterSetup.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /LOG=C:\Users\yuvadius\Desktop\MaprinterSetup.log Restart
2016-05-02 12:04:50.495 Windows version: 10.0.10586 (NT platform: Yes)
2016-05-02 12:04:50.495 64-bit Windows: Yes
2016-05-02 12:04:50.495 Processor architecture: x64
2016-05-02 12:04:50.495 User privileges: Administrative
2016-05-02 12:04:50.496 64-bit install mode: No
2016-05-02 12:04:50.500 Created temporary directory: C:\WINDOWS\TEMP\is-NFR0Q.tmp
2016-05-02 12:04:50.528 Extracting temporary file: C:\WINDOWS\TEMP\is-NFR0Q.tmp\InnoCallback.dll
2016-05-02 12:04:50.607 Extracting temporary file: C:\WINDOWS\TEMP\is-NFR0Q.tmp\unzipper.dll
2016-05-02 12:04:50.763 Exception message:
2016-05-02 12:04:50.763 Defaulting to OK for suppressed message box (OK):
System Error. Code: 8.
Not enough storage is available to process this command.
2016-05-02 12:04:50.763 Deinitializing Setup.
2016-05-02 12:04:50.770 Log closed.

所以我的具体问题是:为什么我的安装程序经常崩溃,我能做些什么来解决这个问题?

最佳答案

我首先会暂时删除“计时器”内容。

计时器可能会在快速静默安装完成时到期,因此 mytimerproc 正在尝试访问不再存在的窗口,或者 pascal 脚本引擎正在被破坏。

如果事实证明是这样(实际上即使不是),您应该解决这些问题:

  • 您需要在安装程序关闭时销毁计时器(可能来自 CurStepChanged(ssDone))
  • 您甚至可能不想在非常安静的安装中安排计时器,因为没有任何形式可以使其透明。
  • 您应该在 InitializeWizard 中安排计时器,而不是在 InitializeSetup 中,因为您可能面临窗口甚至不存在的风险,否则,当计时器到期时,如果安装程序正在启动慢慢来。

关于crash - Inno Setup 在静默模式下运行时频繁崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36977156/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com