Scrivener 2.3 Not tracking / saving new text when entered

Hi there.

I’m on a MacBook Pro with a 2.4 GHz Intel Core 2 Duo processor with 4GB of ram. I’m running Mac OS X 10.6.8 and have Scrivener 2.3 installed as of a little over a week ago, maybe slightly longer.

Since the upgrade, I have had something very weird happen to me twice now.

I tend to keep Scrivener projects open and running all the time, but will close the lid on the laptop to put it to rest when I’m not using it. About four days ago, I flipped the lid open, switched to my project and started writing. I wanted to know how I was doing, so I opened the Project Targets window, kept typing. Noticed that the Session Target wasn’t moving. I selected all the text in the scene and saw I had managed about 1200 words. I cut them, Session Target didn’t change (Neither did the Manuscript Target). Pasted them back in, still no change.

I clicked to save the Project and closed Scrivener. Started it back up again, and none of the work I’d done was there - the scene was blank. Luckily, I had it in the clipboard, so I pasted it back in. The Session Target shot up by 1200 words. I saved the Project again, closed Scrivener, reopened it, and the Project. Everything was still there.

I chalked it up to weirdness and moved on.

Today it happened again.

Sat down to do some writing, flipped the laptop lid open, switched to my project. I wanted to create a new scene, so I typed a couple of words, moved the cursor ahead of them and hit Command K to split the scene and create a new one. Nothing happened. Tried again. Nothing. I tried typing some more words, inserted the cursor, hit Command K - nothing. I went into the menu and hit: Document > Split > At Selection. Nothing.

I thought this was really weird. I moved the cursor into some text I had typed the night before, hit Command K, and it split the scene - but the new text I’d typed vanished. Again, I opened Project Targets and started typing. The Session Target didn’t budge. (Neither did the Manuscript Target)

Hit save, closed Scrivener. Reopened Project to find my scene was still split, but the text I’d typed (just a few words) was not there.

I looked at Console, and this is what it lists under Scrivener (hoping this will help):

7/19/12 2:46:08 PM Scrivener[222] HIToolbox: ignoring exception ‘*** -[NSCFString substringWithRange:]: Range or index out of bounds’ that raised inside Carbon event dispatch
(
0 CoreFoundation 0x906ef6ca __raiseError + 410
1 libobjc.A.dylib 0x934dd5a9 objc_exception_throw + 56
2 CoreFoundation 0x906ef3f8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x906ef36a +[NSException raise:format:] + 58
4 Foundation 0x9481f9f2 -[NSCFString substringWithRange:] + 267
5 Foundation 0x9489915a -[NSAttributedString attributedSubstringFromRange:] + 264
6 AppKit 0x919105bc -[NSTextStorage attributedSubstringFromRange:] + 147
7 Scrivener 0x000f1536 -[SCRMainDocument(SplitAndMerge) splitTextDocumentUsingSelectionAsTitle:] + 1220
8 Scrivener 0x000ef922 -[SCRMainDocument(SplitAndMerge) splitTextDocument:] + 58
9 AppKit 0x9172ea26 -[NSApplication sendAction:to:from:] + 112
10 AppKit 0x9172e8d9 -[NSMenuItem _corePerformAction] + 435
11 AppKit 0x9172e5ca -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174
12 AppKit 0x9172e4b6 -[NSMenu performActionForItemAtIndex:] + 65
13 AppKit 0x9172e469 -[NSMenu _internalPerformActionForItemAtIndex:] + 50
14 AppKit 0x9172e3cf -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97
15 AppKit 0x9172e313 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336
16 AppKit 0x91722a55 NSSLMMenuEventHandler + 404
17 HIToolbox 0x99726c2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
18 HIToolbox 0x99725ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
19 HIToolbox 0x997487f3 SendEventToEventTarget + 52
20 HIToolbox 0x99774e87 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448
21 HIToolbox 0x99799b90 SendMenuCommandWithContextAndModifiers + 66
22 HIToolbox 0x99799b47 SendMenuItemSelectedEvent + 121
23 HIToolbox 0x99799a5d ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2 + 152
24 HIToolbox 0x99769160 _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 454
25 HIToolbox 0x997688bb _HandleMenuSelection2 + 465
26 HIToolbox 0x997686d9 _HandleMenuSelection + 53
27 AppKit 0x9171bf96 _NSHandleCarbonMenuEvent + 285
28 AppKit 0x916f0b46 _DPSNextEvent + 2304
29 AppKit 0x916efdd6 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
30 AppKit 0x916b21f3 -[NSApplication run] + 821
31 AppKit 0x916aa289 NSApplicationMain + 574
32 Scrivener 0x0000271d _start + 208
33 Scrivener 0x0000264c start + 40
)

