Strange SQL CE Finalize Error occuring on WP7 Application - windows-phone-7

Frame Image Function Offset
0 coredll.dll xxx_RaiseException 19
1 mscoree3_7.dll 436488
2 mscoree3_7.dll 386545
3 mscoree3_7.dll 540936
4 TransitionStub 0
5 System.Data.SqlServerCe.ConStringUtil.ReplaceDataDirectory 0
6 System.Data.SqlServerCe.SqlCeConnection.RemoveCachedMemoryUsage 64
7 System.Data.SqlServerCe.SqlCeConnection.ReleaseNativeInterfaces 488
8 System.Data.SqlServerCe.SqlCeConnection.Dispose 372
9 System.Data.SqlServerCe.SqlCeConnection.Finalize 64
10 mscoree3_7.dll 429164
11 mscoree3_7.dll 143533
12 mscoree3_7.dll 143225
13 mscoree3_7.dll 236605
14 mscoree3_7.dll 305995
15 coredll.dll ThreadBaseFunc 144
All calls to the SQL CE db are wrapped in Usings to ensure the object disposes properly. I've found nothing on the web that exlains what is happening.
Can anyone explain what is going on here?

Related

Xcode failing on running app on physical device

When I'm trying to run apple watch standalone app on physical device its throwing this error:
Error:
Details
Unable to install "TinyRage WatchKit App"
Domain: com.apple.dtdevicekit
Code: -402620394
--
The executable was signed with invalid entitlements.
Domain: com.apple.dtdevicekit
Code: -402620394
Failure Reason: The entitlements specified in your application’s Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xE8008016).
User Info: {
DVTRadarComponentKey = 487927;
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x000000011e6e16e7 DTDKCreateNSError + 109
1 DTDeviceKitBase 0x000000011e6e1de9 DTDK_AMDErrorToNSError + 792
2 DTDeviceKitBase 0x000000011e72156a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164
3 DVTFoundation 0x0000000103851156 DVTInvokeWithStrongOwnership + 73
4 DTDeviceKitBase 0x000000011e721301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589
5 IDEiOSSupportCore 0x000000011e5baa25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523
6 DVTFoundation 0x00000001039823ba __DVT_CALLING_CLIENT_BLOCK__ + 7
7 DVTFoundation 0x0000000103983a92 __DVTDispatchAsync_block_invoke + 809
8 libdispatch.dylib 0x00007fff7306d5f8 _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x00007fff7306e63d _dispatch_client_callout + 8
10 libdispatch.dylib 0x00007fff730748e0 _dispatch_lane_serial_drain + 602
11 libdispatch.dylib 0x00007fff73075396 _dispatch_lane_invoke + 385
12 libdispatch.dylib 0x00007fff7307d6ed _dispatch_workloop_worker_thread + 598
13 libsystem_pthread.dylib 0x00007fff732ae611 _pthread_wqthread + 421
14 libsystem_pthread.dylib 0x00007fff732ae3fd start_wqthread + 13
);
}
--
However with another app everything works correctly without any issues.

Xcode Crash NO_CRASH_STACK + 0 with no stack trace and unsymbolicated

Can anyone tell me what is this crash about since there's no stack trace and cannot be symbolicated?
I'll paste here only the relevant part of the crash. My project is written in Swift.
NO_CRASH_STACK + 0
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000102445424
Termination Signal: Trace/BPT trap: 5
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [18568]
Triggered by Thread: 7
Thread 7 name: Dispatch queue: NSOperationQueue 0x282ced140 (QOS: UNSPECIFIED)
Thread 7 Crashed:
0 ------------ 0x0000000102445424 0x102304000 + 1315876
1 ------------ 0x0000000102444a9c 0x102304000 + 1313436
2 ------------ 0x000000010232e408 0x102304000 + 173064
3 ------------ 0x000000010232b320 0x102304000 + 160544
4 CFNetwork 0x0000000208b5b228 __75-[__NSURLSessionLocal taskForClass:request:uploadFile:bodyData:completion:]_block_invoke + 32
5 CFNetwork 0x0000000208b6f9c8 __49-[__NSCFLocalSessionTask _task_onqueue_didFinish]_block_invoke + 176
6 Foundation 0x000000020900e82c __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 16
7 Foundation 0x0000000208f16a28 -[NSBlockOperation main] + 72
8 Foundation 0x0000000208f15efc -[__NSOperationInternal _start:] + 740
9 Foundation 0x0000000209010700 __NSOQSchedule_f + 272
10 libdispatch.dylib 0x0000000207fb96c8 _dispatch_call_block_and_release + 24
11 libdispatch.dylib 0x0000000207fba484 _dispatch_client_callout + 16
12 libdispatch.dylib 0x0000000207f5d83c _dispatch_continuation_pop$VARIANT$mp + 412
13 libdispatch.dylib 0x0000000207f5cf04 _dispatch_async_redirect_invoke + 600
14 libdispatch.dylib 0x0000000207f69a28 _dispatch_root_queue_drain + 376
15 libdispatch.dylib 0x0000000207f6a2d0 _dispatch_worker_thread2 + 128
16 libsystem_pthread.dylib 0x000000020819c17c _pthread_wqthread + 472
17 libsystem_pthread.dylib 0x000000020819ecec start_wqthread + 4
I solved the problem myself just by downloading the dSYM files from App Store Connect and Xcode automatically symbolicated the crash.

