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

startTracker crashes asking for main thread #1

Closed
drturing opened this issue Jan 17, 2013 · 3 comments
Closed

startTracker crashes asking for main thread #1

drturing opened this issue Jan 17, 2013 · 3 comments

Comments

@drturing
Copy link

This code invokes the following crash
[tracker startTrackerWithPiwikURL:PIWIK_URL
siteID:SITE_ID_TEST
authenticationToken:nil
withError:&error];

Console error is

Tried to obtain the web lock from a thread other than the main thread or the web thread.
This may be a result of calling to UIKit from a secondary thread. Crashing now...
1 WebThreadLock
2 -[UIWebView _webViewCommonInit:]
3 -[UIWebView initWithFrame:]
4 -[UIView init]
5 -[PTUserAgentReader userAgentStringWithCallbackBlock:]
6 -[PiwikTracker userAgent]
7 __44-[PiwikTracker dispatchWithCompletionBlock:]_block_invoke_0
8 _dispatch_call_block_and_release
9 _dispatch_queue_drain
10 _dispatch_queue_invoke
11 _dispatch_worker_thread2
12 _dispatch_worker_thread3
13 _pthread_wqthread
14 start_wqthread

@mattiaslevin
Copy link
Contributor

Your are right, thanks. I will fix it shortly.

I will also refactor the code to use ARC and and probably AFNetworking for the network request.

/Mattias

@mattiaslevin
Copy link
Contributor

Fixed in tag v1.0.1
/Mattias

@drturing
Copy link
Author

super. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants