Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_assert(CYRecvAll(client, &size, sizeof(size))):../Console.cpp(142):Run #10

Open
nderkach opened this issue Aug 3, 2015 · 33 comments
Open

Comments

@nderkach
Copy link

nderkach commented Aug 3, 2015

When using the deb for the current repository, I have the following error when loading InspectiveC with cycript:

cy# intFunc=new Type("v").functionWith(int);objFunc=new Type("v").functionWith(id);classFunc=new Type("v").functionWith(Class);selFunc=new Type("v").functionWith(SEL);voidFunc=new Type("v").functionWith(new Type("v"));objSelFunc=new Type("v").functionWith(id,SEL);classSelFunc=new Type("v").functionWith(Class,SEL);handle=dlopen("/usr/lib/libinspectivec.dylib",RTLD_NOW);setMaximumRelativeLoggingDepth=intFunc(dlsym(handle,"InspectiveC_setMaximumRelativeLoggingDepth"));watchObject=objFunc(dlsym(handle,"InspectiveC_watchObject"));unwatchObject=objFunc(dlsym(handle,"InspectiveC_unwatchObject"));watchSelectorOnObject=objSelFunc(dlsym(handle,"InspectiveC_watchSelectorOnObject"));unwatchSelectorOnObject=objSelFunc(dlsym(handle,"InspectiveC_unwatchSelectorOnObject"));watchClass=classFunc(dlsym(handle,"InspectiveC_watchInstancesOfClass"));unwatchClass=classFunc(dlsym(handle,"InspectiveC_unwatchInstancesOfClass"));watchSelectorOnClass=classSelFunc(dlsym(handle,"InspectiveC_watchSelectorOnInstancesOfClass"));unwatchSelectorOnClass=classSelFunc(dlsym(handle,"InspectiveC_unwatchSelectorOnInstancesOfClass"));watchSelector=selFunc(dlsym(handle,"InspectiveC_watchSelector"));unwatchSelector=selFunc(dlsym(handle,"InspectiveC_unwatchSelector"));enableLogging=voidFunc(dlsym(handle,"InspectiveC_enableLogging"));disableLogging=voidFunc(dlsym(handle,"InspectiveC_disableLogging"));enableCompleteLogging=voidFunc(dlsym(handle,"InspectiveC_enableCompleteLogging"));disableCompleteLogging=voidFunc(dlsym(handle,"InspectiveC_disableCompleteLogging"))
*** _assert(CYRecvAll(client, &size, sizeof(size))):../Console.cpp(142):Run
@DavidGoldman
Copy link
Owner

What process are you injecting into?

I also recommend transferring InspectiveC.cy to your device; navigate to the directory that it is in and

$ cycript -p <Process> InspectiveC.cy
<non-zero address printed>
$ cycript -p <Process>
<do the thing>

@nderkach
Copy link
Author

nderkach commented Aug 4, 2015

@DavidGoldman it seems like the problem persists with all 3rd party apps, i.e. here is an example with Uber app:

Nikolays-iPhone:~ root# cycript -p UberClient InspectiveC.cy
*** _assert(CYRecvAll(client, &size, sizeof(size))):../Console.cpp(142):Run

It seems to work fine with a few of the stock apps I tried.

@DavidGoldman
Copy link
Owner

Unable to reproduce this - what device + iOS version are you on?

@nderkach
Copy link
Author

nderkach commented Aug 5, 2015

iOS 8.4 with iPhone 5c
Apparently the dlopen fails for some reason. I've tried both the library from deb and one compiled locally.

@DavidGoldman
Copy link
Owner

Just tested this on my iPhone 5 and it works fine. Is InspectiveC installed properly? You can modify the cycript file to print dlerror() to help figure this out.

@nderkach
Copy link
Author

There is not way to print dlerror() as it crashes right on dlopen without returning.

@DavidGoldman
Copy link
Owner

If you compile your own tweak with the InspCWrapper, does it work? Is there a crashlog, perhaps (try CrashReporter)?

@ZaneH
Copy link

ZaneH commented Oct 31, 2015

I'm also experiencing this issue when using watchClass inside Apple's Camera application.

cy# watchClass(CUCaptureController)
*** _assert(CYRecvAll(client, &size, sizeof(size))):../Console.cpp(140):Run

iPhone 5s on iOS 9.0.2

@DavidGoldman
Copy link
Owner

What happens if you run the code inside of a tweak instead? Does the Camera app crash?

@ZaneH
Copy link

ZaneH commented Oct 31, 2015

