Odrive sync client causes unhandled exception in calibre

Quote from Kovid Goyal (Calibre’s author):

Sigh. I already told them how to fix it in the previous post. They have two options:

  1. Learn to write code that does not crash, but instead fails gracefully.
  1. If they cannot do that, stop injecting code into other peoples processes. I even told them how to do that in my previous post – create two DLLs, the first a loader DLL that checks if the process name is explorer.exe, and only then loads their actual DLL.

I will simply tell calibre users who encounter this problem to uninstall this software. Running software from people who think it is OK to insert code into other peoples processes and then blame those other people for crashes their code causes is not a good idea, who knows what other crazy things it does.

Oh and just for completeness, since they dont seem to understand the cause of this crash in their code.

Their problems are caused by the fact that they are embedding a python interpreter in their shell extension DLL. python interpreters use global variables, they are not designed to have multiple instances running in a single processes’ address space. (Technically you can use something called sub-interpreters, but that does not apply here). Their DLL is going to cause all sorts of problems from crashes to memory corruption in any application that uses python (as calibre does).

Writing shell extensions in python is a really bad idea. If they insist on doing it, they need to limit their extension to only run in explorer.exe, as I described before.