I thought this was weird enough that it needed to be reported.

~P
@atfmb

Hi,

Many thanks for taking the time to report this. There’s definitely a bug here, and your Console log shows exactly where it is, so that is very helpful, thank you. The trouble is that after staring at the code for a while now, I can’t see exactly where the logic is going wrong (even though I know exactly where it is going wrong), and I can’t reproduce the issue or see in the code how to.

Could you please try to reproduce it again and tell me the steps I need to take? I have tried splitting the document repeatedly, but it works fine every time. Are you in scrivenings mode or something else? Any extra information you can give me would be much appreciated, thanks!

All the best,
Keith

Hi there,

Thanks for taking a look.

Okay - more info.

I had just one Scrivener Project open (which is unusual for me - I usually will open and close others throughout the day, sometimes I will keep multiple Projects open for days at a time).

I had Split Screen open with an old draft in the bottom pane, current draft in the top frame.

In the top pane, I had the full Manuscript selected in the Binder, and was in Scrivenings mode so I could scroll up and down to any point in the manuscript (31 Chapter folders, each with at least 1 scene inside, some have as many as 4 scenes).

Inspector was closed.

I have roughly 55,000 words in the manuscript. The draft I spoke of was originally done in Word several years ago and imported into the Project a couple months back, and remains a single file in the Binder with 167,00 words.

I rarely shut down or reboot my MacBook. I tend to close the lid at night, plug it in, and go to bed. In the morning, I unplug it and go, lifting the lid to wake it up. Maybe that is a factor somehow? A process hanging up?

If this happens again, I will make note of everything I was doing, and every application I have open at the time - maybe there is some crossover effect happening between programs sharing system resources? I tend to have Apple Mail and Scrivener open all the time, with Firefox and Tweetdeck sharing some of that time.

~P
@atfmb

Additionally, I have ‘Show Titles in Scrivenings’ selected in the View > Editor menu.

~P
@atfmb

Hi,

Thanks for the extra info. This definitely wasn’t a process getting hung up or anything like that - it is caused by Scrivener thinking there is more text to chop up than there really is and thus trying to access some text that isn’t there. That much the console log tells me, but I’m still struggling to see how that could happen given the various checks I have in place to avoid just this sort of problem. I’ve been trying to split up text in Scrivenings mode with titles turned on, but everything has worked fine so far. I wonder if it is something in one of the text documents that is throwing Scrivener - some gremlin character somewhere. Could you please try making a copy of the project and testing out splitting up various documents in Scrivenings mode to see if you can get it to happen again (using the copy of the project, of course, so that you don’t mess up your original)?

Thanks!

All the best,
Keith

Hi,

So - happened again just now.

Haven’t been able to ‘force’ it to happen again. Was just sitting here working normally, hit Command K to create a new Scene, and noticed that the cursor jumped to the last Folder / Scene in the document. Confused, I scrolled up, and everything I’d spent the last hour writing is gone. :frowning:

