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

Fix for Dialogs crashing on iOS #2866

Merged
merged 1 commit into from
Oct 11, 2016
Merged

Fix for Dialogs crashing on iOS #2866

merged 1 commit into from
Oct 11, 2016

Conversation

NathanaelA
Copy link
Contributor

The new cool Pseudo selector cool have a negative interaction with Dialogs; the code will now create a "NSInternalInconsistencyException" later in an iOS application. (Depending on when GC occurs)

The issue is that the dialog-common creates a new button, applies the CSS selector and grabs its color. The process of applying the CSS selector causes the pseudo selector code to be registered via the _updateHandler code inside the button.ios.ts file. For every "observer" registered, you must de-register it before deallocation. However, since the "onUnloaded" code is never called (because the button is not actually put into the DOM) the observer is never un-registered. This patch manually calls the onUnloaded() function which de-registers the observer so everything is great again.

The commit message references a specific issue in this repo

Fixes NativeScript/ios-jsc#665

@ns-bot
Copy link

ns-bot commented Oct 8, 2016

Can one of the admins verify this patch?

7 similar comments
@ns-bot
Copy link

ns-bot commented Oct 8, 2016

Can one of the admins verify this patch?

@ns-bot
Copy link

ns-bot commented Oct 8, 2016

Can one of the admins verify this patch?

@ns-bot
Copy link

ns-bot commented Oct 8, 2016

Can one of the admins verify this patch?

@ns-bot
Copy link

ns-bot commented Oct 8, 2016

Can one of the admins verify this patch?

@ns-bot
Copy link

ns-bot commented Oct 8, 2016

Can one of the admins verify this patch?

@ns-bot
Copy link

ns-bot commented Oct 8, 2016

Can one of the admins verify this patch?

@ns-bot
Copy link

ns-bot commented Oct 8, 2016

Can one of the admins verify this patch?

@ns-bot ns-bot added the cla: yes label Oct 8, 2016
@dtopuzov
Copy link
Contributor

run ci

@hshristov hshristov merged commit a5273b7 into NativeScript:master Oct 11, 2016
@NathanaelA NathanaelA deleted the iosDialogCrash branch October 12, 2016 07:48
@NathanaelA NathanaelA restored the iosDialogCrash branch October 20, 2016 00:49
@NathanaelA NathanaelA deleted the iosDialogCrash branch October 20, 2016 00:58
@lock
Copy link

lock bot commented Aug 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NativeScript NSInternalInconsistencyException Error
4 participants