#1661 About feature request #1186638

closed
Yap (316)
2012-11-08
2008-01-22
Hector C
No

Implementation of feature #1186638 leads to a race condition. In order to reproduce this bug:

  • create a dvi file
  • open it in yap
  • copy the dvi file to a temporary file
  • delete the dvi file
  • focus on yap (one obtains error here)
  • copy the temporary file back to the original value
  • focus on yap (error is still here)

The above sequence reproduces, with a long time scale, what would happen if yap is monitoring the dvi file while the dvi file is being generated. Avoiding this race condition implies mutexes of some sort (e.g. locking the dvi file) or copying the dvi file to a temporary location. Since all of them are less than optimal, I advice this feature should be removed and replaced by a method to call forced refresh from the external application (I think a simple reopening of the file suffices if the last viewed position is kept).

Discussion

  • Hector C

    Hector C - 2008-01-22

    Logged In: YES
    user_id=1414685
    Originator: YES

    By the way, I am using yap 2.7.2868.

     
  • Christian Schenk

    Logged In: YES
    user_id=67066
    Originator: NO

    I cannot reproduce the bug. Here is what I have done:

    • create a dvi file
    • open it in yap
    • copy the dvi file to a temporary file
    • delete the dvi file
    • focus on yap (one obtains error here)
      [This error message would be expected.]
    • copy the temporary file back to the original value
    • focus on yap: no error message; F5 brings the document
      back
     
  • Hector C

    Hector C - 2008-01-22

    Logged In: YES
    user_id=1414685
    Originator: YES

    Your description shows that you have actually reproduced the bug. The procedure shows a race condition (see http://en.wikipedia.org/wiki/Race_condition) that can be triggered while the dvi file is being updated, say by texify, while yap is accessing it ( e.g. to check for its existence). The "copy/delete/rename back" sequence emulates, with a large time scale, the problems that yap faces when the dvi file becomes temporarily unavailable. Similar bugs have been reported elsewhere:

    [ 1647410 ] YAP API Error 5 after "lock computer",
    [ 1783752 ] yap: locks files,
    [ 1626441 ] Permission denied to read input by Yap,
    [ 1590780 ] texify and YAP file locks.

    Some of them have been dismissed as not reproducible. Race conditions are hard to reproduce. With this procedure the race condition is proven.

     
  • Christian Schenk

    Logged In: YES
    user_id=67066
    Originator: NO

    Then I don't understand your problem report, i.e., I wont fix a bug.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks