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

[TIMOB-25747] iOS: Fix error dialog from not showing up when using main thread #9797

Closed
wants to merge 9 commits into from

Conversation

hansemannn
Copy link
Collaborator

@hansemannn hansemannn commented Feb 3, 2018

JIRA: https://jira.appcelerator.org/browse/TIMOB-25747

no tests because it's a UI related change.

@@ -16,7 +16,19 @@ @implementation TiErrorController
- (id)initWithError:(NSString *)error_
{
if (self = [super init]) {
error = [error_ retain];
error = [NSString stringWithFormat:@"⚠️ %@", [error_ retain]];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error is autoreleased object and in dealloc it is released again, it will cause crash. No need of retaining error_ object. It should be -
error = [[NSString alloc] initWithFormat:@"⚠️ %@", error_];

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy paste error :-) Fixed!

error = [NSString stringWithFormat:@"⚠️ %@", [error_ retain]];

if (reason_ != nil) {
reason = [NSString stringWithFormat:@"%@", [reason_ retain]];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@build
Copy link
Contributor

build commented Feb 5, 2018

Messages
📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

@@ -30,6 +42,7 @@ - (void)dealloc
RELEASE_TO_NIL(messageLabel);
RELEASE_TO_NIL(disclosureLabel);
RELEASE_TO_NIL(error);
RELEASE_TO_NIL(reason);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error and reason objects are autoreleased objects. These are released again here. It'll cause crash.

Copy link
Contributor

@vijaysingh-axway vijaysingh-axway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR passed.

@hansemannn hansemannn changed the title [TIMOB-25747] Fix error dialog from not showing up when using main thread [TIMOB-25747] iOS: Fix error dialog from not showing up when using main thread Feb 16, 2018
@hansemannn hansemannn modified the milestones: 7.1.0, 7.2.0 Feb 16, 2018
@hansemannn
Copy link
Collaborator Author

Already handled via #10022

@hansemannn hansemannn closed this May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants