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(ios): check for selector availability #12128
Conversation
Tests:
|
[[self view] updateClipping]; | ||
if ([[self view] respondsToSelector:@selector(updateClipping)]) { | ||
[[self view] updateClipping]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure this does not fix the real issue. Primarily, because this used to work before and the error suggests that a wrong instance is bubbled up in the event
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vijaysingh-axway I think Hans is right here. I did a quick debug session and it appears that self.view
is holding a wrong value. Xcode debugger says it's nil
so it may have been accidentally released and now holds an invalid pointer. Can you please double check what's going on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above.
Looking at diffs between 9.0.3 and 9.1.0, this change related to TIMOB-27935 looks suspicious: b15d184 I think this stems because now a row proxy returns the The code generally assumes the view returned is a |
To fix an issue (kind of parity) https://jira.appcelerator.org/browse/TIMOB-27935, as Chris has mentioned, I have returned the cell view associated with row proxy which is not TiUIView. This is causing the crash. Initially it was nil so there was not issue. So- |
So, this may be a quick and dirty fix for this issue, but it exposes the fact that the earlier fix broke the Or maybe we can extract some common protocol used by callers and ensure |
I am thinking to revert the changes of PR #11758 and reopen https://jira.appcelerator.org/browse/TIMOB-27935 to properly fix. |
Reopened https://jira.appcelerator.org/browse/TIMOB-27935 to look in this again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FR Passed: Tested with the following test case:
var tableData = [];
var win = Ti.UI.createWindow({ backgroundColor: 'white' });
var table = Ti.UI.createTableView({ objName: 'table' });
for (var i = 0; i <= 20; i++) {
var row = Ti.UI.createTableViewRow({ title: 'click me' });
var view = Ti.UI.createView({
layout: 'vertical',
height: Ti.UI.SIZE,
touchEnabled: false,
width: "50%",
left: 0
});
row.add(view)
tableData.push(row);
}
table.setData(tableData);
table.addEventListener('click', function (e) {
if (e.source && e.source.objName !== 'table') {
e.source.add(Ti.UI.createLabel({
text: 'REQUIRED',
left: '60%',
color: 'blue',
horizontalWrap: true,
width: "40%",
height: Ti.UI.SIZE
}));
}
});
win.add(table);
win.open();
Test Environment
MacOS Big Sur: 11.0 Beta 9
Xcode: 12.2 beta 2
Java Version: 1.8.0_242
Android NDK: 21.3.6528147
Node.js: 12.18.1
""NPM":"5.0.0","CLI":"8.1.1""
iphone 11 (ios 14)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get that the rollback off the other fix "fixes" this issue. But it also re-opens a different crash that affected a customer. We need to address that as well - we cannot merge this in and be done with it, because we're just trading one crash for another
Spoke about what this re-opens on Teams
OK, I was mistaken. The fix for TIMOB-27935 caused this bug and TIMOB-28001 to occur - not that the fix for TIMOB-27935 also fixed TIMOB-28001 |
https://jira.appcelerator.org/browse/TIMOB-28148