JonasGessner / JonasGessner/JGProgressHUD

[UIView initWithFrame:] must be used from main thread only

Open
#156 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
3.4k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

Hi there, I have encounter a thread issue when using indicatorView of JGProgressHUD:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.'

And a thread warning
-[UIView initWithFrame:] must be used from main thread only
appears on this line:

self = [super initWithFrame:CGRectZero];

Contributor guide

No contributing guide indexed for this repository

Research direction

Start from the Objective-C initializer containing `self = [super initWithFrame:CGRectZero];` and reproduce the indicatorView use that triggers the main-thread warning and layout-engine exception. Trace whether the indicator view is created or modified from a background thread; done means the reported warning and crash no longer occur during that use.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.