JimmXinu / FanFicFare

FanFicFare is a tool for making eBooks from stories on fanfiction and other web sites.
Other
750 stars 161 forks source link

Crash in Calibre 6.0.0 when updating library #864

Closed sidney closed 2 years ago

sidney commented 2 years ago

I updated Calibre to the new 6.0.0 and now i get a crash when I click on the update library dialog after either updating or downloading one or more URLs. I only tried it on RoyalRoad books but it happened on any book or books I tried, and it was after the download was all done and it asked me if I wanted to update the library. I had upgraded Calbre to 6.0.0 before updating to the very latest fanficfare plugin, but updating the plugin got same result. Downgrading to Calibre 5.44.0 fixed the problem, re-installing Calibre 6.0.0 got the crash again.

This is near the beginning of the crash report. I'll attach the entire crash report as a file:

Crashed Thread: 0 DeleteService Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information: abort() called

calibre600crash.log

sidney commented 2 years ago

Here is a workaround that I don't think is practical to use, but may provide insight on the underlying problem. Note, I am using Homebrew, and I have not tried uninstalling the Homebrew python because that would interfere with too many things.

cd /usr/local/lib
ln -s ../Cellar/openssl@1.1/1.1.1p/lib/libcrypto.dylib libcrypto.dylib
ln -s ../Cellar/openssl@1.1/1.1.1p/lib/libssl.dylib libssl.dylib 

This has the effect of forcing brew link openssl@1.1 which I don't think is really ok because homebrew insists that openssl be keg-only. But creating those symlinks does let me run Calibre 6.0.0 and fanficfare "Proceed with updating library" without crashing.

sidney commented 2 years ago

More experimentation: I unlinked the homebrew python to ensure that Calibre is using its own bundled Python. I deleted the libssl.dyib and libcrypto.dylib symlinks I created in /usr/local/lib. The crash behavior came back. I found the versioned libcrypto and libssl dylib files in /Applications/calibre.app in the Frameworks directory and tried making the symlinks there, but that did not help. Reinstating the symlinks in /usr/local/lib did make the crash go away again.

JimmXinu commented 2 years ago

All of that is good research, but the problem's not actually with FFF.

According to other reports, it will occur with any book add or file import that triggers DeDRM. This seems to be a similar issue.

So far the consensus is that DeDRM needs fixing. Work around is to disable/remove DeDRM in Cal6 until then. There's also been mention of a NoDRM that I don't know anything about.

I'm satisfied that it's not FFF, but I'll leave this issue open for now for others to see.

sidney commented 2 years ago

NoDRM seems to be a fork of the apprenticeharper/DeDRM GitHub repo that has taken over maintenance of the project.

From the readme on the DeDRM GitHub repo, last updated late last year: "I have not had the time to devote to this project in recent years that I would have liked. I am delighted to find that someone else has taken on the task of keeping the tools updated, and making releases. I shall be using noDRM's version of the tools from now on."

https://github.com/noDRM/DeDRM_tools is the fork of DeDRM that is referred to. I'll try that and open an issue there if it also has the bug.

sidney commented 2 years ago

NoDRM has already fixed it in the repo, though not yet in an official release. There is a comment in the issue about it that says how to download a build from their GitHub workflow that has the update: https://github.com/noDRM/DeDRM_tools/issues/96#issuecomment-1182492150

sidney commented 2 years ago

NoDRM has released version 10.0.3 which includes the fixes to support Calibre 6. Link to the latest NoDRM release: https://github.com/noDRM/DeDRM_tools/releases/latest

JimmXinu commented 2 years ago

Thanks for tracking this, glad we have a final solution.