The good news is that not everything I’ve written today in this project is gone. For whatever reason, just the stuff in the new chapter seems to have been affected (so far - still checking.

I jumped into the Console and snagged this for you:

7/29/12 3:27:34 PM Scrivener[16649] HIToolbox: ignoring exception 'redo: NSUndoManager 0x1694ec30 is in invalid state, do not invoke this method while undoing
’ that raised inside Carbon event dispatch
(
0 CoreFoundation 0x906ef6ca __raiseError + 410
1 libobjc.A.dylib 0x934dd5a9 objc_exception_throw + 56
2 CoreFoundation 0x906ef3f8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x906ef36a +[NSException raise:format:] + 58
4 Foundation 0x9499b04b -[NSUndoManager redo] + 208
5 AppKit 0x9172ea26 -[NSApplication sendAction:to:from:] + 112
6 AppKit 0x9172e8d9 -[NSMenuItem _corePerformAction] + 435
7 AppKit 0x9172e5ca -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174
8 AppKit 0x9172e4b6 -[NSMenu performActionForItemAtIndex:] + 65
9 AppKit 0x9172e469 -[NSMenu _internalPerformActionForItemAtIndex:] + 50
10 AppKit 0x9172e3cf -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97
11 AppKit 0x9172e313 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336
12 AppKit 0x91722a55 NSSLMMenuEventHandler + 404
13 HIToolbox 0x99726c2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
14 HIToolbox 0x99725ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
15 HIToolbox 0x997487f3 SendEventToEventTarget + 52
16 HIToolbox 0x99774e87 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448
17 HIToolbox 0x99799b90 SendMenuCommandWithContextAndModifiers + 66
18 HIToolbox 0x99799b47 SendMenuItemSelectedEvent + 121
19 HIToolbox 0x99799a5d ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2 + 152
20 HIToolbox 0x99769160 _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 454
21 HIToolbox 0x997688bb _HandleMenuSelection2 + 465
22 HIToolbox 0x997686d9 _HandleMenuSelection + 53
23 AppKit 0x9171bf96 _NSHandleCarbonMenuEvent + 285
24 AppKit 0x916f0b46 _DPSNextEvent + 2304
25 AppKit 0x916efdd6 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
26 AppKit 0x916b21f3 -[NSApplication run] + 821
27 AppKit 0x916aa289 NSApplicationMain + 574
28 Scrivener 0x00002b59 0x0 + 11097
)

What I was doing: Writing and editing. I opened the laptop lid and jumped into my project, which I’d left open the night before. I started going back through previous chapters, editing a few bits here and there and bringing myself forward to a new / blank chapter. Started writing. Composed a scene and wanted a new scene, so I typed a sentence, moved the cursor before the first letter, hit Command K. Cursor jumped to the end of the project - last chapter / scene (which I have as a placeholder). Scrolled up, and the contents of my new chapter / scene are gone.

~P

ooops - there was more in console, so please ignore that bit. here’s the full report:

7/29/12 3:23:48 PM Scrivener[16649] *** -[NSCFString substringWithRange:]: Range or index out of bounds
7/29/12 3:26:13 PM Scrivener[16649] HIToolbox: ignoring exception ‘*** -[NSCFString substringWithRange:]: Range or index out of bounds’ that raised inside Carbon event dispatch
(
0 CoreFoundation 0x906ef6ca __raiseError + 410
1 libobjc.A.dylib 0x934dd5a9 objc_exception_throw + 56
2 CoreFoundation 0x906ef3f8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x906ef36a +[NSException raise:format:] + 58
4 Foundation 0x9481f97a -[NSCFString substringWithRange:] + 147
5 AppKit 0x918db7ff -[NSTextStorage(NSUndo) _undoRedoAttributedSubstringFromRange:] + 177
6 AppKit 0x91c8e825 -[NSUndoTyping undoRedo:] + 133
7 Foundation 0x9499ab60 -[_NSUndoLightInvocation invoke] + 34
8 Foundation 0x9499af60 -[_NSUndoStack popAndInvoke] + 265
9 Foundation 0x9499b2a0 -[NSUndoManager undoNestedGroup] + 342
10 AppKit 0x9172ea26 -[NSApplication sendAction:to:from:] + 112
11 AppKit 0x9172e8d9 -[NSMenuItem _corePerformAction] + 435
12 AppKit 0x9172e5ca -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174
13 AppKit 0x9172e4b6 -[NSMenu performActionForItemAtIndex:] + 65
14 AppKit 0x9172e469 -[NSMenu _internalPerformActionForItemAtIndex:] + 50
15 AppKit 0x9172e3cf -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97
16 AppKit 0x9172e313 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336
17 AppKit 0x91722a55 NSSLMMenuEventHandler + 404
18 HIToolbox 0x99726c2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
19 HIToolbox 0x99725ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
20 HIToolbox 0x997487f3 SendEventToEventTarget + 52
21 HIToolbox 0x99774e87 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448
22 HIToolbox 0x99799b90 SendMenuCommandWithContextAndModifiers + 66
23 HIToolbox 0x99799b47 SendMenuItemSelectedEvent + 121
24 HIToolbox 0x99799a5d ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2 + 152
25 HIToolbox 0x99769160 _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 454
26 HIToolbox 0x997688bb _HandleMenuSelection2 + 465
27 HIToolbox 0x997686d9 _HandleMenuSelection + 53
28 AppKit 0x9171bf96 _NSHandleCarbonMenuEvent + 285
29 AppKit 0x916f0b46 _DPSNextEvent + 2304
30 AppKit 0x916efdd6 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
31 AppKit 0x916b21f3 -[NSApplication run] + 821
32 AppKit 0x916aa289 NSApplicationMain + 574
33 Scrivener 0x00002b59 0x0 + 11097
)
7/29/12 3:26:16 PM Scrivener[16649] HIToolbox: ignoring exception 'redo: NSUndoManager 0x1694ec30 is in invalid state, do not invoke this method while undoing
’ that raised inside Carbon event dispatch
(
0 CoreFoundation 0x906ef6ca __raiseError + 410
1 libobjc.A.dylib 0x934dd5a9 objc_exception_throw + 56
2 CoreFoundation 0x906ef3f8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x906ef36a +[NSException raise:format:] + 58
4 Foundation 0x9499b04b -[NSUndoManager redo] + 208
5 AppKit 0x9172ea26 -[NSApplication sendAction:to:from:] + 112
6 AppKit 0x9172e8d9 -[NSMenuItem _corePerformAction] + 435
7 AppKit 0x9172e5ca -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174
8 AppKit 0x9172e4b6 -[NSMenu performActionForItemAtIndex:] + 65
9 AppKit 0x9172e469 -[NSMenu _internalPerformActionForItemAtIndex:] + 50
10 AppKit 0x9172e3cf -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97
11 AppKit 0x9172e313 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336
12 AppKit 0x91722a55 NSSLMMenuEventHandler + 404
13 HIToolbox 0x99726c2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
14 HIToolbox 0x99725ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
15 HIToolbox 0x997487f3 SendEventToEventTarget + 52
16 HIToolbox 0x99774e87 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448
17 HIToolbox 0x99799b90 SendMenuCommandWithContextAndModifiers + 66
18 HIToolbox 0x99799b47 SendMenuItemSelectedEvent + 121
19 HIToolbox 0x99799a5d ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2 + 152
20 HIToolbox 0x99769160 _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 454
21 HIToolbox 0x997688bb _HandleMenuSelection2 + 465
22 HIToolbox 0x997686d9 _HandleMenuSelection + 53
23 AppKit 0x9171bf96 _NSHandleCarbonMenuEvent + 285
24 AppKit 0x916f0b46 _DPSNextEvent + 2304
25 AppKit 0x916efdd6 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
26 AppKit 0x916b21f3 -[NSApplication run] + 821
27 AppKit 0x916aa289 NSApplicationMain + 574
28 Scrivener 0x00002b59 0x0 + 11097
)
7/29/12 3:27:29 PM Scrivener[16649] HIToolbox: ignoring exception ‘undo: NSUndoManager 0x1694ec30 is in invalid state, undo was called with too many nested undo groups’ that raised inside Carbon event dispatch
(
0 CoreFoundation 0x906ef6ca __raiseError + 410
1 libobjc.A.dylib 0x934dd5a9 objc_exception_throw + 56
2 CoreFoundation 0x906ef3f8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x906ef36a +[NSException raise:format:] + 58
4 Foundation 0x9499b3e4 -[NSUndoManager undo] + 238
5 AppKit 0x9172ea26 -[NSApplication sendAction:to:from:] + 112
6 AppKit 0x9172e8d9 -[NSMenuItem _corePerformAction] + 435
7 AppKit 0x9172e5ca -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174
8 AppKit 0x9172e4b6 -[NSMenu performActionForItemAtIndex:] + 65
9 AppKit 0x9172e469 -[NSMenu _internalPerformActionForItemAtIndex:] + 50
10 AppKit 0x9172e3cf -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97
11 AppKit 0x9172e313 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336
12 AppKit 0x91722a55 NSSLMMenuEventHandler + 404
13 HIToolbox 0x99726c2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
14 HIToolbox 0x99725ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
15 HIToolbox 0x997487f3 SendEventToEventTarget + 52
16 HIToolbox 0x99774e87 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448
17 HIToolbox 0x99799b90 SendMenuCommandWithContextAndModifiers + 66
18 HIToolbox 0x99799b47 SendMenuItemSelectedEvent + 121
19 HIToolbox 0x99799a5d ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2 + 152
20 HIToolbox 0x99769160 _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 454
21 HIToolbox 0x997688bb _HandleMenuSelection2 + 465
22 HIToolbox 0x997686d9 _HandleMenuSelection + 53
23 AppKit 0x9171bf96 _NSHandleCarbonMenuEvent + 285
24 AppKit 0x916f0b46 _DPSNextEvent + 2304
25 AppKit 0x916efdd6 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
26 AppKit 0x916b21f3 -[NSApplication run] + 821
27 AppKit 0x916aa289 NSApplicationMain + 574
28 Scrivener 0x00002b59 0x0 + 11097
)
7/29/12 3:27:34 PM Scrivener[16649] HIToolbox: ignoring exception 'redo: NSUndoManager 0x1694ec30 is in invalid state, do not invoke this method while undoing
’ that raised inside Carbon event dispatch
(
0 CoreFoundation 0x906ef6ca __raiseError + 410
1 libobjc.A.dylib 0x934dd5a9 objc_exception_throw + 56
2 CoreFoundation 0x906ef3f8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x906ef36a +[NSException raise:format:] + 58
4 Foundation 0x9499b04b -[NSUndoManager redo] + 208
5 AppKit 0x9172ea26 -[NSApplication sendAction:to:from:] + 112
6 AppKit 0x9172e8d9 -[NSMenuItem _corePerformAction] + 435
7 AppKit 0x9172e5ca -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 174
8 AppKit 0x9172e4b6 -[NSMenu performActionForItemAtIndex:] + 65
9 AppKit 0x9172e469 -[NSMenu _internalPerformActionForItemAtIndex:] + 50
10 AppKit 0x9172e3cf -[NSMenuItem _internalPerformActionThroughMenuIfPossible] + 97
11 AppKit 0x9172e313 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 336
12 AppKit 0x91722a55 NSSLMMenuEventHandler + 404
13 HIToolbox 0x99726c2f _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567
14 HIToolbox 0x99725ef6 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411
15 HIToolbox 0x997487f3 SendEventToEventTarget + 52
16 HIToolbox 0x99774e87 _ZL18SendHICommandEventmPK9HICommandmmhPKvP20OpaqueEventTargetRefS5_PP14OpaqueEventRef + 448
17 HIToolbox 0x99799b90 SendMenuCommandWithContextAndModifiers + 66
18 HIToolbox 0x99799b47 SendMenuItemSelectedEvent + 121
19 HIToolbox 0x99799a5d ZL19FinishMenuSelectionP13SelectionDataP10MenuResultS2 + 152
20 HIToolbox 0x99769160 _ZL14MenuSelectCoreP8MenuData5PointdmPP13OpaqueMenuRefPt + 454
21 HIToolbox 0x997688bb _HandleMenuSelection2 + 465
22 HIToolbox 0x997686d9 _HandleMenuSelection + 53
23 AppKit 0x9171bf96 _NSHandleCarbonMenuEvent + 285
24 AppKit 0x916f0b46 _DPSNextEvent + 2304
25 AppKit 0x916efdd6 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 156
26 AppKit 0x916b21f3 -[NSApplication run] + 821
27 AppKit 0x916aa289 NSApplicationMain + 574
28 Scrivener 0x00002b59 0x0 + 11097
)

Hi,

Unfortunately the Console log in this situation doesn’t contain much that is useful - it just tells me that an error was thrown at a particular point. Everything you sent me before does tell me where this error is thrown, though, but again, I cannot reproduce it or see why it would happen in the code, despite having stared at it for some time (as with all of these things, it will probably be a single line or even character in the code causing the problem).

Here’s something I don’t get:

What you do mean when you say that you moved the cursor “before the first letter”? You said this before, too, but cmd-K should never work if the cursor is right before the first character in the text. It should only work if the cursor is somewhere inside the text. Did you just mean before the first letter of the new scene you wanted to create rather than before the first character in the document?

Thanks!

All the best,
Keith

Sorry - I had a paragraph of text and wanted a new scene. I hit return, typed a new sentence like:

It was a dark and story night. (example only :stuck_out_tongue: )

I moved the cursor before ‘It’ and hit Command K to split the scene so this sentence would be the first sentence in the new scene. I was in Scrivenings mode with the Manuscript chosen in the Binder. When I hit Command K, the cursor jumped to the last document in the last folder of the Manuscript. I scrolled back up to where I’d been working, and all the text I’d written was gone.

~P

Have you had any luck in getting this to happen again under specific circumstances? I’m keen to squash this bug, but still have been unable to reproduce it. Could it be that it only occurs when you are splitting a document that occurs after a particular document further up in the scrivenings session? I’m wondering if there is a gremlin character in one of the documents which is throwing off the internal character count.

Could you either zip up and send us a copy of the project for testing, or, make a copy of it yourself and in the copy try loading the manuscript folder into scrivenings mode and then going through every document trying to split them. If the bug occurs again, note where it occurred and see if splitting at just that place in a new copy causes the same bug.

Thanks!

All the best,
Keith

hi there,

I have not been able to get it to do it again. However, I also changed my habits. I am not leaving my projects open overnight any more. I close them because the idea of losing so much work again makes me ill.

I did create a copy of the original project, and I’ve been keeping that one open like I normally would, but so far, the bug has not resurfaced or happened again. I add text, split scriveneings, move things around and never encounter the problems listed above. One thing changed - I did the 2.3.1 update. I know it’s not what you want to hear, but maybe something in that update fixed what was happening to me?

~P

Hi,

I can’t think of anything in 2.3.1 that would have fixed this unfortunately. Thanks for trying to reproduce it, though.

What I am implementing for the next update is an “exception catcher”, which will stop the app and warn the user that an unexpected error has occurred as soon as such a background error occurs, along with making it easy for the user to email us the details. This way, if anything like this happens again, the user will know immediately and won’t be in the situation of continuing to use the app when it is an unstable state. This should make it easier to track when bugs occur, and it should also prevent users from losing work. (I would have implemented this years ago if I had known it was possible, but Apple have made it easier in recent years.)

Thanks and all the best,
Keith