I tried using the InspCWrapper.m inside my project, and the Camera app didn't crash, but I also didn't see any of the logs in the log directory.

@DavidGoldman
Copy link
Owner

See #6. Not sure why it would crash in Cycript though.

@ddaddy
Copy link

ddaddy commented Apr 25, 2016

I'll post this here as it might be related.
Since updating to the latest build through Cydia, as soon as I enter the Cycrip script it crashes with a similar *** _assert(CYRecvAll(client, &size, sizeof(size))):../Console.cpp(274):Run

In the device logs it shows

: *** NSForwarding: warning: selector (0x2551fdc) for message 'firstObject' does not match selector known to Objective C runtime (0x2a7f1b6e)-- abort
: -[__NSArrayI firstObject]: unrecognized selector sent to instance 0x16da4880
: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI firstObject]: unrecognized selector sent to instance 0x16da4880'

The same happens when linking the inspectivec in a Theos tweak.

The previous version seemed to work fine.

@DavidGoldman
Copy link
Owner

Hmm, what about this version? This one is compiled with libinspectivec_LDFLAGS += -Wl,-segalign,4000 which might have been the problem.

@ddaddy
Copy link

ddaddy commented Apr 25, 2016

No, still the same problem.

@DavidGoldman
Copy link
Owner

What was the old version that you were using? What iOS version are you on? And what process are you injecting into?

@ddaddy
Copy link

ddaddy commented Apr 25, 2016

The previous version I used is whatever was on your repo before you updated it. I only installed it 3 days ago, so would have been the previous version.

iOS 8.4

It crashes when hooking SpringBoard

@DavidGoldman
Copy link
Owner

Hmm, try compiling InspectiveC (clone from repo) with the iOS 8.4 SDK. Does that version work?

@ddaddy
Copy link

ddaddy commented Apr 26, 2016

Ok, I have tried with both 9.3 and 8.4 SDK's.
I'm not sure if it matters, but when building I get this warning:

Making all for library libinspectivec...
clang: error: argument unused during compilation: '-fobjc-exceptions'
clang: error: argument unused during compilation: '-fobjc-exceptions'
clang: error: argument unused during compilation: '-fobjc-exceptions'
clang: error: argument unused during compilation: '-fobjc-exceptions'
Compiling hashmap.mm...
Compiling logging.mm...
Compiling blocks.mm...
Compiling InspectiveC.mm...
Linking library libinspectivec...
ld: warning: invalid -install_name (/Library/Frameworks/CydiaSubstrate.framework/CydiaSubstrate) in dependent dylib (/Users/ddaddy/Downloads/InspectiveC-master/theos/lib/libsubstrate.dylib). Dylibs/frameworks which might go in dyld shared cache cannot link with dylibs that won't be in the shared cache
ld: warning: invalid -install_name (/Library/Frameworks/CydiaSubstrate.framework/CydiaSubstrate) in dependent dylib (/Users/ddaddy/Downloads/InspectiveC-master/theos/lib/libsubstrate.dylib). Dylibs/frameworks which might go in dyld shared cache cannot link with dylibs that won't be in the shared cache
Stripping libinspectivec...
Signing libinspectivec...
Making stage for library libinspectivec...
dpkg-deb: building package 'com.golddavid.inspectivec' in './com.golddavid.inspectivec_1.1.0-4_iphoneos-arm.deb'.

When the dlopen hits in Cycript, it crashes with:

*** _assert(CYRecvAll(client, &size, sizeof(size))):../Console.cpp(274):Run

And the device log doesn't give much away:

