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

[Crash] Reloading with profiling enabled sends null selector to modules upon deallocation #1642

Closed
jaygarcia opened this issue Jun 16, 2015 · 13 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@jaygarcia
Copy link
Contributor

Updated my app to 0.6.0-rc and all hell breaks loose when I hit CMD + R. Also, SHIFT + CMD + Z (shake) does not invoke a menu any longer :(.

Thoughts?

2015-06-16 14:10:29.633 KGMP[23791:1481677] *** NSForwarding: warning: selector (0x0) for message '<null selector>' does not match selector known to Objective C runtime (0x7faa3cb03810)-- abort
2015-06-16 14:10:29.634 KGMP[23791:1481677] -[RCTAlertManager (null selector)]: unrecognized selector sent to instance 0x7faa3b600420
2015-06-16 14:10:29.635 KGMP[23791:1481677] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RCTAlertManager (null selector)]: unrecognized selector sent to instance 0x7faa3b600420'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010b6b6c65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010a353bb7 objc_exception_throw + 45
    2   CoreFoundation                      0x000000010b6be0ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x000000010b61413c ___forwarding___ + 988
    4   CoreFoundation                      0x000000010b613cd8 _CF_forwarding_prep_0 + 120
    5   libobjc.A.dylib                     0x000000010a352448 _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 127
    6   libobjc.A.dylib                     0x000000010a3609b1 objc_destructInstance + 96
    7   libobjc.A.dylib                     0x000000010a3609e4 object_dispose + 22
    8   libobjc.A.dylib                     0x000000010a36828e _ZN11objc_object17sidetable_releaseEb + 236
    9   CoreFoundation                      0x000000010b58c8eb CFRelease + 603
    10  CoreFoundation                      0x000000010b5ab4de -[__NSArrayI dealloc] + 78
    11  libobjc.A.dylib                     0x000000010a36828e _ZN11objc_object17sidetable_releaseEb + 236
    12  libobjc.A.dylib                     0x000000010a3688cd _ZN12_GLOBAL__N_119AutoreleasePoolPage3popEPv + 591
    13  CoreFoundation                      0x000000010b5abf06 _CFAutoreleasePoolPop + 22
    14  CoreFoundation                      0x000000010b5dfdd3 __CFRunLoopRun + 2051
    15  CoreFoundation                      0x000000010b5df366 CFRunLoopRunSpecific + 470
    16  GraphicsServices                    0x000000010f1c7a3e GSEventRunModal + 161
    17  UIKit                               0x000000010d117900 UIApplicationMain + 1282
    18  KGMP                                0x00000001097a46e7 main + 119
    19  libdyld.dylib                       0x000000010e533145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
@jaygarcia
Copy link
Contributor Author

Downgrading to "react-native": "^0.5.0", everything works as expected =).

Looking forward to a stable 0.6.0 and beyond.

@nicklockwood
Copy link
Contributor

Hmm. I can't reproduce this. CMD + R works as expected for me on Xcode 6.3.1. It currently does nothing on Xcode 7 beta, but that's a known issue.

SHIFT + CMD + Z not working is probably because the keyboard shortcut is actually CTRL + CMD + Z ;-)

@jaygarcia
Copy link
Contributor Author

I upgraded the mod player project I shared with you guys. GitHub master is working as expected.

I will create a .6.0 project from scratch and migrate things by hand.

And yes, I mistyped. CTRL + CMD + Z is failing.

/me slaps self

@brentvatne brentvatne changed the title 0.6.0-rc causes SIGHUP with CMD+R while Sim is focused: [Crash] 0.6.0-rc causes SIGHUP with CMD+R while Sim is focused: Jun 17, 2015
@PhilippKrone
Copy link
Contributor

Hi,

is there any news on this topic? I get the same with 0.6.0-rc:

