jimmejardine / qiqqa-open-source

The open-sourced version of the award-winning Qiqqa research management tool for Windows
GNU General Public License v3.0
366 stars 60 forks source link

Issue: can't open nor delete problematic PDF #220

Closed Pask78 closed 3 years ago

Pask78 commented 4 years ago

I am having trouble with a PDF in my library (currently using v80). Qiqqa won't open the PDF, but when I mouse over the PDF icon in the Qiqqa library screen it displays the content. If I try to open it in another PDF viewer (Adobe DC) from Qiqqa, it opens and the file seems fine, but when I click on it to open it in Qiqqa I get a blank screen instead of the PDF. Interestingly, this happened on my desktop, and I then checked if the same thing occurred on my laptop (my library is synced to an intranet library on an external drive) and it didn't. Qiqqa was able to open the same PDF on my laptop.

I also tried to delete the PDF from Qiqqa on my desktop, purged deleted PDFs, quit and restarted Qiqqa, checked the log to identify the file name and checked that the file had indeed been deleted from the Qiqqa folder in AppData. I then downloaded the same paper again under a different name, and Qiqqa still couldn't open it. When I checked the log, it said that the document had been deleted and then reinstated, and the file name was the same as before. I also tried reindexing the document, and forcing the OCR in English, to no avail.

The error message I get is: 'Something unexpected has happened, but it's okay', and the problem summary is: 'Specified argument was out of the range of valid values. Parameter name: index'.

Here is part of the log for this error (hopefully there is enough here to make it clear):

20200616.055507 INFO [Main] Disposing PDFReadingControl 20200616.055507 INFO [Main] Flushing the cached page renderings for EAD34F21EF854CC94413408BD29A6B87F8517721 20200616.055507 INFO [Main] Flushing the cached page renderings for EAD34F21EF854CC94413408BD29A6B87F8517721 20200616.055507 INFO [Daemon.Maintainable:DocumentQueuedStorer.DoMaintenance_FlushDocuments] DocumentQueuedStorer: (0/0) 20200616.055529 INFO [Main] +Creating child page controls 20200616.055529 INFO [Main] -Creating child page controls 20200616.055529 INFO [Main] +Setting initial viewport 20200616.055529 INFO [Main] -Setting initial viewport 20200616.055529 INFO [Main] AnnotationReport:Initialising annotation report (0/1) 20200616.055529 INFO [Main] AnnotationReport: (0/0) 20200616.055530 INFO [28] AnnotationReportBackground: (0/0) 20200616.055613 INFO [Main] Opening new PDF viewer for Vandercammen2014, Relating Specific Emotions to Intrinsic Motivation: On the Moderating Role of Positive and Negative Emotion 20200616.055613 INFO [Main] +Creating child page controls 20200616.055613 INFO [Main] -Creating child page controls 20200616.055613 INFO [Main] +Setting initial viewport 20200616.055613 INFO [Main] -Setting initial viewport 20200616.055613 INFO [Main] +Creating child page controls 20200616.055613 INFO [Main] -Creating child page controls 20200616.055613 INFO [Main] +Setting initial viewport 20200616.055613 INFO [Main] -Setting initial viewport 20200616.055613 INFO [Main] AnnotationReport:Initialising annotation report (0/1) 20200616.055613 INFO [Main] AnnotationReport: (0/0) 20200616.055613 ERROR [Main] System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index at System.Windows.Media.VisualCollection.get_Item(Int32 index) at System.Windows.Controls.UIElementCollection.get_Item(Int32 index) at Qiqqa.Documents.PDF.PDFControls.PDFRendererControl.ScrollPages_ScrollChanged(Object sender, ScrollChangedEventArgs e) at System.Windows.Controls.ScrollChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at System.Windows.Controls.ScrollViewer.OnScrollChanged(ScrollChangedEventArgs e) at System.Windows.Controls.ScrollViewer.OnLayoutUpdated(Object sender, EventArgs e) at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent() at System.Windows.ContextLayoutManager.UpdateLayout() at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) 20200616.055613 INFO [Main] About to display client stats: Something unexpected has happened, but it's okay.

Thanks again so much for your time!

GerHobbelt commented 4 years ago

Hm, that's an odd one!

