Giter Club home page Giter Club logo

bsgmetrics's People

Contributors

dependabot[bot] avatar dirtyhenry avatar

Stargazers

 avatar

Watchers

 avatar  avatar

bsgmetrics's Issues

Fix UI API called on a background thread

After running the code with Xcode 10.1, we get the following diagnosed error in the console:

=================================================================
Main Thread Checker: UI API called on a background thread: -[UITableView setDataSource:]
PID: 61006, TID: 1822709, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   BSGMetrics                          0x0000000104e6db7d -[BSGViewController reload] + 509
5   CoreFoundation                      0x0000000106a74bac __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
6   CoreFoundation                      0x0000000106a7402f _CFXRegistrationPost + 447
7   CoreFoundation                      0x0000000106a73d71 ___CFXNotificationPost_block_invoke + 225
8   CoreFoundation                      0x0000000106b5aae2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1826
9   CoreFoundation                      0x0000000106a73694 _CFXNotificationPost + 964
10  Foundation                          0x0000000105b38589 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
11  BSGMetrics                          0x0000000104e6d0de __45-[BSGAppDelegate applicationDidBecomeActive:]_block_invoke + 142
12  BSGMetrics                          0x0000000105207e6f __31-[BSGMetricsSendOperation main]_block_invoke + 63
13  BSGMetrics                          0x0000000105208d27 -[BSGMetricsService postEventsWithCompletion:] + 839
14  BSGMetrics                          0x0000000105207e05 -[BSGMetricsSendOperation main] + 197
15  Foundation                          0x0000000105b6c732 __NSThread__start__ + 1221
16  libsystem_pthread.dylib             0x000000010883d33d _pthread_body + 126
17  libsystem_pthread.dylib             0x00000001088402a7 _pthread_start + 70
18  libsystem_pthread.dylib             0x000000010883c425 thread_start + 13
=================================================================
Main Thread Checker: UI API called on a background thread: -[UITableView reloadData]
PID: 61006, TID: 1822709, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 0
Backtrace:
4   BSGMetrics                          0x0000000104e6dbc3 -[BSGViewController reload] + 579
5   CoreFoundation                      0x0000000106a74bac __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
6   CoreFoundation                      0x0000000106a7402f _CFXRegistrationPost + 447
7   CoreFoundation                      0x0000000106a73d71 ___CFXNotificationPost_block_invoke + 225
8   CoreFoundation                      0x0000000106b5aae2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1826
9   CoreFoundation                      0x0000000106a73694 _CFXNotificationPost + 964
10  Foundation                          0x0000000105b38589 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
11  BSGMetrics                          0x0000000104e6d0de __45-[BSGAppDelegate applicationDidBecomeActive:]_block_invoke + 142
12  BSGMetrics                          0x0000000105207e6f __31-[BSGMetricsSendOperation main]_block_invoke + 63
13  BSGMetrics                          0x0000000105208d27 -[BSGMetricsService postEventsWithCompletion:] + 839
14  BSGMetrics                          0x0000000105207e05 -[BSGMetricsSendOperation main] + 197
15  Foundation                          0x0000000105b6c732 __NSThread__start__ + 1221
16  libsystem_pthread.dylib             0x000000010883d33d _pthread_body + 126
17  libsystem_pthread.dylib             0x00000001088402a7 _pthread_start + 70
18  libsystem_pthread.dylib             0x000000010883c425 thread_start + 13

Fix "Cannot save deleted instance" crashes

Even since version 0.1.3, we still get exceptions...

14 FCModel                        0x1002be72c -[FCModel save] (FCModel.m:802)
15 BSGMetrics                     0x1002386f0 __45-[BSGMetricsService updateEvents:withStatus:]_block_invoke (BSGMetricsService.m:98)
16 CoreFoundation                 0x181f7d1a4 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 132
17 CoreFoundation                 0x181f7d010 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 168
18 BSGMetrics                     0x1002386a0 -[BSGMetricsService updateEvents:withStatus:] (BSGMetricsService.m:100)
19 BSGMetrics                     0x100238998 -[BSGMetricsService manageSuccessForEvents:response:statusCode:] (BSGMetricsService.m:148)
20 BSGMetrics                     0x1002384b0 __52-[BSGMetricsService postEventsWithLimit:completion:]_block_invoke.112 (BSGMetricsService.m:80)
21 AFNetworking                   0x100166300 __116-[AFHTTPSessionManager dataTaskWithHTTPMethod:URLString:parameters:uploadProgress:downloadProgress:success:failure:]_block_invoke.80 (AFHTTPSessionManager.m:290)
22 AFNetworking                   0x100179598 __72-[AFURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke_2.150 (AFURLSessionManager.m:308)

Embed local HTTPS server

Steps:

  1. Create a dummy dummy.bootstragram.com certificate
  2. Generate a letsencrypt certificate and store it on the repo
  3. Add a /etc/hosts rule to resolve localhost as dummy.bootstragram.com
  4. Cross your fingers.

Add UUID to events.

To identify duplicated activities, we should create a UUID for each message.

Crash when receiving FCAttemptToSaveAfterDelete

Statium iOS 0.2.1 got several crashes due to FCAttemptToSaveAfterDelete exceptions.

Investigation identified 2 scenarios when this could happen:

  1. When a start message is sent twice in a row => this shouldn't happen
  2. When starting/stopping messages, the reference of the callback can mess up the call of
    + cancelPreviousPerformRequestsWithTarget:selector:object:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.