UI : minor/high : bug when customising labels; crash

This contains two bugs because I am not sure if they are related. The crashing bug is high priority as it corrupted application preferences. The other bug is very minor, unless of course it is related to the crashing part.

When I first found this bug, I was editing label colours after having added a new one. Parts of the dialogue became unresponsive, so I clicked okay and the application promptly crashed. After that point, it crashed whenever opening the project that I had been editing, or when making a new project. Deleting the preferences fixed this. I have included the follow files:

Crash log from right after the initial crash when exiting project settings.
Crash log from one of the subsequent crashes when trying to open project again.
Zip file containing preferences which cause this crash.

The project file appears undamaged. After deleting preferences, it opened fine, and the label I had added before the crash was not there.

Here are the precise steps that I took before the crash:

  1. Cmd-. to open Project Settings
  2. Click the “+” button to add a new label
  3. Press to end typing after adding text “Alert”.
  4. Double-click new colour chip to change it. Select a colour. Close palette.
  5. Immediately double-click on a previously assigned colour chip in the list. Nothing should happen at this point.
    Here is where I clicked out of the settings and the application crashed.

Note that I can no longer reproduce the crash. I have tried a dozen times to no avail. For the mystery of the uneditable labels, read on:

Here is the thing with labels. I’m not sure if it is actually related to the crash, but the reason why the older colour chips were unresponsive has nothing to do with the above steps. They are simply that way in the Tutorial. If you create a new project, you can do whatever you like with the stock labels. It is just the tutorial that has issues, so that part of the bug is super minor, unless it is indicative of some deep seated issues somewhere. Here is a list of the oddities:

  1. They can both be deleted.
  2. Neither can have their colour edited.
  3. “Chapter” can be renamed just fine.
  4. “Concept” pretends that it can be renamed, but then the rename field jams and refuses to exit.
  5. They can be reordered.

If one really needs a work-around to this highly specific bug, just delete them both and re-create them. Problem solved.

Actually, this bug is one of the reasons I asked people to wait a little while before importing their projects. :slight_smile:

I have fixed the second part of this, and this should have fixed the crashing issue, too. Basically, I made a mistake in the original SG format, whereby the labels and status list, all of those items, were internally uneditable. I got around that by converting them to editable when needed. I fixed this for Scrivener so that this wasn’t necessary - but that means that when you open old projects, Scrivener tries to edit what is not editable, which will mean they won’t respond and ultimately can lead to a crash. Deleting them and replacing them fixes it, and you can add new items fine.

I’m not quite sure what it was in the preferences that was corrupted, but almost certainly it is all related.

This is fixed for beta 2, but it will mean re-importing old projects. I have improved the importer so that it now converts the old label and status lists to be editable, so you will no longer have any issues.