What you might want to try is install the latest v82beta release ( https://github.com/GerHobbelt/qiqqa-open-source/releases) and see what that one has to report. That one has much more intense diagnostics logging, so it would help me pin down what's going on.

Note that v82 is binary compatible with v80 and commercial v79 so you can always packpedal from that one by re-installing v80 using the setup.exe you downloaded for that one already. It will yak about the version and then you simply barge on with the install and you have v80 back with all your data, if v82 isn't to your liking (I know the bibTeX editor panel is crummy in v82)


The 'odd' bit here is that it looks like it's something in the UI code going bonkers on one machine but not the other. To get a potentially better handle on that issue, I would need more logging, preferably from a bleeding edge release so I have less work to attempt to reproduce or analyze the bugger. :-)

Thanks for reporting!

Met vriendelijke groeten / Best regards,

Ger Hobbelt


web: http://www.hobbelt.com/ http://www.hebbut.net/ mail: ger@hobbelt.com mobile: +31-6-11 120 978

On Tue, Jun 16, 2020 at 8:30 AM Pask78 notifications@github.com wrote:

I am having trouble with a PDF in my library (currently using v80). Qiqqa won't open the PDF, but when I mouse over the PDF icon in the Qiqqa library screen it displays the content. If I try to open it in another PDF viewer (Adobe DC) from Qiqqa, it opens and the file seems fine, but when I click on it to open it in Qiqqa I get a blank screen instead of the PDF. Interestingly, this happened on my desktop, and I then checked if the same thing occurred on my laptop (my library is synced to an intranet library on an external drive) and it didn't. Qiqqa was able to open the same PDF on my laptop.

I also tried to delete the PDF from Qiqqa on my desktop, purged deleted PDFs, quit and restarted Qiqqa, checked the log to identify the file name and checked that the file had indeed been deleted from the Qiqqa folder in AppData. I then downloaded the same paper again under a different name, and Qiqqa still couldn't open it. When I checked the log, it said that the document had been deleted and then reinstated, and the file name was the same as before. I also tried reindexing the document, and forcing the OCR in English, to no avail.

The error message I get is: 'Something unexpected has happened, but it's okay', and the problem summary is: 'Specified argument was out of the range of valid values. Parameter name: index'.

Here is part of the log for this error (hopefully there is enough here to make it clear):

20200616.055507 INFO [Main] Disposing PDFReadingControl 20200616.055507 INFO [Main] Flushing the cached page renderings for EAD34F21EF854CC94413408BD29A6B87F8517721 20200616.055507 INFO [Main] Flushing the cached page renderings for EAD34F21EF854CC94413408BD29A6B87F8517721 20200616.055507 INFO [Daemon.Maintainable:DocumentQueuedStorer.DoMaintenance_FlushDocuments] DocumentQueuedStorer: (0/0) 20200616.055529 INFO [Main] +Creating child page controls 20200616.055529 INFO [Main] -Creating child page controls 20200616.055529 INFO [Main] +Setting initial viewport 20200616.055529 INFO [Main] -Setting initial viewport 20200616.055529 INFO [Main] AnnotationReport:Initialising annotation report (0/1) 20200616.055529 INFO [Main] AnnotationReport: (0/0) 20200616.055530 INFO [28] AnnotationReportBackground: (0/0) 20200616.055613 INFO [Main] Opening new PDF viewer for Vandercammen2014, Relating Specific Emotions to Intrinsic Motivation: On the Moderating Role of Positive and Negative Emotion 20200616.055613 INFO [Main] +Creating child page controls 20200616.055613 INFO [Main] -Creating child page controls 20200616.055613 INFO [Main] +Setting initial viewport 20200616.055613 INFO [Main] -Setting initial viewport 20200616.055613 INFO [Main] +Creating child page controls 20200616.055613 INFO [Main] -Creating child page controls 20200616.055613 INFO [Main] +Setting initial viewport 20200616.055613 INFO [Main] -Setting initial viewport 20200616.055613 INFO [Main] AnnotationReport:Initialising annotation report (0/1) 20200616.055613 INFO [Main] AnnotationReport: (0/0) 20200616.055613 ERROR [Main] System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: index at System.Windows.Media.VisualCollection.get_Item(Int32 index) at System.Windows.Controls.UIElementCollection.get_Item(Int32 index) at Qiqqa.Documents.PDF.PDFControls.PDFRendererControl.ScrollPages_ScrollChanged(Object sender, ScrollChangedEventArgs e) at System.Windows.Controls.ScrollChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at System.Windows.Controls.ScrollViewer.OnScrollChanged(ScrollChangedEventArgs e) at System.Windows.Controls.ScrollViewer.OnLayoutUpdated(Object sender, EventArgs e) at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent() at System.Windows.ContextLayoutManager.UpdateLayout() at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) 20200616.055613 INFO [Main] About to display client stats: Something unexpected has happened, but it's okay.

Thanks again so much for your time!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jimmejardine/qiqqa-open-source/issues/220, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADCIHT42H44TLXDZPAB4YLRW4GOJANCNFSM4N7JSHBA .

Pask78 commented 3 years ago

Quick update: I think I have found a way of fixing this in case it helps anyone else.

The problem seems to be that some of the OCR files were not written properly. Typically the OCR writes several text files for each pdf, and the first text file states the page count of the document. In my library, I found that in many cases there was a single text file for a pdf. Also, in many other cases there were several text files but the page count was -1 in the first text file, which was inaccurate. When I checked back in Qiqqa, I found that these were the pdfs that I couldn't open, and I got the same error message: 'Specified argument was out of the range of valid values. Parameter name: index'.

I can only assume that there was a problem with the writing of these files.

I did a few tests and found that deleting the problematic OCR files and then running expedition fixed the problem by forcing Qiqqa to re-run the OCR.

I hope this helps!