2015-06-24 08:00:17.307 Yoloci[15250:17707298] *** NSForwarding: warning: selector (0x0) for message '' does not match selector known to Objective C runtime (0x7fca9b385200)-- abort
2015-06-24 08:00:17.308 Yoloci[15250:17707298] -[RCTExceptionsManager (null selector)]: unrecognized selector sent to instance 0x7fca9b15b660
2015-06-24 08:00:17.311 Yoloci[15250:17707298] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RCTExceptionsManager (null selector)]: unrecognized selector sent to instance 0x7fca9b15b660'
*** First throw call stack:
(
0 CoreFoundation 0x00000001077cec65 exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000107463bb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001077d60ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x000000010772c13c __forwarding
+ 988
4 CoreFoundation 0x000000010772bcd8 _CF_forwarding_prep_0 + 120
5 libobjc.A.dylib 0x0000000107462448 _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 127
6 libobjc.A.dylib 0x00000001074709b1 objc_destructInstance + 96
7 libobjc.A.dylib 0x00000001074709e4 object_dispose + 22
8 libobjc.A.dylib 0x000000010747828e _ZN11objc_object17sidetable_releaseEb + 236
9 CoreFoundation 0x00000001076a48eb CFRelease + 603
10 CoreFoundation 0x00000001076c34de -[__NSArrayI dealloc] + 78
11 libobjc.A.dylib 0x000000010747828e _ZN11objc_object17sidetable_releaseEb + 236
12 libobjc.A.dylib 0x00000001074788cd _ZN12_GLOBAL__N_119AutoreleasePoolPage3popEPv + 591
13 CoreFoundation 0x00000001076c3f06 _CFAutoreleasePoolPop + 22
14 CoreFoundation 0x00000001076f7dd3 __CFRunLoopRun + 2051
15 CoreFoundation 0x00000001076f7366 CFRunLoopRunSpecific + 470
16 GraphicsServices 0x0000000109107a3e GSEventRunModal + 161
17 UIKit 0x000000010507c900 UIApplicationMain + 1282
18 Yoloci 0x0000000102331edf main + 111
19 libdyld.dylib 0x000000010956c145 start + 1
20 ??? 0x0000000000000001 0x0 + 1

@jaygarcia
Copy link
Contributor Author

So, in case there were any concerns with something with an update, i decided to create a project using 0.6.0 from scratch and I got the same problems (see below). Nearly threw a brick through a window :p

I did some digging and it seems that absolutely everything had to be in place (duh!) for it to work properly.

This included:

  • custom classes
  • Fonts
  • External dependencies
  • Changing main.m to main.mm
  • Updating header search paths
  • External files (mod songs, sqlite database, etc).

Oh joy.

2015-06-29 10:42:52.769 KGMP[8296:190462] *** NSForwarding: warning: selector (0x0) for message '<null selector>' does not match selector known to Objective C runtime (0x7fc003d42270)-- abort
2015-06-29 10:42:52.769 KGMP[8296:190462] -[RCTAsyncLocalStorage (null selector)]: unrecognized selector sent to instance 0x7fc003db37b0
2015-06-29 10:42:52.771 KGMP[8296:190462] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RCTAsyncLocalStorage (null selector)]: unrecognized selector sent to instance 0x7fc003db37b0'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010bd85c65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010aa26bb7 objc_exception_throw + 45
    2   CoreFoundation                      0x000000010bd8d0ad -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x000000010bce313c ___forwarding___ + 988
    4   CoreFoundation                      0x000000010bce2cd8 _CF_forwarding_prep_0 + 120
    5   libobjc.A.dylib                     0x000000010aa25448 _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 127
    6   libobjc.A.dylib                     0x000000010aa339b1 objc_destructInstance + 96
    7   libobjc.A.dylib                     0x000000010aa339e4 object_dispose + 22
    8   libobjc.A.dylib                     0x000000010aa3b28e _ZN11objc_object17sidetable_releaseEb + 236
    9   CoreFoundation                      0x000000010bc5b8eb CFRelease + 603
    10  CoreFoundation                      0x000000010bc7a4de -[__NSArrayI dealloc] + 78
    11  libobjc.A.dylib                     0x000000010aa3b28e _ZN11objc_object17sidetable_releaseEb + 236
    12  libobjc.A.dylib                     0x000000010aa3b8cd _ZN12_GLOBAL__N_119AutoreleasePoolPage3popEPv + 591
    13  CoreFoundation                      0x000000010bc7af06 _CFAutoreleasePoolPop + 22
    14  CoreFoundation                      0x000000010bcaedd3 __CFRunLoopRun + 2051
    15  CoreFoundation                      0x000000010bcae366 CFRunLoopRunSpecific + 470
    16  GraphicsServices                    0x000000010f9a7a3e GSEventRunModal + 161
    17  UIKit                               0x000000010d7e6900 UIApplicationMain + 1282
    18  KGMP                                0x0000000109f8e057 main + 119
    19  libdyld.dylib                       0x000000010f238145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

@ide
Copy link
Contributor

ide commented Jul 4, 2015

I was able to repro this on master in the UIExplorer by enabling profiling and then clicking the reload button in the dev menu. I suspect it may have to do with the autogenerated profiling subclasses cc @tadeuzagallo

@ide ide reopened this Jul 4, 2015
@ide ide changed the title [Crash] 0.6.0-rc causes SIGHUP with CMD+R while Sim is focused: [Crash] Reloading with profiling enabled sends null selector to modules upon deallocation Jul 4, 2015
@tadeuzagallo
Copy link
Contributor

Thanks @ide, that's the exact issue. I have a fix for it, should be out soon.

@ide
Copy link
Contributor

ide commented Jul 9, 2015

Reopening this since the fix was reverted along with the diff before it: sahrens@f21e79d

@ide ide reopened this Jul 9, 2015
@Checksum
Copy link

Facing the same issue on 0.8.0-rc2 and Xcode 7 beta 3. Any workaround to this temporarily? Finding it very difficult to do any sort of development without the ability to reload.

@tadeuzagallo
Copy link
Contributor

Do you really need to reload during profile? You can put a RCTProfileInit() in your code if that's the case. I have fixed id, but had some stability problems, I'll re-ship it this week.

@Checksum
Copy link

Sorry, forgot to mention that I'm an Xcode newbie. Figured out that I had to do Build for -> Running rather than just hitting the play button (which was somehow building for profiling and causing the crash). Thanks!

@ide
Copy link
Contributor

ide commented Jul 20, 2015

Do you really need to reload during profile?

It's mostly useful for profiling how long the first render() takes, if you wanted to improve TTI for example.

@tadeuzagallo
Copy link
Contributor

@ide, I understand and totally agree, it's just because he asked for a temporary workaround. I'm literally working on fixing it now, so it should be out soon.

@facebook facebook locked as resolved and limited conversation to collaborators Jul 22, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

7 participants