Menu

#1401 Memory leak in PDF viewer when it fails to load the PDF

None
fixed
nobody
None
1
2015-08-09
2015-08-09
No

The PDFviewer in TXS leaks 5-10 MB per second whenever it fails to load the PDF. This oftentimes happen to users when they cancel the build process (which happens often when your compile time is very long and you want to make sure you have made all necessary modifications to warrant a new built). Closing the PDFviewer stops the leakage (obviously without freeing it as the viewer does not have its own process), trying to view the non-existent PDF starts it again.
This may be the reason for the unresolved issue reported in https://sourceforge.net/p/texstudio/bugs/1114/ and maybe some other issues about high memory usage as well.

I use TeXstudio 2.9.4 (hg 5006:b43062855b2d), Mac OS X 10.10.3.

PS: Thank your for this awesome editor -- don't know what I'd do without it.

Discussion

  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-08-09

    what exactly do you need to do to provoke the leak ?
    Loading an incomplete pdf is suffiecient ?
    Can you provide an example then ?

     
  • Christian W.

    Christian W. - 2015-08-09

    Take any source document, even the most minimal (only including article class definition and blind text), press compile and view and cancel after the previous PDF has been deleted and before the new has successfully been build. This will result in the yellow message box appearing in the PDF viewer, saying something like "filename does not appear to be a valid PDF. Either it is corrupted or in the process of building. Retrying every two seconds." For the time of this dialog being shown, TXS leaks memory and, not very surprisingly, further tests have shown that it correlates to the size of the corrupted document. I would speculate the file handle isn't closed properly or something similar. Anyway, closing the message box or the PDF viewer stops the leakage (but does not free the memory) and clicking on the view button (only after having closed the viewer) will bring up the message box again and the leakage starts all over again.
    To answer your question: yes, I think loading an incomplete PDF is sufficient.

     
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-08-09

    fixed in repository

     
    • Christian W.

      Christian W. - 2015-08-09

      great!

       
  • Jan  Sundermeyer

    Jan Sundermeyer - 2015-08-09
    • status: open --> fixed
    • Group: -->
     

Log in to post a comment.

MongoDB Logo MongoDB