From 6aa6d20436a1e920151d86c086c64466173aa130 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Tue, 15 Feb 2011 01:24:56 +0000 Subject: - When loading tables, ensure that the column count is updated before table timers are set up. This prevents accesses of SPTableStorages while column change realloc/dealloc processes are still running, fixing exceptions on large tables --- Source/SPTableContent.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Source/SPTableContent.m') diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index a513ea15..a0b184dd 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -805,12 +805,13 @@ BOOL *columnBlobStatuses = malloc(dataColumnsCount * sizeof(BOOL)); tableLoadTargetRowCount = targetRowCount; + // Set the column count on the data store before setting up anything else - + // ensures that SPDataStorage is set up for timer-driven data loads + [tableValues setColumnCount:dataColumnsCount]; + // Set up the table updates timer [[self onMainThread] initTableLoadTimer]; - // Set the column count on the data store - [tableValues setColumnCount:dataColumnsCount]; - NSAutoreleasePool *dataLoadingPool; NSProgressIndicator *dataLoadingIndicator = [tableDocumentInstance valueForKey:@"queryProgressBar"]; BOOL prefsLoadBlobsAsNeeded = [prefs boolForKey:SPLoadBlobsAsNeeded]; -- cgit v1.2.3