Apr 26 12:25:07 iPhone com.apple.xpc.launchd[1] <Error>: assertion failed: 12H143: launchd + 124655 [286412CA-CAB0-33DB-94C7-DBC003CA1DAF]: 0xe
Apr 26 12:25:07 iPhone com.apple.xpc.launchd[1] <Error>: assertion failed: 12H143: launchd + 124655 [286412CA-CAB0-33DB-94C7-DBC003CA1DAF]: 0xe
Apr 26 12:25:07 iPhone com.apple.xpc.launchd[1] <Error>: assertion failed: 12H143: launchd + 124655 [286412CA-CAB0-33DB-94C7-DBC003CA1DAF]: 0xe
Apr 26 12:25:10 iPhone AppSalesMobile[1712] <Warning>: [InspectiveC] Loading - Directory is "/var/mobile/Containers/Data/Application/B9EB211D-A70C-4463-A13F-F69BBC4947CC/Documents"
Apr 26 12:25:10 iPhone ReportCrash[1723] <Notice>: MS:Notice: Injecting: (null) [ReportCrash] (1145.15)
Apr 26 12:25:10 iPhone ReportCrash[1723] <Notice>: MS:Notice: Loading: /Library/MobileSubstrate/DynamicLibraries/RocketBootstrap.dylib
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: task_set_exception_ports(B07, 400, F03, 0, 0) failed with error (4: (os/kern) invalid argument)
Apr 26 12:25:11 iPhone ReportCrash[1723] <Notice>: ReportCrash acting against PID 1712
Apr 26 12:25:11 iPhone ReportCrash[1723] <Notice>: Formulating crash report for process AppSalesMobile[1712]
Apr 26 12:25:11 iPhone com.apple.xpc.launchd[1] (UIKitApplication:com.steve.appsales[0x177d][1712]) <Notice>: Service exited due to signal: Segmentation fault: 11
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Not saving crash log because we have reached the limit for logs to store on disk.  Sync or otherwise clear logs from /var/mobile/Library/Logs/CrashReporter to save new logs.
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Could not save crash report to disk!
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Incident Identifier: 463E1FA6-DEB4-4B8D-A307-714118983CD1
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: CrashReporter Key:   3c5d15b752bf5a6b275d8489ff1b27ba42a4cf67
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Hardware Model:      iPhone5,2
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Process:             AppSalesMobile [1712]
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Path:                /private/var/mobile/Containers/Bundle/Application/B85E624C-7C8D-4495-B7C5-9434287181E7/AppSalesMobile.app/AppSalesMobile
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Identifier:          AppSalesMobile
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Version:             ???
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Code Type:           ARM (Native)
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Parent Process:      launchd [1]
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Date/Time:           2016-04-26 12:25:11.008 +0100
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Launch Time:         2016-04-26 12:24:49.649 +0100
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: OS Version:          iOS 8.4 (12H143)
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Report Version:      105
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Triggered by Thread:  7
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 0 name:  Dispatch queue: com.apple.main-thread
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 0:
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 0   libsystem_kernel.dylib            0x35a85474 0x35a84000 + 5236
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 1   libsystem_kernel.dylib            0x35a85268 0x35a84000 + 4712
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 2   CoreFoundation                    0x26d3e56e 0x26c71000 + 841070
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 3   CoreFoundation                    0x26d3cb14 0x26c71000 + 834324
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 4   CoreFoundation                    0x26c891fc 0x26c71000 + 98812
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 5   CoreFoundation                    0x26c8900e 0x26c71000 + 98318
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 6   GraphicsServices                  0x2e75a1fc 0x2e751000 + 37372
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 7   UIKit                             0x2a455a04 0x2a3e6000 + 457220
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 8   AppSalesMobile                    0x000304b2 0x2a000 + 25778
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 9   libdyld.dylib                     0x359ceaac 0x359cd000 + 6828
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 1:
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 0   libsystem_kernel.dylib            0x35a85224 0x35a84000 + 4644
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 1   libdispatch.dylib                 0x359ba0ec 0x359ac000 + 57580
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 2   libdispatch.dylib                 0x359aed36 0x359ac000 + 11574
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 2:
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 0   libsystem_kernel.dylib            0x35a999c0 0x35a84000 + 88512
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 1   libsystem_pthread.dylib           0x35b14e38 0x35b14000 + 3640
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 2   libsystem_pthread.dylib           0x35b14b10 0x35b14000 + 2832
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 3:
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 0   libsystem_kernel.dylib            0x35a99234 0x35a84000 + 86580
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 1   libsystem_c.dylib                 0x359f0dd2 0x359ea000 + 28114
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 2   libcycript.dylib                  0x0679f5e0 0x6793000 + 50656
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 3   libcycript.dylib                  0x068366bc 0x6793000 + 669372
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 4   libcycript.dylib                  0x068351ac 0x6793000 + 663980
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 5   libsystem_pthread.dylib           0x35b16e20 0x35b14000 + 11808
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 6   libsystem_pthread.dylib           0x35b16d92 0x35b14000 + 11666
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 7   libsystem_pthread.dylib           0x35b14b1c 0x35b14000 + 2844
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 4 name:  JavaScriptCore::BlockFree
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 4:
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 0   libsystem_kernel.dylib            0x35a98b2c 0x35a84000 + 84780
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 1   libsystem_pthread.dylib           0x35b16384 0x35b14000 + 9092
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 2   libsystem_pthread.dylib           0x35b17268 0x35b14000 + 12904
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 3   libc++.1.dylib                    0x34cf7e8c 0x34cf2000 + 24204
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 4   JavaScriptCore                    0x27fa3412 0x27f8e000 + 87058
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 5   JavaScriptCore                    0x27f9f8a4 0x27f8e000 + 71844
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 6   libsystem_pthread.dylib           0x35b16e20 0x35b14000 + 11808
Apr 26 12:25:11 iPhone SpringBoard[1673] <Warning>: Application 'UIKitApplication:com.steve.appsales[0x177d]' crashed.
Apr 26 12:25:11 iPhone assertiond[108] <Warning>: pid_suspend failed for <BKNewProcess: 0x14623050; com.steve.appsales; pid: 1712; hostpid: -1>: Unknown error: -1, Unknown error: -1
Apr 26 12:25:11 iPhone assertiond[108] <Warning>: Could not set priority of <BKNewProcess: 0x14623050; com.steve.appsales; pid: 1712; hostpid: -1> to 2, priority: No such process
Apr 26 12:25:11 iPhone assertiond[108] <Warning>: Could not set priority of <BKNewProcess: 0x14623050; com.steve.appsales; pid: 1712; hostpid: -1> to 4096, priority: No such process
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 7   libsystem_pthread.dylib           0x35b16d92 0x35b14000 + 11666
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 8   libsystem_pthread.dylib           0x35b14b1c 0x35b14000 + 2844
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 5 name:  JavaScriptCore::Marking
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 5:
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 0   libsystem_kernel.dylib            0x35a98b2c 0x35a84000 + 84780
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 1   libsystem_pthread.dylib           0x35b16384 0x35b14000 + 9092
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 2   libsystem_pthread.dylib           0x35b17268 0x35b14000 + 12904
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 3   libc++.1.dylib                    0x34cf7e8c 0x34cf2000 + 24204
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 4   JavaScriptCore                    0x2816b320 0x27f8e000 + 1954592
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 5   JavaScriptCore                    0x2816b384 0x27f8e000 + 1954692
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 6   JavaScriptCore                    0x27f9f8a4 0x27f8e000 + 71844
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 7   libsystem_pthread.dylib           0x35b16e20 0x35b14000 + 11808
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 8   libsystem_pthread.dylib           0x35b16d92 0x35b14000 + 11666
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 9   libsystem_pthread.dylib           0x35b14b1c 0x35b14000 + 2844
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 6:
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 0   libsystem_kernel.dylib            0x35a999c0 0x35a84000 + 88512
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 1   libsystem_pthread.dylib           0x35b14e38 0x35b14000 + 3640
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 2   libsystem_pthread.dylib           0x35b14b10 0x35b14000 + 2832
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 7 name:  Dispatch queue: jsc.watchdog.queue
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 7 Crashed:
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 0   ???                               0000000000 0 + 0
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 1   libdispatch.dylib                 0x359b5396 0x359ac000 + 37782
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 2   libdispatch.dylib                 0x359afaac 0x359ac000 + 15020
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 3   libdispatch.dylib                 0x359b6f9e 0x359ac000 + 44958
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 4   libdispatch.dylib                 0x359b83c2 0x359ac000 + 50114
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 5   libsystem_pthread.dylib           0x35b14dc0 0x35b14000 + 3520
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: 6   libsystem_pthread.dylib           0x35b14b14 0x35b14000 + 2836
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>: Thread 7 crashed with ARM Thread State (32-bit):
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>:     r0: 0x15e992a0    r1: 0x26c46015      r2: 0x00000000      r3: 0x00000000
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>:     r4: 0x15e992a0    r5: 0x00000000      r6: 0x00000000      r7: 0x06b94f28
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>:     r8: 0x00000001    r9: 0x06b95000     r10: 0x383fb640     r11: 0x00000000
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>:     ip: 0x00000000    sp: 0x06b94f18      lr: 0x359b6555      pc: 0x00000000
Apr 26 12:25:11 iPhone ReportCrash[1723] <Error>:   cpsr: 0x60000010

