Created attachment 140346 [details] crash log SUMMARY Creating nameless brush tip from clipboard does not save the brush tip file correctly. Also this causes the current version of krita to crash when choosing a preset that has it set as it's brush tip. The crashing does not happen with an older build I had been using (d01cd76e94), though the general problem does. I've lost several tips to this, but just didn't really dig into why at the time. STEPS TO REPRODUCE 1. Create a new file, draw something. Select and copy. 2. Create brush tip from clipboard, don't name it. 4. Restart krita. To make it crash, do the same but save a brush preset before restarting, then try to select it after restart. I've also had problems going to the predefined brush tips in the brush editor making things crash using a database that had several problematic brush presets, but could not replicate with a fresh one. OBSERVED RESULT The brush tip disappears on restart, probably because the brush tip file is empty/invalid. In the log I see `dependent resource "2021-07-26T18:13.gbr" misses.` when I open the brush presets list. In the older version I don't get that, instead when I select the brush I get: `Using fallback brush brushFileName = "2021-07-26T18:13.gbr"` In the resources folder I see it saves a file with a date for a name (e.g. 2021-07-26T18) when I save the brush, but it has no extension or size. Also, I wonder if the lack of the part after the colon in the filename is part of the problem? If I name the tip, this doesn't happen. A proper .gbr file is created. Strangely, deleting the file or even the database, does not help, still crashes. The only fix is deleting the preset manually or using an older build of krita to "fix" the preset and assign a properly saved tip to it, then open in new krita. SOFTWARE/OS VERSIONS Windows 10 Krita: 178019461d
* I cannot reproduce the brush disappearing on restart * I cannor reproduce the crash when using the brush as a preset * the brushes are saved with a gpr extension I think the missing extension was the issue, but that seems to be fixed as of a65d880f8051e69edc384c9b75046c9c74f0b337
I built from master (f808f0c53e0a2fb6490c11779ca98ad8a68e0a01 so after that commit), but am still getting all the problems. Does not save correctly. Crashes. I'll try with the nightly when it comes out including that commit just to be sure. Crash log does look different now though, I'll attached it.
Created attachment 140354 [details] crash log 2
Yeah, tested on nightly (6ebbd5279e) just to be sure, still a problem for me. Did you try this on linux or windows? If on linux and it works and am assuming uses a colon in the file name, I further suspect it's the issue because windows files can't have colons in them. Also I only just realized this, but the lack of the part after the colon means you also get crash #1 when you try to create two different brush tips this way within the same hour (only within the same session, strangely restarting krita between brush tip creations avoids it).
Reopened because it sounds like a good explanation.
I tested on Linux. My laptop broke on Monday, so I don't have a Windows system anymore :-(
Git commit dba82ce47a8b8690dca200281450fa616e8a2977 by Halla Rempt. Committed on 29/07/2021 at 09:06. Pushed by rempt into branch 'master'. Remove color from the autogenerated clipboard brush name M +1 -1 plugins/paintops/libpaintop/kis_clipboard_brush_widget.cpp https://invent.kde.org/graphics/krita/commit/dba82ce47a8b8690dca200281450fa616e8a2977
Just tested, tips no longer disappear and they save fine with an extension and everything, so it was the colon causing problems on windows. I haven't tried other resources, but if anything else saves like that, it might have the same problem. BUT... still getting a crash (crash log 2) when saving any brush tips with the same name (blank or named). Feels like a separate bug though now that I've pinned it down more, I've filed a new issue: https://bugs.kde.org/show_bug.cgi?id=440435
I might have spoken too soon. Forgot to test the crash *facepalm*. That's still happening when there's a preset whose brush tip doesn't exist. I was also getting crashes suddenly when just saving any preset, but when I deleted my database and removed the brushes that had missing tips, they stopped.
*** Bug 440295 has been marked as a duplicate of this bug. ***