SIGABRT crash on OS X app

I have had this crash that occurs rather rarely for ages. Unfortunately, I'm not able to get much hints from this received crashlog as it doesn't show any code line from my app. I believe this is related to bad memory management, but I have never managed to generate this crash in my debugger. I have tried enabling NSZombies and run this in Zombies-instruments but they have not shown the cause of the problem. Are there any other tricks I could try to find the cause for this kind of crash? Does the crashlog tell anything? Could it related to storyboard, timers or anything like that? Any hints are greatly appreciated!
Exception Type: SIGABRT
Exception Codes: #0 at 0x7fff93796d42
Crashed Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00007fff93796d42 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff936fc420 abort + 129
2 libc++abi.dylib 0x00007fff9225094a __cxa_bad_cast + 0
3 libc++abi.dylib 0x00007fff92275c2f _ZL26default_unexpected_handlerv + 0
4 libobjc.A.dylib 0x00007fff92d846fe _ZL15_objc_terminatev + 103
5 libc++abi.dylib 0x00007fff92272d49 _ZSt11__terminatePFvvE + 8
6 libc++abi.dylib 0x00007fff92272dc3 _ZSt9terminatev + 51
7 libdispatch.dylib 0x00007fff93632910 _dispatch_client_callout + 28
8 libdispatch.dylib 0x00007fff9363faac _dispatch_main_queue_callback_4CF + 925
9 com.apple.CoreFoundation 0x00007fff7df20bc9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
10 com.apple.CoreFoundation 0x00007fff7dee1c0d __CFRunLoopRun + 2205
11 com.apple.CoreFoundation 0x00007fff7dee1114 CFRunLoopRunSpecific + 420
12 com.apple.HIToolbox 0x00007fff7d441ebc RunCurrentEventLoopInMode + 240
13 com.apple.HIToolbox 0x00007fff7d441cf1 ReceiveNextEventCommon + 432
14 com.apple.HIToolbox 0x00007fff7d441b26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
15 com.apple.AppKit 0x00007fff7b9d8a54 _DPSNextEvent + 1120
16 com.apple.AppKit 0x00007fff7c1547ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
17 com.apple.AppKit 0x00007fff7b9cd3db -[NSApplication run] + 926
18 com.apple.AppKit 0x00007fff7b997e0e NSApplicationMain + 1237
19 libdyld.dylib 0x00007fff93668235 start + 1

Split data in 2 groups in Matlab with both groups having all unique ids

