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
Exception when saving device-specific brushes: too long path? #629
Comments
The stroke delay ("lag") issue is being handled elsewhere: #390. I don't know what "a flicker between the mouse cursor and the brush" means. But we can deal with that exception here 😄 @Greenfox62: It happens when you quit/exit/close MyPaint, correct? The exception tells me that it trying and failing to save the brush you last used with either your tablet or your mouse (sorry, I can't read the encoded characters!) |
The
I'll assume that's a perfectly reasonable name for a device, although I've never seen any device name like that in Linux before.:open_mouth: 💭 I suspect the URL encoding we use to create a safe filename from these unpredictable strings might be making the path length go over a Windows OS hard limit. The full path above is
which is 281 ASCII characters long! Does Windows have a hard limit at 256? Apparently, yes!
How to fix thisWe should almost certainly be using hashes with standard lengths for naming the files we use when saving device brushes. A predictable UUID scheme should work: we use UUID-based temporary file names elsewhere without any issue. UUID version 5 with a hardcoded MyPaint-specific namespace UUID looks appropriate. In python terms, that's We'll need to think about backwards compatibility, and on which branch it will be appropriate to merge the fixes for this bug. |
At the very latest, this should be fixed properly for 1.3.0. If we're clever, a robust fix that reads new scheme names but falls back to old scheme names, and which writes both could be merged into |
Retitled to refer to just the issue we can work on. Don't pack multiple problems into a single issue please! (Luckily the "extras" look like duplicates, or trivial glitches.) This path limit is Windows-specific, but other OSes might suffer from similar problems. Let's leave it as a cross-platform one. |
Thanks alot, I hope its fixed cause MyPaint looks like a really cool program |
Is there any reason to percent-encode a name? Passing the name as is should fix the issue. However, for backward compatibility, this will require replacing spaces by +. |
@danpla In this case, a shorter hash or uuid is the right approach, I think. I'm pretty certain we don't need to do a reverse lookup from disk. |
I can create a pull request for the issue (uses uuid5). (I did not know that you self-assigned it :( ) BTW:
|
When using tablet pen the strokes are delayed and there is a flicker between the mouse cursor and brush but just drawing the mouse seems fine.
Bug report
Tablet-Manhattan Model Number: 177412
Ram- 3GBs
Mouse- Manhattan Model:177016
The text was updated successfully, but these errors were encountered: