-
Notifications
You must be signed in to change notification settings - Fork 5
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
Editing main.lua on Quest 2 using TurboEditor or VIM results in corrupted file and parser errors #3
Comments
Okay, sorry, can you clarify?
Lovr should, as far as I know, not be writing to these files or retaining open copies of the files. I don't think any behavior of lovr could be causing this. So what it sounds like to me is that your copy of vim is either broken or is built for linux in a way which does not transfer to Android. Do you get the garbled files if you edit with vim when lovr is NOT running? |
1: Yes: https://f-droid.org/en/packages/net.momodalo.app.vimtouch/ Same behavior happens with https://play.google.com/store/apps/details?id=com.maskyn.fileeditor&hl=en_US&gl=US Syncing with ADB or other file transfer methods from a PC works. But editing files directly on the quest results in file corruption. 2: Correct. And file contents are garbled in a very specific way: This is the last function listed in the main.lua I am testing at the moment:
When I edit that file and save on the quest, the end of the file looks like this:
Note: the file is the same number of bytes long before and after the edit. |
It sounds like the answer to this question is "yes". In other words, this is not a bug in lovr/lodr, and there is nothing we can do about it. I think you should file your bug on VimTouch, as that appears to be the app with the problem on Quest. (Unfortunately it appears VimTouch is not an active project, though that link has a few suggestions for alternatives.) If what you are looking for is just advice, I checked with Daniel Micay from the Graphene project (an Android custom ROM) because he is more familiar with Android OSS resources than I am. Daniel said:
I recommend either trying out Termux as both Daniel and the people in the VimToch issue suggest, or asking in the Graphene Matrix channel if anyone knows of a general solution. Good luck |
I've been trying to figure out a dev / test loop entirely on the Quest 2.
Seems that editing main.lua in TurboEditor or VIM on the Quest 2 using a bluetooth keyboard, resulting in a slightly smaller file, saving it, then switching to Lodr, or starting Lodr after killing it, always fails.
Reason seems to be parser errors on main.lua (the edited file). When I look at the contents of the file, it's as if the edited version was saved over top of the previous version without unlinking the previous version first. Such that the contents are correct but the file length is longer than it should be - as long as the original version of the file instead of the edited version - and the difference is made up of bytes from the original version.
Not sure exactly what's going on. Seems like a buffer or file IO ordering issue. Advice welcome.
The text was updated successfully, but these errors were encountered: