My problem is that my app has been crashing since iOS 13. The app doesn't work on any iPhone anymore. A bit strange, however, is that the iPhone simulators on iOS 13 all work fine. Here is the output of the lldb console after I type bt:
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x48)
frame #0: 0x00000001b952d268 AVFAudio`-[AVAudioPlayer(AVAudioPlayerPriv) privRemoveSessionListener] + 16
frame #1: 0x00000001b952b9ac AVFAudio`-[AVAudioPlayer dealloc] + 32
frame #2: 0x0000000100dae9e4 Ducko`#objc StartView.__ivar_destroyer(self=0x0000000101e2de70) at startView.swift:0
frame #3: 0x00000001ac8c01e8 libobjc.A.dylib`object_cxxDestructFromClass(objc_object*, objc_class*) + 112
frame #4: 0x00000001ac8d2d14 libobjc.A.dylib`objc_destructInstance + 88
frame #5: 0x00000001ac8d9db8 libobjc.A.dylib`_objc_rootDealloc + 48
frame #6: 0x00000001b0bd19b8 UIKitCore`-[UIResponder dealloc] + 152
frame #7: 0x00000001e1a40900 UIKit`-[UIResponderAccessibility dealloc] + 60
frame #8: 0x00000001c528e93c SpriteKit`-[SKNode dealloc] + 100
frame #9: 0x00000001c52461dc SpriteKit`-[SKScene dealloc] + 332
frame #10: 0x00000001c526bf54 SpriteKit`-[SKView _update:] + 568
frame #11: 0x00000001c526761c SpriteKit`__51-[SKView _vsyncRenderForTime:preRender:postRender:]_block_invoke.340 + 388
frame #12: 0x00000001c5266a1c SpriteKit`-[SKView _vsyncRenderForTime:preRender:postRender:] + 520
frame #13: 0x00000001c5269bd0 SpriteKit`__29-[SKView setUpRenderCallback]_block_invoke + 200
frame #14: 0x00000001c52ac180 SpriteKit`-[SKDisplayLink _callbackForNextFrame:] + 132
frame #15: 0x0000000101c715f8 GPUToolsCore`-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 168
frame #16: 0x00000001b33dd514 QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 632
frame #17: 0x00000001b34a7774 QuartzCore`display_timer_callback(__CFMachPort*, void*, long, void*) + 264
frame #18: 0x00000001acaed6d4 CoreFoundation`__CFMachPortPerform + 172
frame #19: 0x00000001acb16e5c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
frame #20: 0x00000001acb16588 CoreFoundation`__CFRunLoopDoSource1 + 444
frame #21: 0x00000001acb1145c CoreFoundation`__CFRunLoopRun + 2168
frame #22: 0x00000001acb108bc CoreFoundation`CFRunLoopRunSpecific + 464
frame #23: 0x00000001b697b328 GraphicsServices`GSEventRunModal + 104
frame #24: 0x00000001b0ba56d4 UIKitCore`UIApplicationMain + 1936
* frame #25: 0x0000000100d777c8 Ducko`main at AppDelegate.swift:14:7
frame #26: 0x00000001ac99b460 libdyld.dylib`start + 4
(lldb) * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x48)
frame #0: 0x00000001b952d268 AVFAudio`-[AVAudioPlayer(AVAudioPlayerPriv) privRemoveSessionListener] + 16
frame #1: 0x00000001b952b9ac AVFAudio`-[AVAudioPlayer dealloc] + 32
frame #2: 0x0000000100dae9e4 Ducko`#objc StartView.__ivar_destroyer(self=0x0000000101e2de70) at startView.swift:0
frame #3: 0x00000001ac8c01e8 libobjc.A.dylib`object_cxxDestructFromClass(objc_object*, objc_class*) + 112
frame #4: 0x00000001ac8d2d14 libobjc.A.dylib`objc_destructInstance + 88
frame #5: 0x00000001ac8d9db8 libobjc.A.dylib`_objc_rootDealloc + 48
frame #6: 0x00000001b0bd19b8 UIKitCore`-[UIResponder dealloc] + 152
frame #7: 0x00000001e1a40900 UIKit`-[UIResponderAccessibility dealloc] + 60
frame #8: 0x00000001c528e93c SpriteKit`-[SKNode dealloc] + 100
frame #9: 0x00000001c52461dc SpriteKit`-[SKScene dealloc] + 332
frame #10: 0x00000001c526bf54 SpriteKit`-[SKView _update:] + 568
frame #11: 0x00000001c526761c SpriteKit`__51-[SKView _vsyncRenderForTime:preRender:postRender:]_block_invoke.340 + 388
frame #12: 0x00000001c5266a1c SpriteKit`-[SKView _vsyncRenderForTime:preRender:postRender:] + 520
frame #13: 0x00000001c5269bd0 SpriteKit`__29-[SKView setUpRenderCallback]_block_invoke + 200
frame #14: 0x00000001c52ac180 SpriteKit`-[SKDisplayLink _callbackForNextFrame:] + 132
frame #15: 0x0000000101c715f8 GPUToolsCore`-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 168
frame #16: 0x00000001b33dd514 QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 632
frame #17: 0x00000001b34a7774 QuartzCore`display_timer_callback(__CFMachPort*, void*, long, void*) + 264
frame #18: 0x00000001acaed6d4 CoreFoundation`__CFMachPortPerform + 172
frame #19: 0x00000001acb16e5c CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
frame #20: 0x00000001acb16588 CoreFoundation`__CFRunLoopDoSource1 + 444
frame #21: 0x00000001acb1145c CoreFoundation`__CFRunLoopRun + 2168
frame #22: 0x00000001acb108bc CoreFoundation`CFRunLoopRunSpecific + 464
frame #23: 0x00000001b697b328 GraphicsServices`GSEventRunModal + 104
frame #24: 0x00000001b0ba56d4 UIKitCore`UIApplicationMain + 1936 * frame #25: 0x0000000100d777c8 Ducko`main at AppDelegate.swift:14:7
frame #26: 0x00000001ac99b460 libdyld.dylib`start + 4
Does anyone have any idea how to fix the problem? I don't know where to start.
I'm trying to use the NSSavePanel and added this line to my code.
let test = NSSavePanel()
Everytime this code is called the this error appears.
I'm not quite sure what is happening here because I'm only creating a new object.
Any help appreciated.
Thanks!
*** Assertion failure in -[NSVBSavePanel viewWillInvalidate:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1561.20.106/Nav.subproj/OpenAndSavePanelRemote/NSVBOpenAndSavePanels.m:387
2017-12-23 18:11:33.110099+0100 test[27753:1527254] -[NSVBSavePanel init] caught non-fatal NSInternalInconsistencyException 'bridge absent' with backtrace (
0 CoreFoundation 0x00007fff3ca1900b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fff635f7c76 objc_exception_throw + 48
2 CoreFoundation 0x00007fff3ca1eda2 +[NSException raise:format:arguments:] + 98
3 Foundation 0x00007fff3eb2b260 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
4 AppKit 0x00007fff3a1e748e -[NSVBSavePanel viewWillInvalidate:] + 188
5 ViewBridge 0x00007fff60f376f2 -[NSRemoteView invalidate:] + 292
6 ViewBridge 0x00007fff60f44e88 -[NSRemoteView _advanceToConfigPhaseLegacy] + 1111
7 ViewBridge 0x00007fff60f45d1b -[NSRemoteView _viewServiceMarshalProxy:withDetailedErrorHandler:] + 230
8 ViewBridge 0x00007fff60f46104 -[NSRemoteView _viewServiceMarshalProxy:withErrorHandler:] + 78
9 ViewBridge 0x00007fff60f38194 -[NSRemoteView bridge] + 227
10 AppKit 0x00007fff3a1a2e36 -[NSVBSavePanel init] + 292
11 AppKit 0x00007fff3a66fc7e -[NSSavePanel initWithContentRect:styleMask:backing:defer:] + 71
12 AppKit 0x00007fff3a1a3093 -[NSPanel init] + 87
13 test 0x0000000100002933 _T0So11NSSavePanelCABycfcTO + 19
14 test 0x000000010000131c _T0So11NSSavePanelCABycfC + 60
15 test 0x0000000100001285 _T04test14ViewControllerC11viewDidLoadyyF + 85
16 test 0x00000001000013b4 _T04test14ViewControllerC11viewDidLoadyyFTo + 36
17 AppKit 0x00007fff39fc1632 -[NSViewController _sendViewDidLoad] + 97
18 AppKit 0x00007fff39fb806d -[NSViewController _loadViewIfRequired] + 390
19 AppKit 0x00007fff39fb7e9d -[NSViewController view] + 30
20 AppKit 0x00007fff3a13675d -[NSWindow _contentViewControllerChanged] + 109
21 Foundation 0x00007fff3ea99ade -[NSObject(NSKeyValueCoding) setValue:forKey:] + 331
22 AppKit 0x00007fff3a1794b1 -[NSWindow setValue:forKey:] + 111
23 AppKit 0x00007fff3a179415 -[NSIBUserDefinedRuntimeAttributesConnector establishConnection] + 637
24 AppKit 0x00007fff39f45bbd -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1430
25 AppKit 0x00007fff3a04113a -[NSNib _instantiateNibWithExternalNameTable:options:] + 679
26 AppKit 0x00007fff3a040d96 -[NSNib _instantiateWithOwner:options:topLevelObjects:] + 136
27 AppKit 0x00007fff3a797180 -[NSStoryboard instantiateControllerWithIdentifier:] + 236
28 AppKit 0x00007fff39f39ecf NSApplicationMain + 729
29 test 0x0000000100002d0d main + 13
30 libdyld.dylib 0x00007fff641e7115 start + 1
)
Your File Access permissions for the User Selected File type are probably still set to the default Read Only value
Navigate to the 'Capabilities' tab for your target
Set the User Selected File permission to Read/Write
Run your app (the bridge absent error should be gone)
I have a file like this as shown below.
chr10 299448 299468 SRR048973.1457734 255 + 3
chr10 299448 299468 SRR048973.2114188 255 + 3
chr10 299448 299468 SRR048973.4148128 255 + 3
chr10 299945 299971 SRR048973.566192 255 + 6
chr10 299959 299982 SRR048973.762883 255 + 6
chr10 299968 299985 SRR048973.1595367 255 + 6
chr10 299968 299985 SRR048973.2828877 255 + 6
chr10 299968 299985 SRR048973.3711952 255 + 6
chr10 299968 299985 SRR048973.3821978 255 + 6
chr10 300073 300095 SRR048973.975870 255 + 1
chr10 300109 300134 SRR048973.1500469 255 + 1
chr10 300185 300209 SRR048973.655183 255 + 8
chr10 300185 300209 SRR048973.933425 255 + 8
chr10 300185 300209 SRR048973.963046 255 + 8
chr10 300185 300209 SRR048973.3506573 255 + 8
chr10 300185 300209 SRR048973.3627590 255 + 8
chr10 300186 300209 SRR048973.1133369 255 + 8
chr10 300186 300209 SRR048973.2178421 255 + 8
chr10 300186 300209 SRR048973.4047933 255 + 8
chr10 300401 300426 SRR048973.918503 255 + 2
chr10 300401 300426 SRR048973.2870188 255 + 2
Looking at the last column, if the last column is >= 5 then I want to count the lines till the column is greater than 5 until it falls back to < 5. Also the output I want should be like this for sample file
chr10 299945 299985 6
chr10 300185 300209 8
299945 comes from the 2nd column where the first 6 starts and 299985 comes from 3rd column where the last 6 ends. Similarly for 8.
I want to do this in Perl.
I tried writing the Perl script but cannot understand how to get coordinates properly.
#!/usr/bin/perl-w
use strict;
use warnings;
open F,'/user/tmp/output.bed',or die $!;
my $i=0;
while(<F>){
chomp;
my #s = split;
if($s[6] >= 5){
$i++;
}else{
if($s[6] < 5){
$i = 0;
}
}
}
How can I do it.
Thanks in advance
Regards
Use a range operator:
use strict;
use warnings;
my #last;
while (<DATA>) {
my #cols = split ' ';
if (my $range = $cols[-1] >= 5 .. $cols[-1] < 5 || eof) {
#last = #cols[0..2,-1] if $range == 1;
print "#last\n" if $range =~ /E/;
$last[2] = $cols[2];
}
}
__DATA__
chr10 299448 299468 SRR048973.1457734 255 + 3
chr10 299448 299468 SRR048973.2114188 255 + 3
chr10 299448 299468 SRR048973.4148128 255 + 3
chr10 299945 299971 SRR048973.566192 255 + 6
chr10 299959 299982 SRR048973.762883 255 + 6
chr10 299968 299985 SRR048973.1595367 255 + 6
chr10 299968 299985 SRR048973.2828877 255 + 6
chr10 299968 299985 SRR048973.3711952 255 + 6
chr10 299968 299985 SRR048973.3821978 255 + 6
chr10 300073 300095 SRR048973.975870 255 + 1
chr10 300109 300134 SRR048973.1500469 255 + 1
chr10 300185 300209 SRR048973.655183 255 + 8
chr10 300185 300209 SRR048973.933425 255 + 8
chr10 300185 300209 SRR048973.963046 255 + 8
chr10 300185 300209 SRR048973.3506573 255 + 8
chr10 300185 300209 SRR048973.3627590 255 + 8
chr10 300186 300209 SRR048973.1133369 255 + 8
chr10 300186 300209 SRR048973.2178421 255 + 8
chr10 300186 300209 SRR048973.4047933 255 + 8
chr10 300401 300426 SRR048973.918503 255 + 2
chr10 300401 300426 SRR048973.2870188 255 + 2
Outputs:
chr10 299945 299985 6
chr10 300185 300209 8
Do you need that counting? Your output seems to not incorporate it...
Using your code sample:
#!/usr/bin/perl-w
use strict;
use warnings;
open F,'/user/tmp/output.bed',or die $!;
my $i=0;
my $wasTheLastGreaterThan5 = 0;
while(<F>){
chomp;
my #s = split;
if(($s[6] >= 5) && !$wasTheLastGreaterThan5){
# Switched from smaller to greater than 5, do something here.
$wasTheLastGreaterThan5 = 1;
}elsif(($s[6] < 5) && $wasTheLastGreaterThan5){
# switched from greater to smaller, do something here.
$wasTheLastGreaterThan5 = 0;
}
else {
# Did not switch, if you need to count, you could do so here.
}
}
What is differance between the UIAlertView's from IOS 5 to IOS 6. In My IOS 6 all server side validation messages are not working..if We click on the Alert Button App is crash. I need Help On this.
(lldb) bt:(after bt got this log)
* thread #1: tid = 0x1c03, 0x0294209b libobjc.A.dylib`objc_msgSend + 15, stop reason = EXC_BAD_ACCESS (code=1, address=0x80000008)
frame #0: 0x0294209b libobjc.A.dylib`objc_msgSend + 15
frame #1: 0x01fc9020 UIKit`-[UIAlertView(Private) _buttonClicked:] + 294
frame #2: 0x02944705 libobjc.A.dylib`-[NSObject performSelector:withObject:withObject:] + 77
frame #3: 0x01bd9920 UIKit`-[UIApplication sendAction:to:from:forEvent:] + 96
frame #4: 0x01bd98b8 UIKit`-[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
frame #5: 0x01c9a671 UIKit`-[UIControl sendAction:to:forEvent:] + 66
frame #6: 0x01c9abcf UIKit`-[UIControl(Internal) _sendActionsForEvents:withEvent:] + 578
frame #7: 0x01c99d38 UIKit`-[UIControl touchesEnded:withEvent:] + 546
frame #8: 0x01c0933f UIKit`-[UIWindow _sendTouchesForEvent:] + 846
frame #9: 0x01c09552 UIKit`-[UIWindow sendEvent:] + 273
frame #10: 0x01be73aa UIKit`-[UIApplication sendEvent:] + 436
frame #11: 0x01bd8cf8 UIKit`_UIApplicationHandleEvent + 9874
frame #12: 0x035fedf9 GraphicsServices`_PurpleEventCallback + 339
frame #13: 0x035fead0 GraphicsServices`PurpleEventCallback + 46
frame #14: 0x02e89bf5 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
frame #15: 0x02e89962 CoreFoundation`__CFRunLoopDoSource1 + 146
frame #16: 0x02ebabb6 CoreFoundation`__CFRunLoopRun + 2118
frame #17: 0x02eb9f44 CoreFoundation`CFRunLoopRunSpecific + 276
frame #18: 0x02eb9e1b CoreFoundation`CFRunLoopRunInMode + 123
frame #19: 0x035fd7e3 GraphicsServices`GSEventRunModal + 88
frame #20: 0x035fd668 GraphicsServices`GSEventRun + 104
frame #21: 0x01bd665c UIKit`UIApplicationMain + 1211
frame #22: 0x0000255d mobiletummy`main + 125 at main.m:14
frame #23: 0x00002495 mobiletummy`start + 53
Have got the same problem. Throwing UIAlert on main thread resolved the thing for me. But on ur log stack it seems that you are already one the main thread.
I'm trying to find the eigenvectors of a symbolic 3x3 rotation matrix in MATLAB, it appears to work for some inputs but not all, for example:
A =
[ cos(q), -sin(q), 0]
[ sin(q), cos(q), 0]
[ 0, 0, 1]
[V,lambda]=eig(A)
V =
[ 0, -i, i]
[ 0, 1, 1]
[ 1, 0, 0]
lambda =
[ 1, 0, 0]
[ 0, cos(q) - sin(q)*i, 0]
[ 0, 0, cos(q) + sin(q)*i]
this works fine, however if I try something which is not a rotation about a unit axis (x,y,z) I get the following error:
A =
[ cos(q), -sin(q), 0]
[ 0, 0, -1]
[ sin(q), cos(q), 0]
>> [V,lambda]=eig(A)
Warning: basis of eigenspace for eigenvalue cos(q)/3 - (cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 +
(cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3)/2 + (cos(q)/3 - cos(q)^2/9)/(2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 +
((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/... [linalg::eigenvectors]
??? Error using ==> mupadmex
Error in MuPAD command: Unable to find explicit eigenvectors.
Error in ==> sym.sym>sym.mupadmexnout at 2003
out = mupadmex(fcn,args{:});
Error in ==> sym.eig at 68
[V,D,p] = mupadmexnout('mllib::eigenvectors',A);
I'm using the eigenvalues to find the axis of rotation of the matrix, and I need to use it for much more complicated systems
Any help would be appreciated.
Thanks
I am unable to reproduce the error (tested on MATLAB R2010b):
syms q
A = [cos(q) -sin(q) 0 ; 0 0 -1 ; sin(q) cos(q) 0]
[V,lambda] = eig(A)
I get the following (rather long) result:
A =
[ cos(q), -sin(q), 0]
[ 0, 0, -1]
[ sin(q), cos(q), 0]
V =
[ (3*cos(q)^2 + 4*cos(q)^3 + cos(q)^4 + 27*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(4/3) + 9*cos(q)*sin(q)^2 + 9*cos(q)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3) - 6*cos(q)^2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3) + 9*cos(q)^2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3) + 2*cos(q)^3*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3) + 18*cos(q)*(cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))/(3*sin(q)*(cos(q)^2 - 3*cos(q) + 9*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3) + 3*cos(q)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3))*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3)), (3*cos(q)^2 - 27*3^(1/2)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(4/3)*i + 4*cos(q)^3 + cos(q)^4 + 27*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(4/3) + 9*cos(q)*sin(q)^2 - 18*cos(q)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3) - 6*cos(q)^2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3) - 18*cos(q)^2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3) + 2*cos(q)^3*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3) + 3*3^(1/2)*cos(q)^2*i + 4*3^(1/2)*cos(q)^3*i + 3^(1/2)*cos(q)^4*i + 18*cos(q)*(cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2) + 6*3^(1/2)*cos(q)^2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3)*i - 2*3^(1/2)*cos(q)^3*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3)*i + 18*3^(1/2)*cos(q)*(cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2)*i + 9*3^(1/2)*cos(q)*sin(q)^2*i)/(3*sin(q)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3)*(cos(q)^2 + 9*3^(1/2)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3)*i - 3*cos(q) + 9*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3) - 6*cos(q)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3) + 3*3^(1/2)*cos(q)*i - 3^(1/2)*cos(q)^2*i)), -(27*3^(1/2)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(4/3)*i + 3*cos(q)^2 + 4*cos(q)^3 + cos(q)^4 + 27*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(4/3) + 9*cos(q)*sin(q)^2 - 18*cos(q)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3) - 6*cos(q)^2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3) - 18*cos(q)^2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3) + 2*cos(q)^3*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3) - 3*3^(1/2)*cos(q)^2*i - 4*3^(1/2)*cos(q)^3*i - 3^(1/2)*cos(q)^4*i + 18*cos(q)*(cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2) - 6*3^(1/2)*cos(q)^2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3)*i + 2*3^(1/2)*cos(q)^3*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3)*i - 18*3^(1/2)*cos(q)*(cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2)*i - 9*3^(1/2)*cos(q)*sin(q)^2*i)/(3*sin(q)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3)*(3*cos(q) + 9*3^(1/2)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3)*i - cos(q)^2 - 9*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3) + 6*cos(q)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3) + 3*3^(1/2)*cos(q)*i - 3^(1/2)*cos(q)^2*i))]
[ -(9*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3))/(cos(q)^2 - 3*cos(q) + 9*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3) + 3*cos(q)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3)), (18*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3))/(cos(q)^2 + 9*3^(1/2)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3)*i - 3*cos(q) + 9*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3) - 6*cos(q)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3) + 3*3^(1/2)*cos(q)*i - 3^(1/2)*cos(q)^2*i), -(18*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3))/(3*cos(q) + 9*3^(1/2)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3)*i - cos(q)^2 - 9*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(2/3) + 6*cos(q)*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + (cos(q)^5/27 + (2*cos(q)^4)/27 + (cos(q)^3*sin(q)^2)/27 + cos(q)^3/27 + (cos(q)^2*sin(q)^2)/3 + sin(q)^4/4)^(1/2))^(1/3) + 3*3^(1/2)*cos(q)*i - 3^(1/2)*cos(q)^2*i)]
[ 1, 1, 1]
lambda =
[ cos(q)/3 + (cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3) - (cos(q)/3 - cos(q)^2/9)/(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3), 0, 0]
[ 0, cos(q)/3 - (cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3)/2 + (cos(q)/3 - cos(q)^2/9)/(2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3)) - (3^(1/2)*((cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3) + (cos(q)/3 - cos(q)^2/9)/(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3))*i)/2, 0]
[ 0, 0, cos(q)/3 - (cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3)/2 + (cos(q)/3 - cos(q)^2/9)/(2*(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3)) + (3^(1/2)*((cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3) + (cos(q)/3 - cos(q)^2/9)/(cos(q)^2/3 + cos(q)^3/27 + sin(q)^2/2 + ((cos(q)/3 - cos(q)^2/9)^3 + (cos(q)^3/27 + cos(q)^2/3 + sin(q)^2/2)^2)^(1/2))^(1/3))*i)/2]
The problematic example you gave is not a general rotation matrix, 1 is not an eigenvalue. See more here http://en.wikipedia.org/wiki/Rotation_matrix. This shouldn't affect the matlab function however, you are guaranteed a basis of generalized eigenvectors over the complex numbers. Do you have any more information about the error? I'm noticing some calls to symmetric matrix-based functions, have you tried calling eig with the option 'qz' to explicitly call the non-symmetric based algorithm?