![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 908
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
|
segfault using calibredb add
I am attempting to debug a segfault in a plugin when adding a book using calibre-debug. The output of calibre-debug -h gives an example of this, but when I tried it I got:
Code:
dhdurgee@z560:~/Downloads$ calibre-debug -r "Add Books" -- ./Created\ Equal.epub Traceback (most recent call last): File "runpy.py", line 194, in _run_module_as_main File "runpy.py", line 87, in _run_code File "site.py", line 45, in <module> File "site.py", line 41, in main File "calibre/debug.py", line 315, in main File "calibre/customize/__init__.py", line 324, in cli_main NotImplementedError: The Add Books plugin has no command line interface dhdurgee@z560:~/Downloads$ Code:
-r RUN_PLUGIN, --run-plugin=RUN_PLUGIN Run a plugin that provides a command line interface. For example: calibre-debug -r "Add Books" -- file1 --option1 Everything after the -- will be passed to the plugin as arguments. Code:
calibredb add ./Created\ Equal.epub --with-library=~/Calibre\ Library Dave Last edited by dhdurgee; 05-24-2022 at 06:51 PM. Reason: add command line approach |
![]() |
![]() |
![]() |
#2 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,969
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Moderator Notice I'm moving this thread to the Calibre forum instead of the plugin specific sub-forum and renaming it appropriately. From what you say, you aren't getting a seg fault from a plugin, you're getting one from running Calibre CLI calibredb add. I'm not personally well versed with what may cause that. Are you using an OS distro bundled version of Calibre? Or the official release? The error you see from calibre-debug -r is unrelated. "Add Books" is a built-in action, which plugins share many similarities with, but aren't quite the same thing. Not sure why Kovid gives an example in the calibre-debug -r help text of 'Add Books' except that it's a placeholder instead of using something like 'Plugin Name'. The 'Add Books' built-in action doesn't have a plugin style CLI |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's not a segfault, thats an error saying that the Add Books plugin doesnt have a CLI. You are supposed to replace "Add Books" with the name fo the plugin you want to run.
|
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 908
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
|
The segfault is occurring in a plugin when I attempt to add the book either using the GUI or the command line option.
Code:
dhdurgee@z560:~/Downloads$ calibredb add ./Created\ Equal.epub --with-library=~/Calibre\ Library DeDRM v10.0.2: Trying to decrypt Created Equal.epub DeDRM v10.0.2: Verifying zip archive integrity DeDRM v10.0.2: Created Equal.epub is a secure Adobe Adept ePub for UUID 500ec903-efb8-45ec-8cc0-8ff5db93808a DeDRM v10.0.2: Trying Encryption key RTC Segmentation fault (core dumped) dhdurgee@z560:~/Downloads$ Dave |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If this is a file type plugin like a drm removal plugin it is run automatically when adding, you cant run it manually using -r (-r is for plugins that explicitly provide an actual CLI of their own).
You wont get any debug information for a segfault unless you run the program under gdb or use something like echo bt | coredumpctl gdb But even then since most binaries have debug information stripped on Linux, you wont get very useful backtraces. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 908
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
|
Problem is solved. I had an incorrect item in the configuration file and it appears that was the cause of the segfault. Removing the incorrect value corrected the problem.
So this was a case of a plugin not handing an incorrect value very well. Dave |
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Can you post some details? That would let the plugin writer fix the issue so it doesn't hit others.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Speedup calibredb add? | asm0dey | Library Management | 0 | 05-21-2022 08:32 AM |
calibredb add failes | asm0dey | Library Management | 10 | 05-21-2022 06:25 AM |
calibredb add questions | jindroush | Related Tools | 7 | 01-31-2018 12:10 AM |
calibredb add problem | jmwatte | Calibre | 6 | 10-17-2014 02:30 AM |
calibredb add -- how to add additional metadata? | TuxGirl | Calibre | 16 | 12-29-2011 01:01 AM |