benchen71 / epub-metadata-editor

Edit the metadata of EPUB files
185 stars 11 forks source link

Unhandled Exception when opening epub file #85

Closed dojomo closed 4 months ago

dojomo commented 4 months ago

Epub Metadata Editor works great but i had an issue with one epub file. When I try to open it using EPUP Metadata Editor Version 1.9.6 The below Error is shown.

When I loaded the epub into Calibre I was able to see and edit the Metadata in Calibre. When I imported the file in Calibre and exprted it from Calibre, I was able to open it using Epub Metadata Editor.

System.ArgumentException: The argument start must be bigger than 0 (null).
   bei Microsoft.VisualBasic.Strings.InStr(Int32 Start, String String1, String String2, CompareMethod Compare)
   bei EPubMetadataEditor.Form1.OpenEPUB()
   bei EPubMetadataEditor.Form1.Form1_Load(Object sender, EventArgs e)
   bei System.EventHandler.Invoke(Object sender, EventArgs e)
   bei System.Windows.Forms.Form.OnLoad(EventArgs e)
   bei System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   bei System.Windows.Forms.Control.CreateControl()
   bei System.Windows.Forms.Control.WmShowWindow(Message& m)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblys **************
mscorlib
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.9174 (WinRelRS6.050727-9100).
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll.
----------------------------------------
EPubMetadataEditor
    Assembly-Version: 1.9.6.0.
    Win32-Version: 1.9.6.
    CodeBase: file:///C:/Program%20Files%20(x86)/EPubMetadataEditor/EPubMetadataEditor.exe.
----------------------------------------
Microsoft.VisualBasic
    Assembly-Version: 8.0.0.0.
    Win32-Version: 8.0.50727.9157 (WinRelRS6.050727-9100).
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll.
----------------------------------------
System
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.9176 (WinRelRS6.050727-9100).
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Windows.Forms
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.9157 (WinRelRS6.050727-9100).
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System.Drawing
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.9157 (WinRelRS6.050727-9100).
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
System.Runtime.Remoting
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.9176 (WinRelRS6.050727-9100).
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll.
----------------------------------------
System.Configuration
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.9157 (WinRelRS6.050727-9100).
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
----------------------------------------
System.Xml
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.9157 (WinRelRS6.050727-9100).
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
mscorlib.resources
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.9174 (WinRelRS6.050727-9100).
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll.
----------------------------------------
Microsoft.VisualBasic.resources
    Assembly-Version: 8.0.0.0.
    Win32-Version: 8.0.50727.9157 (WinRelRS6.050727-9100).
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic.resources/8.0.0.0_de_b03f5f7f11d50a3a/Microsoft.VisualBasic.resources.dll.
----------------------------------------
System.Windows.Forms.resources
    Assembly-Version: 2.0.0.0.
    Win32-Version: 2.0.50727.9157 (WinRelRS6.050727-9100).
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------
benchen71 commented 4 months ago

Sounds like there was an issue with the EPUB. If you can attach the original to a comment here on Github (just change .epub to .jpg and then attach the file as an image) I might be able to incorporate the required error checking. Otherwise, your solution of going through Calibre will have to do!

dojomo commented 4 months ago

The .epub in question is a book I bought. I don't want to share it publicly. Since it worked when going through Calibre I'm ok with it. This is the eBook in question: https://www.thalia.de/shop/home/artikeldetails/A1063544345