[texworks] external read-access causes TeXWorks to revert open file to old version
Stefan Müller
warrence.stm at gmx.de
Tue Oct 26 10:16:06 CEST 2010
Hi Paul,
On 26.10.2010 02:12, Paul A Norman wrote:
> Stefan,
>
> Just to clarify from your earlier postings, you said that you have two
> boxes, an Xp and a Linux box?
>
> 1. Was this happening under both Os-es please? I'm still thinking of
> caching issues here.
It happens under both Os-es. I'm using v0.3 r606 on Windows and v0.3
r670 (with those extra debug lines from on of the previous mails) on Linux.
> 2. And have you tried exactly the same procedures of what you call a
> "Positive run", not using TeXworks but instead a very simple text
> editor (preferably a GUI one).
No, I haven't tried that. Mostly because I don't know any other nice TeX
editor for Linux. I could try to reproduce a "positive run" with Scite.
I'll report back soon about this.
> 3. Otherwise ... apparently there are two versions of TortoiseHG and
> one of them is a Qt version -can you determine which one you are on?
> ...
In the TortoiseHG info is something written about "Python, PyGTK, GTK",
so I suppose I'm not using the Qt version. I didn't know there was one.
Stefan
> Thoughts ...
>
> A. (i)(Starting to wonder if it is an intermittent Qt file handling
> issue - does Qt use any memory caching in opening and accessing and
> prior to commit to disk? Or build a virtual drive in Ram for
> temporary staging (same thing practically I suppose)?
> (ii) If so, is there an explicit flush/clear that needs to be called?
> (iii) Is TortoiseHG Qt version accessing this same memory file
> caching area (wouldn't
> that trigger some sort of a violation error message though or
> does Qt leave a door
> open for that between Qt applications?)?
>
> Paul
>
> On 26 October 2010 09:36, Stefan Müller<warrence.stm at gmx.de> wrote:
>> Another thing I just recognized: In a "positive run" (i.e. where the problem
>> occurs) TW prints (beside others) the following debug messages:
>>
>> Loading: "/dir/to/my/file.tex"
>> Loading: "/dir/to/my"
>> ...
>> Loading: "/dir/to/my"
>> Changed: "/dir/to/my/file.tex"
>> Loading: "/dir/to/my/file.tex"
>>
>> Is it correct, that sometimes the directory and sometimes the file is
>> loaded?
>>
>> Stefan
>>
>>
>> On 25.10.2010 19:19, Stefan Müller wrote:
>>>
>>> Hi,
>>>
>>> it has been a while since the last reply, but I was only now able to
>>> test again on my Linux machine with those debug messages you gave me (I
>>> didn't compile it for Windows).
>>>
>>> So, still strange things that happen. (Sometimes) When I change
>>> something in the open tex file in TW, save and commit this change with
>>> TortoiseHG (my Mercurial client), the debug messages say that the open
>>> tex file has changed and that the same file is loaded (again). Then TW
>>> displays an older version of the tex file. To get my current file back I
>>> have to reopen TW.
>>>
>>> So there are basically two possiblities I can think of.
>>> (1) TW has a problem with TortoiseHG accessing the tex file and
>>> "restores" an old version of the file. What goes wrong? Where does the
>>> old file come from?
>>> (2) TortoiseHG messes with the tex file causing TW to reload it. Why
>>> should TortoiseHG write on the file? And if TortoiseHG temporarily
>>> writes to the tex file, why doesn't TW reloads again when TortoiseHG
>>> restores the current (committed) version?
>>>
>>> Hopefully someone has an idea what's causing the problem or how it could
>>> be fixed, especially if it's (1). Thanks in advance.
>>>
>>> Best regards,
>>> Stefan
>>>
>>> On 22.09.2010 18:07, Stefan Löffler wrote:
>>>>
>>>> Am 2010-09-22 17:49, schrieb Stefan Müller:
>>>>>>
>>>>>> Anyway, if you build Tw yourself, you could add the following to lines
>>>>>> (linenumber where to add in brackets) to get some debugging
>>>>>> information:
>>>>>> [959] qDebug()<< "Loading:"<< fileName;
>>>>>> [1094] qDebug()<< "Changed:"<< curFile;
>>>>>> This should print the filenames Tw loads, and whenever it detects a
>>>>>> change to the filename on the harddisk.
>>>>>
>>>>> Maybe that's not clever to ask, but in which file should I put those
>>>>> lines? I
>>>>> looked into TWApp.cpp, but it looks wrong there...
>>>>
>>>> Oops, sorry. In src/TeXDocument.cpp.
>>>>
>>>> Stefan
>>>
>>
>
>
More information about the texworks
mailing list