@DavidGoldman
Copy link
Owner

Odd, nothing in the build log looks out of the ordinary.... maybe try commenting out line 3 in the makefile? Really not sure what's causing this issue.

@ddaddy
Copy link

ddaddy commented Apr 27, 2016

When I comment out the ADDITIONAL_OBJCFLAGS = -fobjc-exceptions line I get lots of errors like the below. Tried with both SDK 8.4 & 9.3

In file included from hashmap.mm:1:
In file included from ./hashmap.h:5:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:21:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/signal.h:63:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/sys/signal.h:146:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/usr/include/machine/_mcontext.h:31:2: error: 
      architecture not supported
#error architecture not supported

@ddaddy
Copy link

ddaddy commented Apr 28, 2016

I have just tried an iOS 7.0.4 device, and in Cycript I get

throw #"-[__NSArrayI firstObject]: unrecognized selector sent to instance 0x165ba4d0"

I tried doing:

var p = new Instance(0x165ba4d0)

and got

@0.1401666668243706

@DavidGoldman
Copy link
Owner

Does compiling an older version of InspectiveC work?

@ddaddy
Copy link

ddaddy commented Apr 28, 2016

Where can I grab an old version from?

@DavidGoldman
Copy link
Owner

You can just checkout an older commit.

@ddaddy
Copy link

