View Single Post
Old Today, 09:52 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,804
Karma: 206879174
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Did a little debugging of this on my own and discovered what's happening, but not exactly why. It's related to my previous thread about about certain versions of the VC++ redist runtime not being sufficient to run Sigil and its included Qt6.9.2 (https://www.mobileread.com/forums/sh...d.php?t=369925).

Calibre distributes MSVCP140.dll with its own installer and that is the version that Sigil is trying to use (and silently failing) when launched from Calibre with its inherent Open With feature. The same command line (provided by calibre-debug) uses the system MSVCP140.dll (which is newer than calibre's) and succeeds when run outside of Calibre. The fault can be seen in the Windows Event Viewer after trying to launch Sigil with Calibre's Open With (note the faulting module path):

Code:
Faulting application name: Sigil.exe, version: 2.6.2.0, time stamp: 0x68cac4a8
Faulting module name: MSVCP140.dll, version: 14.36.32532.0, time stamp: 0x04a30cf0
Exception code: 0xc0000005
Fault offset: 0x0000000000012f58
Faulting process id: 0x37b0
Faulting application start time: 0x01dc32d777d6ff52
Faulting application path: C:\Program Files\Sigil\Sigil.exe
Faulting module path: C:\Program Files\Calibre2\app\bin\MSVCP140.dll
Report Id: 897b5901-dac8-44bc-80fd-e48cad7fcf17
Faulting package full name: 
Faulting package-relative application ID:
This is probably only relevant to a Sigil that is built with very recent versions of Visual Studio's C++ compiler and toolchain (which would include my CI builds). My own Windows Sigil releases are still built with an older version of Visual Studio c++ compiler and toolchain, and probably will be until something forces me to update. I will confirm that my release builds of Sigil aren't going to be affected by this and report back.

Otherwise, this will probably be an issue until Calibre includes a newer MSVCP140.dll that is compatible with exe's built with newer versions of the Visual Studio C++ toolchain (or until Kovid discovers a way to sanitize the Open With process environment in such a way that its own bundled MSVCP140.dll is not used by external programs that Calibre launches). Not that I'm trying to make work for him! I'm just not convinced this will be an issue with official Sigil releases.

Last edited by DiapDealer; Today at 10:05 AM.
DiapDealer is offline   Reply With Quote