Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeXworks blocks FNDB #249

Closed
1 task done
moewew opened this issue Jan 19, 2019 · 2 comments
Closed
1 task done

TeXworks blocks FNDB #249

moewew opened this issue Jan 19, 2019 · 2 comments

Comments

@moewew
Copy link

moewew commented Jan 19, 2019

Since an update not too long ago TeXworks started blocking the FNDB resulting in errors when running other MikTeX-related tools. Originally I discovered this issue when I was running an update, but I can consistently reproduce the issue now. I am quite confident that previously TeXworks would not exhibit such a behaviour.

On my machine (Win 10, MikTeX 2.9 updated this morning) the following steps can be used to reproduce the issue

  1. Start TeXworks
  2. Start the MikTeX Console (Admin mode)
  3. Click on Updates>Check for updates
  4. Wait a bit for the update to tell you that there are no updates
  5. Close the console
  6. Start any MikTeX binary from the command line, e.g. texdoc --view source2e.

The result is

C:\Users\Moritz>texdoc --view source2e

Sorry, but "MiKTeX Configuration Utility" did not succeed for the following reason:

  MiKTeX cannot access file 'C:\Users\Moritz\AppData\Local\MiKTeX\2.9\miktex/data/le\85b99c46f7c57ab7eee1f039aae264f1.fndb-5' because it is either locked by another MiKTeX program or by the operating system.

Remedy:

  Close running MiKTeX programs and try again.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\Moritz\AppData\Local\MiKTeX\2.9\miktex\log\initexmf.log

For more information, visit: https://miktex.org/kb/fix-file-in-use

Sorry, but "MiKTeX Help Utility" did not succeed for the following reason:

  MiKTeX cannot access file 'C:\Users\Moritz\AppData\Local\MiKTeX\2.9\miktex/data/le\85b99c46f7c57ab7eee1f039aae264f1.fndb-5' because it is either locked by another MiKTeX program or by the operating system.

Remedy:

  Close running MiKTeX programs and try again.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\Moritz\AppData\Local\MiKTeX\2.9\miktex\log\texdoc.log

For more information, visit: https://miktex.org/kb/fix-file-in-use

texdoc.log

2019-01-19 10:13:16,568+0100 INFO  texdoc - starting with command line: texdoc --view source2e
2019-01-19 10:13:16,568+0100 INFO  texdoc - running 'initexmf' to refresh the file name database
2019-01-19 10:13:16,799+0100 FATAL texdoc - Windows API error 1224: Der Vorgang ist bei einer Datei mit einem geöffneten Bereich, der einem Benutzer zugeordnet ist, nicht anwendbar.
2019-01-19 10:13:16,799+0100 FATAL texdoc - Info: path="C:\Users\Moritz\AppData\Local\MiKTeX\2.9\miktex/data/le\85b99c46f7c57ab7eee1f039aae264f1.fndb-5", modeString="wb"
2019-01-19 10:13:16,799+0100 FATAL texdoc - Source: Libraries\MiKTeX\Core\File\win\winFile.cpp
2019-01-19 10:13:16,799+0100 FATAL texdoc - Line: 551

initexmf.log

2019-01-19 10:13:16,746+0100 INFO  initexmf - starting: MiKTeX Configuration Utility 2.9.6937 (MiKTeX 2.9.6930 64-bit)
2019-01-19 10:13:16,746+0100 INFO  initexmf - Operating on the private (per-user) MiKTeX setup
2019-01-19 10:13:16,746+0100 INFO  initexmf - starting with command line: initexmf --quiet --update-fndb
2019-01-19 10:13:16,784+0100 INFO  initexmf - Creating fndb for user root directory (C:\Users\Moritz\AppData\Roaming\MiKTeX\2.9)...
2019-01-19 10:13:16,784+0100 FATAL initexmf - Windows API error 1224: Der Vorgang ist bei einer Datei mit einem geöffneten Bereich, der einem Benutzer zugeordnet ist, nicht anwendbar.

2019-01-19 10:13:16,784+0100 FATAL initexmf - Info: path="C:\Users\Moritz\AppData\Local\MiKTeX\2.9\miktex/data/le\85b99c46f7c57ab7eee1f039aae264f1.fndb-5", modeString="wb"
2019-01-19 10:13:16,784+0100 FATAL initexmf - Source: Libraries\MiKTeX\Core\File\win\winFile.cpp
2019-01-19 10:13:16,784+0100 FATAL initexmf - Line: 551

resmon.exe confirms that miktex-texworks.exe is hogging the relevant file C:\Users\Moritz\AppData\Local\MiKTeX\2.9\miktex/data/le\85b99c46f7c57ab7eee1f039aae264f1.fndb-5.

Closing TeXworks then lets me execute the command as desired.

I know that this procedure is explained in https://miktex.org/kb/fix-file-in-use, but I would still like to draw your attention to this issue for the following reasons

  1. I'm quite confident this pattern or behaviour emerged only after a recent update (no more than three weeks back, I presume). (I can't be sure, but I suspect this issue is in part related to the errors in Help to solve the issue with recent version MiKTeX 2.9.6930 of 2019/1/14 #247.)
  2. It is a bit counter-intuitive that TeXworks of all programmes would have to hog the FNDB.
  3. It is inconvenient since it basically precludes any MikTeX maintenance (update etc.) from being run while TeXworks is open.

edit A short bit of digging in initexmf.log reveals that the error started occurring on my system on 2019-01-05 10:28:25,610+0100. Presumably it was caused by the big MikTeX updates from 2019-01-02 or thereabouts.

The log also shows that I have never had similar issues before (at least since 2017), even though I'm absolutely certain that I used to run the updater with TeXworks open. So this is really a recent change in behaviour.

@edocevoli
Copy link
Member

Thank you. There is even an easier way to reproduce the bug:

  1. Start TeXworks
  2. Run initexmf -u

@edocevoli edocevoli added this to the 2.9.6960 milestone Jan 27, 2019
@edocevoli
Copy link
Member

I cannot reproduce the issue with the latest update - it has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants