iOS controller pop 后 app 崩溃
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- ios, javascript, objective-c
- Domain
- mobile-dev
Research direction
Start with HMJSCExecutor.m around line 1315 and reproduce the reported sequence: a native UITabBarController managing multiple HMViewControllers loads JavaScript resources, then the tab-bar controller is popped. Check the crash around the logged HMJSContext destruction and verify that the component is destroyed normally without a crash.
Written by the indexing model from the issue text.
Description
描述
iOS controller pop 后 app 崩溃
Hummer version:
master branch
复现步骤
- 导出 tabbar 视图组件
2.组件中使用原生 UITabBarController
3.UITabBarController 管理多个 HMViewController
4.HMViewController 加载 js 资源
5.tabbar 所在控制器 pop 后 控制台输出 ‘HMJSContext 销毁’
6.执行到 HMJSCExecutor.m 1315行 后崩溃
预期结果
组件正常销毁
样例代码、屏幕截图或者仓库链接
js 使用:
let tabBar = new TabBar()
tabBar.items = [{},{}]
this.appendChild(tabBar)
tabbar 视图组件关键代码:
HMJSContext *context = [HMJSGlobal.globalObject currentContext:self.hmContext];
NSURL *url = [NSURL URLWithString:urlString];
if (url.scheme.length == 0) {
if (context) {
url = [[NSURL alloc] initWithString:urlString relativeToURL:context.url];
if (url.scheme.length == 0) {
return;
}
} else {
return;
}
}
HMViewController *controller = [[HMViewController alloc] initWithURL:url.absoluteString params:@{}];
[self setTabBarItemImage:controller.tabBarItem imageSrc:imageSrc isSelectedImage:NO];
[self setTabBarItemImage:controller.tabBarItem imageSrc:selectedImageSrc isSelectedImage:YES];
崩溃的代码位置

- Dominant language
- Objective-C
- Stars
- 1.4k
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from didi/Hummer
-
支持svg图吗?Openenhancement Needs: Triage 🔍
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
T i t li leOpenbug Needs: Triage 🔍
Difficulty 5/5 Over a week Newbie friendliness 1/100
-
升级yoga3(yoga2)后,scroller 在不设置size 时,两端大小表现不一致May be free again @yFeii claimed this 860 days ago, and no pull request is open. Openbug Needs: Triage 🔍
-
bug Needs: Triage 🔍
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
bug Needs: Triage 🔍
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Similar issues
-
A heading containing `$` or `\` is mangled in the table of contentsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
schuyler/macdown3000#693 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
yetanotherbrowser/yab#1062 ·
Maintainers usually reply within 1 day
-
Peek: the card's top-bar buttons can miss a press while the card is pinchedPossibly taken @mjkang-estrella claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ardia-browser/ardia#3087 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
darlinghq/darling#2335 · 1 comment ·
Maintainers usually reply within 1 day
-
Cocoa
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
getsentry/sentry-cocoa#9693 · 1 comment ·
Maintainers usually reply within 1 day