I am trying to split a data set into 2 groups such that both groups have all unique ids present at least once. The data set is something like
01 02 03 04 05 06 07
07 05 08 09 10 11 12
01 04 07 13 08 14 15
06 10 11 12 08 01 02
13 14 10 01 07 03 02
15 01 03 04 10 13 11
11 12 03 05 07 14 15
06 05 10 13 01 09 14
I am trying to use Matlab to split it in 2 roughly equal groups such that both groups have at least one row where the unique ids (in this case 01 - 15) are present at least once. Will appreciate any help in getting this done.
The data has to be divided in a way that entire row has to belong to either group 1 or group 2. I am looking at my output to be 2 matrices such that
01 02 03 04 05 06 07
07 05 08 09 10 11 12
01 04 07 13 08 14 15
06 10 11 12 08 01 02
and
13 14 10 01 07 03 02
15 01 03 04 10 13 11
11 12 03 05 07 14 15
06 05 10 13 01 09 14
are the 2 output groups.
01 02 03 04 05 06 07 is row 1. 07 05 08 09 10 11 12 is row 2 and so on. Each row has 7 ids. There are 8 different rows. I want to divide it in 2 groups such that both groups will have 5/4 rows each (minor variations dont matter). Position of ids in each row cant be changed. Each row has to be sent as whole into group 1 or 2 but the row structure (position of each id in that row) has to remain intact. All unique ids need to be present in both groups.
script
clear;clc
A = [01 02 03 04 05 06 07;
07 05 08 09 10 11 12;
01 04 07 13 08 14 15;
06 10 11 12 08 01 02;
13 14 10 01 07 03 02;
15 01 03 04 10 13 11;
11 12 03 05 07 14 15;
06 05 10 13 01 09 14];
% find unique elements and rows containing them
UniqElem = unique(A);
NUniqElem = length(UniqElem);
UniqIndex = struct('UniqElem', cell(NUniqElem,1), ...
'UniqRows', cell(NUniqElem, 1), 'RowCount', cell(NUniqElem, 1));
for ii = 1:NUniqElem
t1 = UniqElem(ii);
t2 = find(any(A==t1,2));
UniqIndex(ii).UniqRows = t2;
UniqIndex(ii).UniqElem = t1;
UniqIndex(ii).RowCount = length(t2);
end
clear('t1','t2')
% find all possible combinations to make the first group
Combs1 = testf(UniqIndex);
Combs2 = struct('Combination', Combs1, ...
'Unique', {true});
for ii = 1:(length(Combs2)-1)
if Combs2(ii).Unique
CurrentComb = Combs2(ii).Combination;
for jj = (ii+1):length(Combs2)
if Combs2(jj).Unique && ...
all(ismember(CurrentComb,Combs2(jj).Combination))
Combs2(jj).Unique = false;
end
end
end
end
Combs3 = Combs2([Combs2.Unique]);
Combs4 = struct('Grp1', {Combs3.Combination}, 'Grp2', []);
AllRows = 1:size(A,1);
for ii = 1:length(Combs4)
Combs4(ii).Grp2 = AllRows(~ismember(AllRows, Combs4(ii).Grp1));
end
Combs5 = struct('Grp1', [], 'Grp2', []);
for ii = 1:length(Combs4)
if all(ismember(UniqElem, unique(A([Combs4(ii).Grp2], :))))
Combs5(end+1) = Combs4(ii);
end
end
Combinations = Combs5;
for ii = 1:length(Combinations)
fprintf('Solution %d of %d \n', ii, length(Combinations))
CurrentComb = Combinations(ii);
fprintf('Group 1 \n')
for jj = 1:length(CurrentComb.Grp1)
fprintf('R%2d: %s \n', CurrentComb.Grp1(jj), ...
num2str(A(CurrentComb.Grp1(jj), :), '%-4d') )
end
fprintf('Group 2 \n')
for jj = 1:length(CurrentComb.Grp2)
fprintf('R%2d: %s \n', CurrentComb.Grp2(jj), ...
num2str(A(CurrentComb.Grp2(jj), :), '%-4d') )
end
fprintf('\n')
end
function
function Comb = testf(UniqRowIn)
if length(UniqRowIn) == 1
Comb = num2cell(UniqRowIn.UniqRows)';
else
t2 = testf(UniqRowIn(2:end));
t1 = UniqRowIn(1).UniqRows;
Comb = cell(0);
for ii = 1:length(t2)
CurrentComb = t2{ii};
if isempty(intersect(CurrentComb, t1))
for jj = 1:length(t1)
Comb{end+1,1} = sort([CurrentComb, t1(jj)]);
end
else
Comb{end+1,1} = CurrentComb;
end
end
end
end
output
Solution 1 of 12
Group 1
Group 2
Solution 2 of 12
Group 1
R 1: 1 2 3 4 5 6 7
R 2: 7 5 8 9 10 11 12
R 3: 1 4 7 13 8 14 15
Group 2
R 4: 6 10 11 12 8 1 2
R 5: 13 14 10 1 7 3 2
R 6: 15 1 3 4 10 13 11
R 7: 11 12 3 5 7 14 15
R 8: 6 5 10 13 1 9 14
Solution 3 of 12
Group 1
R 3: 1 4 7 13 8 14 15
R 4: 6 10 11 12 8 1 2
R 5: 13 14 10 1 7 3 2
R 8: 6 5 10 13 1 9 14
Group 2
R 1: 1 2 3 4 5 6 7
R 2: 7 5 8 9 10 11 12
R 6: 15 1 3 4 10 13 11
R 7: 11 12 3 5 7 14 15
Solution 4 of 12
Group 1
R 3: 1 4 7 13 8 14 15
R 4: 6 10 11 12 8 1 2
R 6: 15 1 3 4 10 13 11
R 8: 6 5 10 13 1 9 14
Group 2
R 1: 1 2 3 4 5 6 7
R 2: 7 5 8 9 10 11 12
R 5: 13 14 10 1 7 3 2
R 7: 11 12 3 5 7 14 15
Solution 5 of 12
Group 1
R 3: 1 4 7 13 8 14 15
R 4: 6 10 11 12 8 1 2
R 7: 11 12 3 5 7 14 15
R 8: 6 5 10 13 1 9 14
Group 2
R 1: 1 2 3 4 5 6 7
R 2: 7 5 8 9 10 11 12
R 5: 13 14 10 1 7 3 2
R 6: 15 1 3 4 10 13 11
Solution 6 of 12
Group 1
R 1: 1 2 3 4 5 6 7
R 3: 1 4 7 13 8 14 15
R 7: 11 12 3 5 7 14 15
R 8: 6 5 10 13 1 9 14
Group 2
R 2: 7 5 8 9 10 11 12
R 4: 6 10 11 12 8 1 2
R 5: 13 14 10 1 7 3 2
R 6: 15 1 3 4 10 13 11
Solution 7 of 12
Group 1
R 1: 1 2 3 4 5 6 7
R 2: 7 5 8 9 10 11 12
R 5: 13 14 10 1 7 3 2
R 6: 15 1 3 4 10 13 11
Group 2
R 3: 1 4 7 13 8 14 15
R 4: 6 10 11 12 8 1 2
R 7: 11 12 3 5 7 14 15
R 8: 6 5 10 13 1 9 14
Solution 8 of 12
Group 1
R 2: 7 5 8 9 10 11 12
R 4: 6 10 11 12 8 1 2
R 5: 13 14 10 1 7 3 2
R 6: 15 1 3 4 10 13 11
Group 2
R 1: 1 2 3 4 5 6 7
R 3: 1 4 7 13 8 14 15
R 7: 11 12 3 5 7 14 15
R 8: 6 5 10 13 1 9 14
Solution 9 of 12
Group 1
R 4: 6 10 11 12 8 1 2
R 5: 13 14 10 1 7 3 2
R 6: 15 1 3 4 10 13 11
R 8: 6 5 10 13 1 9 14
Group 2
R 1: 1 2 3 4 5 6 7
R 2: 7 5 8 9 10 11 12
R 3: 1 4 7 13 8 14 15
R 7: 11 12 3 5 7 14 15
Solution 10 of 12
Group 1
R 1: 1 2 3 4 5 6 7
R 2: 7 5 8 9 10 11 12
R 6: 15 1 3 4 10 13 11
R 7: 11 12 3 5 7 14 15
Group 2
R 3: 1 4 7 13 8 14 15
R 4: 6 10 11 12 8 1 2
R 5: 13 14 10 1 7 3 2
R 8: 6 5 10 13 1 9 14
Solution 11 of 12
Group 1
R 4: 6 10 11 12 8 1 2
R 6: 15 1 3 4 10 13 11
R 7: 11 12 3 5 7 14 15
R 8: 6 5 10 13 1 9 14
Group 2
R 1: 1 2 3 4 5 6 7
R 2: 7 5 8 9 10 11 12
R 3: 1 4 7 13 8 14 15
R 5: 13 14 10 1 7 3 2
Solution 12 of 12
Group 1
R 1: 1 2 3 4 5 6 7
R 2: 7 5 8 9 10 11 12
R 5: 13 14 10 1 7 3 2
R 7: 11 12 3 5 7 14 15
Group 2
R 3: 1 4 7 13 8 14 15
R 4: 6 10 11 12 8 1 2
R 6: 15 1 3 4 10 13 11
R 8: 6 5 10 13 1 9 14
>>