ddaddy commented Apr 29, 2016

Older commits don't work either. Although I remember not being able to get it to work the first time I tried, until I downloaded the deb from your repo.
I don't suppose you have a copy of the last deb you had on your repo for me to try?

@ddaddy
Copy link

ddaddy commented Apr 29, 2016

I noticed you had this line commented out in the MakeFile ADDITIONAL_OBJCFLAGS += -S
I won't even pretend to know what that does, but I uncommented it and it wouldn't build saying it can't build multiple architectures, so I changed ARCHS to just armv7 and get these errors when compiling.

Linking library libinspectivec...
ld: warning: ld: warning: ignoring file obj/hashmap.mm.48405e2e.o, file was built for unsupported file format ( 0x09 0x2E 0x73 0x65 0x63 0x74 0x69 0x6F 0x6E 0x09 0x5F 0x5F 0x54 0x45 0x58 0x54 ) which is not the architecture being linked (armv7): obj/hashmap.mm.48405e2e.oignoring file obj/logging.mm.48405e2e.o, file was built for unsupported file format ( 0x09 0x2E 0x73 0x65 0x63 0x74 0x69 0x6F 0x6E 0x09 0x5F 0x5F 0x54 0x45 0x58 0x54 ) which is not the architecture being linked (armv7): obj/logging.mm.48405e2e.o

ld: warning: ignoring file obj/blocks.mm.48405e2e.o, file was built for unsupported file format ( 0x09 0x2E 0x73 0x65 0x63 0x74 0x69 0x6F 0x6E 0x09 0x5F 0x5F 0x54 0x45 0x58 0x54 ) which is not the architecture being linked (armv7): obj/blocks.mm.48405e2e.o
ld: warning: ignoring file obj/InspectiveC.mm.48405e2e.o, file was built for unsupported file format ( 0x09 0x2E 0x73 0x65 0x63 0x74 0x69 0x6F 0x6E 0x09 0x5F 0x5F 0x54 0x45 0x58 0x54 ) which is not the architecture being linked (armv7): obj/InspectiveC.mm.48405e2e.o
ld: warning: invalid -install_name (/Library/Frameworks/CydiaSubstrate.framework/CydiaSubstrate) in dependent dylib (/Users/darrenjones/Downloads/InspectiveC-master/theos/lib/libsubstrate.dylib). Dylibs/frameworks which might go in dyld shared cache cannot link with dylibs that won't be in the shared cache

Could it be a problem with 32bit vs 64bit?

@DavidGoldman
Copy link
Owner

DavidGoldman commented Apr 29, 2016

That flag is for debugging - it produces assembly code to inspect. How are you compiling?

@ddaddy
Copy link

ddaddy commented Apr 30, 2016

I'm just running make package.

@DavidGoldman
Copy link
Owner

What version of theos are you using?

@ddaddy
Copy link

ddaddy commented May 1, 2016

I updated theos and still no dice.
I did just notice you have the old .deb's in this repo. I installed the previous 1.0.9 and it works :) Installing 1.1.0 both single and multithreaded results in the [NSArray firstObject] crash I posted above.

I did add some logs and it seems the crash isn't caused by the one time your code calls firstObject. That seems to run past fine.

@ddaddy
Copy link

ddaddy commented Nov 9, 2016

I've just ran into this problem again, Googled it and ended up back here lol.
Anyway, it seems this problem still exists.

@DavidGoldman
Copy link
Owner

Do the old versions of the deb work? Where are you having the issues?

@ddaddy
Copy link

ddaddy commented Nov 9, 2016

Yes your 1.0.9 deb works.
It's crashing immediately on [NSArray firstObject]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants