I generate a sequence of bytecode after inline multiple method invocation. At the beginning of inline, I first poped existing variable indexes to a new local variable numbers in case of any exception in the inlined method. This operation results to a number of xLOAD and xStore sequence in the final bytecodes. The sample is:
GETFIELD DYNGuardWithTestHandle1456194204777.guard : Ljava/lang/invoke/MethodHandle;
INVOKEVIRTUAL java/lang/invoke/MethodHandle.invokeExact ()Z
IFEQ L0
ALOAD 0
ALOAD 1
ALOAD 2
ALOAD 3
ALOAD 4
ASTORE 5
ASTORE 6
ASTORE 7
ASTORE 8
ASTORE 9
ALOAD 9
ALOAD 8
ALOAD 7
ALOAD 6
ALOAD 5
ASTORE 10
ASTORE 11
ASTORE 12
ASTORE 13
ASTORE 14
ALOAD 14
GETFIELD DYNGuardWithTestHandle1456194204777.trueTarget_guard_next : Ljava/lang/invoke/MethodHandle;
LDC "fd1a2fc6-03ef-4fd8-a2ae-ebbaa274fa97"
INVOKESTATIC java/lang/invoke/ObjectTransfer.peek (Ljava/lang/String;)Ljava/lang/Object;
CHECKCAST org/jruby/RubyClass
ALOAD 11
INVOKEVIRTUAL java/lang/invoke/MethodHandle.invokeExact (Lorg/jruby/RubyClass;Lorg/jruby/runtime/builtin/IRubyObject;)Z
GOTO L1
L1
IFEQ L2
ALOAD 9
ALOAD 8
ALOAD 7
ALOAD 6
ALOAD 5
ASTORE 15
ASTORE 16
ASTORE 17
ASTORE 18
ASTORE 19
ALOAD 19
ALOAD 16
ALOAD 18
ALOAD 15
ASTORE 20
ASTORE 21
ASTORE 22
ASTORE 23
ALOAD 23
ALOAD 22
CHECKCAST org/jruby/RubyString
ALOAD 21
ALOAD 20
ASTORE 24
ASTORE 25
ASTORE 26
ASTORE 27
ALOAD 27
ALOAD 26
ALOAD 25
ALOAD 24
ASTORE 28
ASTORE 29
ASTORE 30
ASTORE 31
I am wondering whether there are some well-known optimization to eliminate these xLoad/xStore sequence.
Thanks
Don't worry about it. If the method is executed a lot, the JVM will probably optimize it anyway, at which point the extra loads and stores get optimized away.
Try profiling it to see if it's even worth micro-optimizing.
Related
My application works. It passes its unit tests, it passes its user acceptance tests, it doesn't even have too many warnings about deprecations (just one or two). So now I'd like to release it - and I want to have it notarised. Unfortunately, when I notarise Xcode quits 'unexpectedly' - although by now it's crashed so many times that I'm amazed the crash catches my Mac by surprise.
The only 'oddities' about my application are that it uses the Sparkle framework and Libcrypto.
I'm building on a 16GB M1 Mac Mini. The steps to reproduce the error are:
Distribute App
Developer ID
Upload
either Automatically manage signing or Manually manage signing
… I see Communicating with Apple - and then Boom! It dies.
Has anyone else seen a problem like this? How did you solve it?
The error log I get starts as follows:
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 13.0 (19234)
Build Info: IDEFrameworks-19234000000000000~16 (13A233)
Code Type: ARM-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [2640]
User ID: 501
Date/Time: 2021-09-20 20:26:00.540 +0100
OS Version: macOS 11.4 (20F71)
Report Version: 12
Anonymous UUID: EC195B68-B7C5-BD3E-C8A4-C886AAA00F1F
Sleep/Wake UUID: 15FE8E7D-4A3E-430C-9948-F60EFBD2D434
Time Awake Since Boot: 7000 seconds
Time Since Wake: 3000 seconds
System Integrity Protection: enabled
Crashed Thread: 15 Dispatch queue: ConcurrentQueue: -[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
ProductBuildVersion: 13A233
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-19207/DVTFoundation/FilePaths/DVTFilePath.m:908
Details: str should be a string, but it is nil
Object: <DVTFilePath>
Method: +filePathForPathString:
Thread: <NSThread: 0x2eb098e80>{number = 114, name = (null)}
Open FDs: 70/7168
Hints:
0: Calling block provided by:
0 DVTDispatchAsync (in DVTFoundation)
1 DVTAsyncPerformBlock (in DVTFoundation)
2 -[IDEDistributionPackagingStepViewController viewDidInstall] (in IDEKit)
3 -[DVTViewController _viewDidInstall] (in DVTViewControllerKit)
4 -[_DVTViewController_ViewLifecycleInterpositions viewDidMoveToWindow] (in DVTViewControllerKit)
5 -[NSView _setWindow:] (in AppKit)
6 -[NSView addSubview:] (in AppKit)
7 -[NSView setSubviews:] (in AppKit)
8 -[DVTBorderedView setContentView:] (in DVTUserInterfaceKit)
9 -[IDEDistributionAssistantWindowController setDistributionStepViewController:] (in IDEKit)
10 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] (in Foundation)
11 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] (in Foundation)
12 _NSSetObjectValueAndNotify (in Foundation)
13 -[IDEDistributionAssistantWindowController next:] (in IDEKit)
14 __79-[IDEDistributionAutomaticSigningAssetsStepViewController _locateSigningAssets]_block_invoke_2 (in IDEKit)
15 __DVT_CALLING_CLIENT_BLOCK__ (in DVTFoundation)
16 ___DVTAsyncPerformBlockOnMainRunLoop_block_invoke (in DVTFoundation)
17 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ (in CoreFoundation)
18 __CFRunLoopDoBlocks (in CoreFoundation)
19 __CFRunLoopRun (in CoreFoundation)
20 CFRunLoopRunSpecific (in CoreFoundation)
21 RunCurrentEventLoopInMode (in HIToolbox)
22 ReceiveNextEventCommon (in HIToolbox)
23 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
24 _DPSNextEvent (in AppKit)
25 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
26 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
27 -[NSApplication run] (in AppKit)
28 -[DVTApplication run] (in DVTKit)
29 NSApplicationMain (in AppKit)
30 start (in libdyld.dylib)
Backtrace:
0 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 +[DVTFilePath filePathForPathString:] (in DVTFoundation)
4 -[NSBundle(DVTOnDemandResourcesAdditions) pathForAssetPackManifest] (in DVTFoundation)
5 -[IDEDistributionODRStep processAppAtPath:destinationPath:isAppStoreBound:baseURL:assetPackManifestPath:includeODRAssetPackInBundle:error:] (in IDEFoundation)
6 -[IDEDistributionODRStep runWithError:] (in IDEFoundation)
7 -[IDEDistributionProcessingPipeline process:] (in IDEFoundation)
8 -[IDEDistributionPackagingStepViewController _runPipeline] (in IDEKit)
9 __60-[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke_2 (in IDEKit)
10 __DVT_CALLING_CLIENT_BLOCK__ (in DVTFoundation)
11 __DVTDispatchAsync_block_invoke (in DVTFoundation)
12 _dispatch_call_block_and_release (in libdispatch.dylib)
13 _dispatch_client_callout (in libdispatch.dylib)
14 _dispatch_continuation_pop (in libdispatch.dylib)
15 _dispatch_async_redirect_invoke (in libdispatch.dylib)
16 _dispatch_root_queue_drain (in libdispatch.dylib)
17 _dispatch_worker_thread2 (in libdispatch.dylib)
18 _pthread_wqthread (in libsystem_pthread.dylib)
19 start_wqthread (in libsystem_pthread.dylib)
I keep getting errors and I have been trying to print this forever it seems. Ive looked for info on Jasmin and as far as I can tell there really isn't a lot of information. Any help with my code would be greatly appreciated. I'm supposed to use Butchers algorithm to print with Jasmin on the command line the next 10 years of Easter. Most of my problem is in the Printing of the Month and My code below.....
.class public example/Easterdeb
.super java/lang/Object
;
; standard initializer
.method public <init>()V
aload_0
invokenonvirtual java/lang/Object/<init>()V
return
.end method
.method public static main([Ljava/lang/String;)V
; set limits used by this method
.limit locals 20
.limit stack 6
; setup local variables:
; 1 - the PrintStream object held in java.lang.System.out
getstatic java/lang/System/out Ljava/io/PrintStream;
astore_1
; 2 - the integer 10 - the counter used in the loop
bipush 10
sipush 2016
istore_2 ;count is in 2
istore 4 ;year is in 4
; now loop 10 times printing out a number
Loop:
; compute 10 - <local variable 2> ...
iload 4 ;year
bipush 19
irem
istore 5 ; a is in 5
iload 4
bipush 100
idiv
istore 6 ; b is in 6
iload 4
bipush 100
irem
istore 7 ; c is in 7
iload 7
iload 6
bipush 4
idiv
istore 8 ; d is in 8
iload 6
bipush 4
irem
istore 9 ; e is in 9
iload 6
bipush 8
iadd
bipush 25
idiv
istore 10 ; f is in 10
iload 6
iload 10
isub
bipush 1
iadd
bipush 3
idiv
istore 11 ; g is in 11
bipush 19
iload 5
imul
iload 6
iadd
iload 8
isub
iload 11
isub
bipush 15
iadd
bipush 30
irem
istore 12 ; h is in 12
iload 7
bipush 4
idiv
istore 13 ; i is in 13
iload 7
bipush 4
irem
istore 14 ; k is in 14
bipush 32
bipush 2
iload 9 ;load e
imul
iadd
bipush 2
iadd
iload 13 ; load i
imul
iload 12 ; load h
isub
iload 14 ; load k
isub
bipush 7
irem
istore 15 ; x is in 15
iload 5
bipush 11
iload 12
imul
iadd
bipush 22
iload 15
imul
iadd
sipush 451
idiv
istore 16 ; m is in 16
iload 12
iload 15
iadd
bipush 7
iload 16
imul
isub
bipush 114
iadd
bipush 31
idiv
istore 17 ; easter month is in 17
iload 12
iload 15
iadd
bipush 7
iload 16
imul
isub
bipush 114
iadd
bipush 31
irem
bipush 1
iadd
istore 18 ; p is in 18
iload 17
bipush 4
isub
ifeq Print_April
aload_1
ldc "March"
swap
goto PRINT_IT
Print_April:
aload_1
ldc "April"
PRINT_IT:
invokestatic java/lang/String/valueOf(I)Ljava/lang/String;
astore_3
; ... and print it
aload_1 ; push the PrintStream object
aload_3 ; push the string we just created - then ...
invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
; decrement the counter and loop
iinc 4 1 ;increment year
iinc 2 -1
iload_2
ifne Loop
; done
return
.end method
SO I figured it out here it is
.class public Easter
.super java/lang/Object
.method public <init>()V
aload_0
invokespecial java/lang/Object/<init>()V
return
.end method
.method public static main([Ljava/lang/String;)V
.limit stack 100
.limit locals 50
getstatic java/lang/System/out Ljava/io/PrintStream;
astore_1
; 2 - the integer 10 - the counter used in the loop
sipush 2009
istore 4 ;year is in 4
bipush 10
istore_2 ;count is in 2
; now loop 10 times printing out a number
Loop:
iinc 4 1
iload 4
bipush 19
irem
istore 5 ; a is in 5
iload 4
bipush 100
idiv
istore 6 ; b is in 6
iload 4
bipush 100
irem
istore 7 ; c is in 7
iload 6
bipush 4
idiv
istore 8 ; d is in 8
iload 6
bipush 4
irem
istore 9 ; e is in 9
iload 6
bipush 8
iadd
bipush 25
idiv
istore 10 ; f is in 10
iload 6
iload 10
isub
bipush 1
iadd
bipush 3
idiv
istore 11 ; g is in 11
bipush 19
iload 5
imul
iload 6
bipush 15
iadd
iadd
iload 8
iload 11
iadd
isub
bipush 30
irem
istore 12 ; h is in 12
iload 7
bipush 4
idiv
istore 13 ; i is in 13
iload 7
bipush 4
irem
istore 14 ; k is in 14
bipush 2
iload 9 ;load e
imul
bipush 2
iload 13 ; load i
imul
bipush 32
iadd
iadd
iload 12 ; load h
iload 14 ; load k
iadd
isub
bipush 7
irem
istore 15 ; x is in 15
bipush 11
iload 12 ;load h
imul
bipush 22
iload 15
imul
iload 5 ;load a
iadd
iadd
sipush 451
idiv
istore 16 ; m is in 16
iload 12
iload 15
bipush 114
iadd
iadd
bipush 7
iload 16
imul
isub
istore 17
iload 17
bipush 31
idiv
istore 18 ; easter month is in 17
iload 17
bipush 31
irem
istore 19 ; p is in 19
iload 18
bipush 4
isub
ifeq Print_April
aload_1
ldc "March "
goto PRINT_IT
Print_April:
aload_1
ldc "April "
goto PRINT_IT
PRINT_IT:
invokevirtual java/io/PrintStream/print(Ljava/lang/String;)V
aload_1
iload 19
bipush 1
iadd
invokestatic java/lang/String/valueOf(I)Ljava/lang/String;
invokevirtual java/io/PrintStream/print(Ljava/lang/String;)V
aload_1
ldc ", "
invokevirtual java/io/PrintStream/print(Ljava/lang/String;)V
aload_1
iload 4
invokestatic java/lang/String/valueOf(I)Ljava/lang/String;
invokevirtual java/io/PrintStream/print(Ljava/lang/String;)V
aload_1
ldc "\n"
invokevirtual java/io/PrintStream/print(Ljava/lang/String;)V
iinc 2 -1 ; check loop
iload_2
ifne Loop
return
.end method
This happens no matter what project I open, whether it's for iOS or Mac. I've reviewed other causes listed on SO and elsewhere, and have eliminated anything to do with repositories, bad certificates, project.xcworkspace and com.apple.dt.Xcode.*. This only happens when I open a project. I can view the organizer without a problem.
Any help would be appreciated.
Here is the error:
Process: Xcode [3904]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 4.3.2 (1177)
Build Info: IDEApplication-1177000000000000~6
App Item ID: 497799835
App External ID: 7171108
Code Type: X86-64 (Native)
Parent Process: launchd [124]
Date/Time: 2012-04-25 14:25:53.522 -0400
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9
Sleep/Wake UUID: 918AC06B-8025-41D9-A37F-809262E52D1C
Interval Since Last Report: 135670 sec
Crashes Since Last Report: 10
Per-App Interval Since Last Report: 33821 sec
Per-App Crashes Since Last Report: 10
Anonymous UUID: 78350ED9-1E4E-47B3-BFA2-60CDC279B7DB
Crashed Thread: 24
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 4E2002
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): ASSERTION FAILURE in /SourceCache/DVTFoundation/DVTFoundation-1193/Framework/Classes/FoundationClassCategories/DVTNSArrayAdditions.m:207
Details: Assertion failed: object != ((void*)0)
Object: <__NSArrayM: 0x4028cd680>
Method: -dvt_addObjectIfAbsent:
Thread: <NSThread: 0x4023dfe00>{name = (null), num = 16}
Backtrace:
0 0x0000000107f5cc8f -[PBXTargetBuildContext(DependencyGraphEvents) handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in DevToolsCore)
1 0x0000000104f9b635 _DVTAssertionFailureHandler (in DVTFoundation)
2 0x0000000104f30e78 -[NSMutableArray(DVTFoundationClassAdditions) dvt_addObjectIfAbsent:] (in DVTFoundation)
3 0x0000000104f7136f -[DVTSDK commandLineToolSearchPath] (in DVTFoundation)
4 0x0000000107f9e9e4 -[XCCommandLineToolSpecification findExecutable:inTargetBuildContext:] (in DevToolsCore)
5 0x0000000107f6e876 -[PBXCompilerSpecificationGcc executablePathInTargetBuildContext:forLanguageDialect:] (in DevToolsCore)
6 0x0000000107f6e92e -[PBXCompilerSpecificationGcc discoveredCompilerDriverInfoInBuildContext:forLanguageDialect:] (in DevToolsCore)
7 0x0000000107f732ab -[PBXCompilerSpecificationGcc2_95_2 compileSourceCodeFileAtPath:ofType:toOutputDirectory:inTargetBuildContext:] (in DevToolsCore)
8 0x0000000108049a27 -[XCCompilerSpecificationClang compileSourceCodeFileAtPath:ofType:toOutputDirectory:inTargetBuildContext:] (in DevToolsCore)
9 0x0000000107f71a33 -[PBXCompilerSpecificationGcc computeDependenciesForInputNodes:ofType:variant:architecture:outputDirectory:inTargetBuildContext:] (in DevToolsCore)
10 0x0000000107fa525b -[XCCompilerSpecification computeDependenciesForFilePath:ofType:outputDirectory:inTargetBuildContext:] (in DevToolsCore)
11 0x000000010803f84e -[XCBuildRuleDGSnapshot(DependencyGraphCreation) computeDependenciesForFilePath:ofType:forBuildFileReference:withOutputDirectory:additionalProperties:inTargetBuildContext:] (in DevToolsCore)
12 0x0000000108038647 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) _computeDependenciesForFilePath:ofType:forBuildFileReference:usingBuildRule:inTargetBuildContext:processedPaths:] (in DevToolsCore)
13 0x0000000108038d25 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForFilePath:ofType:forBuildFileReference:usingBuildRule:inTargetBuildContext:] (in DevToolsCore)
14 0x00000001080392c3 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForBuildFileReference:inTargetBuildContext:] (in DevToolsCore)
15 0x000000010802dc0c -[XCBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForAllBuildFileReferencesInTargetBuildContext:] (in DevToolsCore)
16 0x000000010803aab0 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForAllBuildFileReferencesInTargetBuildContext:] (in DevToolsCore)
17 0x000000010803b450 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesInTargetBuildContext:] (in DevToolsCore)
18 0x0000000107fa811e -[XCProductTypeSpecification computeDependenciesInTargetBuildContext:] (in DevToolsCore)
19 0x00000001080294d3 -[XCNativeTargetDGSnapshot(DependencyGraphCreation) computeDependenciesInTargetBuildContext:] (in DevToolsCore)
20 0x0000000107f4bf81 -[PBXTargetBuildContext createDependencyGraphWithTargetDGSnapshot:] (in DevToolsCore)
21 0x0000000107f5dc15 -[PBXTargetBuildContext(DependencyGraphEvents) dg_setTargetSnapshot:] (in DevToolsCore)
22 0x00007fff899daf4c __invoking___ (in CoreFoundation)
23 0x00007fff899dade4 -[NSInvocation invoke] (in CoreFoundation)
24 0x0000000107f5d010 -[PBXTargetBuildContext(DependencyGraphEvents) processDependencyGraphEvents] (in DevToolsCore)
25 0x00007fff899daf4c __invoking___ (in CoreFoundation)
26 0x00007fff899dade4 -[NSInvocation invoke] (in CoreFoundation)
27 0x0000000107fa07e1 -[XCInvocationQueue _processNextInvocationInThreadSlotNumber:] (in DevToolsCore)
28 0x0000000107fa0c48 -[XCInvocationQueue _processInvocationsInThreadSlotNumber:] (in DevToolsCore)
29 0x00007fff88db774e -[NSThread main] (in Foundation)
30 0x00007fff88db76c6 __NSThread__main__ (in Foundation)
31 0x00007fff8edc08bf _pthread_start (in libsystem_c.dylib)
32 0x00007fff8edc3b75 thread_start (in libsystem_c.dylib)
UserInfo: (null)
Hints: None
Backtrace:
0 0x00007fff899e8faa __exceptionPreprocess (in CoreFoundation)
1 0x00007fff8f537d5e objc_exception_throw (in libobjc.A.dylib)
2 0x00007fff89a732a9 -[NSException raise] (in CoreFoundation)
3 0x0000000104f9b635 _DVTAssertionFailureHandler (in DVTFoundation)
4 0x0000000104f30e78 -[NSMutableArray(DVTFoundationClassAdditions) dvt_addObjectIfAbsent:] (in DVTFoundation)
5 0x0000000104f7136f -[DVTSDK commandLineToolSearchPath] (in DVTFoundation)
6 0x0000000107f9e9e4 -[XCCommandLineToolSpecification findExecutable:inTargetBuildContext:] (in DevToolsCore)
7 0x0000000107f6e876 -[PBXCompilerSpecificationGcc executablePathInTargetBuildContext:forLanguageDialect:] (in DevToolsCore)
8 0x0000000107f6e92e -[PBXCompilerSpecificationGcc discoveredCompilerDriverInfoInBuildContext:forLanguageDialect:] (in DevToolsCore)
9 0x0000000107f732ab -[PBXCompilerSpecificationGcc2_95_2 compileSourceCodeFileAtPath:ofType:toOutputDirectory:inTargetBuildContext:] (in DevToolsCore)
10 0x0000000108049a27 -[XCCompilerSpecificationClang compileSourceCodeFileAtPath:ofType:toOutputDirectory:inTargetBuildContext:] (in DevToolsCore)
11 0x0000000107f71a33 -[PBXCompilerSpecificationGcc computeDependenciesForInputNodes:ofType:variant:architecture:outputDirectory:inTargetBuildContext:] (in DevToolsCore)
12 0x0000000107fa525b -[XCCompilerSpecification computeDependenciesForFilePath:ofType:outputDirectory:inTargetBuildContext:] (in DevToolsCore)
13 0x000000010803f84e -[XCBuildRuleDGSnapshot(DependencyGraphCreation) computeDependenciesForFilePath:ofType:forBuildFileReference:withOutputDirectory:additionalProperties:inTargetBuildContext:] (in DevToolsCore)
14 0x0000000108038647 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) _computeDependenciesForFilePath:ofType:forBuildFileReference:usingBuildRule:inTargetBuildContext:processedPaths:] (in DevToolsCore)
15 0x0000000108038d25 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForFilePath:ofType:forBuildFileReference:usingBuildRule:inTargetBuildContext:] (in DevToolsCore)
16 0x00000001080392c3 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForBuildFileReference:inTargetBuildContext:] (in DevToolsCore)
17 0x000000010802dc0c -[XCBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForAllBuildFileReferencesInTargetBuildContext:] (in DevToolsCore)
18 0x000000010803aab0 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesForAllBuildFileReferencesInTargetBuildContext:] (in DevToolsCore)
19 0x000000010803b450 -[XCSourcesBuildPhaseDGSnapshot(DependencyGraphCreation) computeDependenciesInTargetBuildContext:] (in DevToolsCore)
20 0x0000000107fa811e -[XCProductTypeSpecification computeDependenciesInTargetBuildContext:] (in DevToolsCore)
21 0x00000001080294d3 -[XCNativeTargetDGSnapshot(DependencyGraphCreation) computeDependenciesInTargetBuildContext:] (in DevToolsCore)
22 0x0000000107f4bf81 -[PBXTargetBuildContext createDependencyGraphWithTargetDGSnapshot:] (in DevToolsCore)
23 0x0000000107f5dc15 -[PBXTargetBuildContext(DependencyGraphEvents) dg_setTargetSnapshot:] (in DevToolsCore)
24 0x00007fff899daf4c __invoking___ (in CoreFoundation)
25 0x00007fff899dade4 -[NSInvocation invoke] (in CoreFoundation)
26 0x0000000107f5d010 -[PBXTargetBuildContext(DependencyGraphEvents) processDependencyGraphEvents] (in DevToolsCore)
27 0x00007fff899daf4c __invoking___ (in CoreFoundation)
28 0x00007fff899dade4 -[NSInvocation invoke] (in CoreFoundation)
29 0x0000000107fa07e1 -[XCInvocationQueue _processNextInvocationInThreadSlotNumber:] (in DevToolsCore)
30 0x0000000107fa0c48 -[XCInvocationQueue _processInvocationsInThreadSlotNumber:] (in DevToolsCore)
31 0x00007fff88db774e -[NSThread main] (in Foundation)
32 0x00007fff88db76c6 __NSThread__main__ (in Foundation)
33 0x00007fff8edc08bf _pthread_start (in libsystem_c.dylib)
34 0x00007fff8edc3b75 thread_start (in libsystem_c.dylib)
objc[3904]: garbage collection is ON
abort() called
Uninstalling Xcode 4.3 by dragging the icon to the trash and reinstalling from the Mac App Store fixed the problem.
Weird.
Edited to add: shortly after this whole thing happened, my hard drive went belly-up. So, it appears this was likely related not to anything Xcodey, but rather to my own failing hard drive. Lesson: backup if you get this error, it may be an indicator of something Really Bad.
Suddenly xcode crashes when i try to Run (not build) my Cocos2d iphone app. Ideas?
(I am forced to explain it more clearly so I will write some text here. And some more text. And some more text And some more text And some more text And some more text Sorry)
UNCAUGHT EXCEPTION (NSInvalidArgumentException): -[__NSCFString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x401acf220
UserInfo: (null)
Hints:
0: Replacement view is installing: <IDELogNavigator: 0x40318bd40 representing: <DVTExtension 0x40101c980: Log Navigator (Xcode.IDEKit.Navigator.Logs) v0.1>>
Backtrace:
0 0x00007fff8ca56faa __exceptionPreprocess (in CoreFoundation)
1 0x00007fff88514d5e objc_exception_throw (in libobjc.A.dylib)
2 0x00007fff8cae32ae -[NSObject doesNotRecognizeSelector:] (in CoreFoundation)
3 0x00007fff8ca43e73 ___forwarding___ (in CoreFoundation)
4 0x00007fff8ca43c88 _CF_forwarding_prep_0 (in CoreFoundation)
5 0x000000010ec1e76f -[IDELogNavigator setStateSavingSelectedObjects:] (in IDELogNavigator)
6 0x00007fff8d3e6c6a _NSSetObjectValueAndNotify (in Foundation)
7 0x000000010ec1dd77 -[IDELogNavigator revertStateWithDictionary:] (in IDELogNavigator)
8 0x00000001083e942b -[DVTStateToken _pullStateFromDictionary:] (in DVTFoundation)
9 0x00000001083e91e2 -[DVTStateToken pullStateFromRepository] (in DVTFoundation)
10 0x0000000108d0549d -[IDENavigatorArea replacementView:didInstallViewController:] (in IDEKit)
11 0x00000001085e35f1 __42-[DVTReplacementView _setupViewController]_block_invoke_0 (in DVTKit)
12 0x00000001083ea51e DVTInvokeWithFailureHint (in DVTFoundation)
13 0x00000001085e3473 -[DVTReplacementView _setupViewController] (in DVTKit)
14 0x00000001085e3345 -[DVTReplacementView installedViewController] (in DVTKit)
15 0x0000000108d2f693 -[IDENavigatorArea currentNavigator] (in IDEKit)
16 0x0000000108d4822d -[IDENavigatorArea delegateFirstResponder] (in IDEKit)
17 0x0000000108d91946 -[IDEWorkspaceTabController _changeToNavigatorWithIdentifier:sender:] (in IDEKit)
18 0x0000000108d3f10d -[IDEShowNavigatorAlert runForEvent:inWorkspace:context:completionBlock:] (in IDEKit)
19 0x0000000108a75849 -[IDEAlertEvent runInWorkspace:context:completionBlock:] (in IDEFoundation)
20 0x0000000108d416a1 -[IDERunAlertMonitor executionStart] (in IDEKit)
21 0x00007fff8d3c3fca -[__NSObserver _doit:] (in Foundation)
22 0x00007fff8d3c3e9d __-[NSNotificationCenter addObserverForName:object:queue:usingBlock:]_block_invoke_1 (in Foundation)
23 0x00007fff8c9ffaaa _CFXNotificationPost (in CoreFoundation)
24 0x00007fff8d37ffe7 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
25 0x0000000108995240 -[IDEExecutionEnvironment setCurrentLaunchSession:] (in IDEFoundation)
26 0x0000000108994de9 -[IDEExecutionEnvironment _handleLaunchSession:stateChange:] (in IDEFoundation)
27 0x000000010898b94d -[IDEExecutionEnvironment observeValueForKeyPath:ofObject:change:context:] (in IDEFoundation)
28 0x00007fff8d3c67b2 NSKeyValueNotifyObserver (in Foundation)
29 0x00007fff8d3e78eb NSKeyValueDidChange (in Foundation)
30 0x00007fff8d39404b -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] (in Foundation)
31 0x00007fff8322a8ba _dispatch_call_block_and_release (in libdispatch.dylib)
32 0x00007fff8322bbeb _dispatch_barrier_sync_f_slow_invoke (in libdispatch.dylib)
33 0x00007fff8322c72a _dispatch_main_queue_callback_4CF (in libdispatch.dylib)
34 0x00007fff8c9ec06c __CFRunLoopRun (in CoreFoundation)
35 0x00007fff8c9eb676 CFRunLoopRunSpecific (in CoreFoundation)
36 0x00007fff8774c31f RunCurrentEventLoopInMode (in HIToolbox)
37 0x00007fff877535c9 ReceiveNextEventCommon (in HIToolbox)
38 0x00007fff87753456 BlockUntilNextEventMatchingListInMode (in HIToolbox)
39 0x00007fff89561f5d _DPSNextEvent (in AppKit)
40 0x00007fff89561861 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
41 0x00007fff8955e19d -[NSApplication run] (in AppKit)
42 0x00007fff897dcb88 NSApplicationMain (in AppKit)
43 0x00000001083b9eec (in Xcode)
Solution: I made a copy of the folder with the project, then open the xcode-project file and everything worked.
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?