iPad crashes when Simulator doesn't when loading a view

my app crashes on iPad when I open a new view even though in the simulator it works like a charm.
Any help is strongly appreciated!
Thanks in advance
Console Output:
2012-07-18 10:32:19.783 Coverdale[3484:707] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 4 beyond bounds [0 .. 3]'
First throw call stack:
(0x3757688f 0x315eb259 0x374bf9db 0x37745 0x35c3f 0x306e3c8b 0x30708481 0x306ccbd5 0x3078f359 0x306d53b5 0x306d53d1 0x306d5263 0x3078f31f 0x307446cb 0x3074400f 0x3078dc05 0x3078c367 0x307e76a7 0x2c4fb 0x3075c93d 0x307d6627 0x33093933 0x3754aa33 0x3754a699 0x3754926f 0x374cc4a5 0x374cc36d 0x376c5439 0x306d8cd5 0x22103 0x220a8)
terminate called throwing an exception(lldb)
Crash Report
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x3757688f __exceptionPreprocess + 163
1 libobjc.A.dylib 0x315eb259 objc_exception_throw + 33
2 CoreFoundation 0x374bf9db -[__NSArrayM objectAtIndex:] + 271
3 Coverdale 0x00092745 -[PreparationViewController setDetails:newFile:] (PreparationViewController.m:376)
4 Coverdale 0x00090c3f -[PreparationViewController viewDidLoad] (PreparationViewController.m:70)
5 UIKit 0x306e3c8b -[UIViewController view] + 167
6 UIKit 0x30708481 -[UIViewController nextResponder] + 21
7 UIKit 0x306ccbd5 -[UIResponder _containsResponder:] + 37
8 UIKit 0x3078f359 -[UINavigationController defaultFirstResponder] + 57
9 UIKit 0x306d53b5 -[UIResponder(Internal) _deepestDefaultFirstResponder] + 25
10 UIKit 0x306d53d1 -[UIResponder(Internal) _deepestDefaultFirstResponder] + 53
11 UIKit 0x306d5263 -[UIResponder(Internal) _promoteDeepestDefaultFirstResponder] + 31
12 UIKit 0x3078f31f -[UIWindowController transitionViewDidStart:] + 83
13 UIKit 0x307446cb -[UITransitionView _didStartTransition] + 71
14 UIKit 0x3074400f -[UITransitionView transition:fromView:toView:] + 999
15 UIKit 0x3078dc05 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 4937
16 UIKit 0x3078c367 -[UIViewController presentViewController:withTransition:completion:] + 3123
17 UIKit 0x307e76a7 -[UIViewController presentModalViewController:animated:] + 31
18 Coverdale 0x000874fb -[IntroTableViewController tableView:didSelectRowAtIndexPath:] (IntroTableViewController.m:498)
19 UIKit 0x3075c93d -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 945
20 UIKit 0x307d6627 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 159
21 Foundation 0x33093933 __NSFireDelayedPerform + 415
22 CoreFoundation 0x3754aa33 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 15
23 CoreFoundation 0x3754a699 __CFRunLoopDoTimer + 365
24 CoreFoundation 0x3754926f __CFRunLoopRun + 1207
25 CoreFoundation 0x374cc4a5 CFRunLoopRunSpecific + 301
26 CoreFoundation 0x374cc36d CFRunLoopRunInMode + 105
27 GraphicsServices 0x376c5439 GSEventRunModal + 137
28 UIKit 0x306d8cd5 UIApplicationMain + 1081
29 Coverdale 0x0007d103 main (main.m:17)
30 Coverdale 0x0007d0a8 start + 40
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3291b32c __pthread_kill + 8
1 libsystem_c.dylib 0x34c90208 pthread_kill + 48
2 libsystem_c.dylib 0x34c89298 abort + 88
3 libc++abi.dylib 0x3229ef64 abort_message + 40
4 libc++abi.dylib 0x3229c346 _ZL17default_terminatev + 18
5 libobjc.A.dylib 0x315eb350 _objc_terminate + 140
6 libc++abi.dylib 0x3229c3be _ZL19safe_handler_callerPFvvE + 70
7 libc++abi.dylib 0x3229c44a std::terminate() + 14
8 libc++abi.dylib 0x3229d81e __cxa_rethrow + 82
9 libobjc.A.dylib 0x315eb2a2 objc_exception_rethrow + 6
10 CoreFoundation 0x374cc506 CFRunLoopRunSpecific + 398
11 CoreFoundation 0x374cc366 CFRunLoopRunInMode + 98
12 GraphicsServices 0x376c5432 GSEventRunModal + 130
13 UIKit 0x306d8cce UIApplicationMain + 1074
14 Coverdale 0x0007d0fc main (main.m:17)
15 Coverdale 0x0007d0a0 start + 32
I deleted the App on the iPad and run it again.
It looks like that an array generated from a text file which i am reading out with componentsSeparatedByString: had less entries than i was accessing.

Resources