gnosygnu / xowa

xowa offline wiki application
Other
374 stars 41 forks source link

File MWServer.lua held open #488

Open desb42 opened 5 years ago

desb42 commented 5 years ago

I saw your fix for #475 involving updating MWServer.lua and went to edit this file and uncomment the three lines When I tried to save this file, my editor complained.

My editor tries to rename the old file and save a new copy. It failed on the rename - this indicates to me that the file is write locked (probably due to the file not being closed) This may be a Windows10 artifact. However I do not see any reason for the file to remain open

desb42 commented 5 years ago

I forgot to mention, this is while xowa-gui was running

gnosygnu commented 5 years ago

That's a strange bug. For what it's worth, I can't reproduce that on my Windows 7 machine (I was debugging last night by continually modifying the file).

This is going to be hard to track down. I think LuaJ is opening that file. However I checked it's main file opening operation now and ...

Code link for reference: https://github.com/gnosygnu/luaj_xowa/blob/master/src/core/org/luaj/vm2/lib/BaseLib.java

Will look at more later.

desb42 commented 5 years ago

Very curious

In the following screenshot I tried to rename the lua file (while running xowa-gui) locked This seems to be the only file I can find that exhibits this behaviour