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

Crash inside iOSAgent file #4

Open
Pranit-Harekar opened this issue Jun 3, 2019 · 2 comments
Open

Crash inside iOSAgent file #4

Pranit-Harekar opened this issue Jun 3, 2019 · 2 comments

Comments

@Pranit-Harekar
Copy link

Pranit-Harekar commented Jun 3, 2019

Description: SwiftDog crashes when sending agent metrics. i.e. when its initialized like this Datadog.initialize_api(agent: true, default_tags: true). For now I am skipping agent: true, but it will be great if we can send agent metrics, it's really helpful.

Environment Info:

  • Xcode 10.2
  • Swift 4.2
  • SwiftDog version 0.0.2

Backtrace:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x000000010512e595 SwiftDog`DataUsageInfo.updateInfoByAdding(info=SwiftDog.DataUsageInfo @ 0x00007ffeeca33530, self=SwiftDog.DataUsageInfo @ 0x00007ffeeca33690) at IOSAgent.swift:18:22
    frame #1: 0x0000000105130e2f SwiftDog`static IOSAgent.getDataUsage(self=SwiftDog.IOSAgent) at IOSAgent.swift:71:27
    frame #2: 0x000000010512f342 SwiftDog`static IOSAgent.send_agent_metrics(self=SwiftDog.IOSAgent) at IOSAgent.swift:44:40
    frame #3: 0x00000001051267a2 SwiftDog`static Datadog.sendData(self=0x0000000105147e70) at Datadog.swift:18:22
    frame #4: 0x0000000105127018 SwiftDog`@objc static Datadog.sendData() at <compiler-generated>:0
    frame #5: 0x00000001087f3135 Foundation`__NSFireTimer + 83
    frame #6: 0x00000001096c53e4 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
    frame #7: 0x00000001096c4ff2 CoreFoundation`__CFRunLoopDoTimer + 1026
    frame #8: 0x00000001096c485a CoreFoundation`__CFRunLoopDoTimers + 266
    frame #9: 0x00000001096beefc CoreFoundation`__CFRunLoopRun + 2220
    frame #10: 0x00000001096be302 CoreFoundation`CFRunLoopRunSpecific + 626
    frame #11: 0x000000010ef802fe GraphicsServices`GSEventRunModal + 65
    frame #12: 0x0000000111995ba2 UIKitCore`UIApplicationMain + 140
    frame #13: 0x00000001032300cb SpringboardRetail`main at AppDelegate.swift:15:7
    frame #14: 0x000000010ae04541 libdyld.dylib`start + 1

image

Let me know if I can provide more details in order to help you debug this issue. Thanks!

@jaronoff97
Copy link
Owner

Thanks for raising this issue! Going to take a look! Right now though, I wouldn't advise using the agent in production, I found it more useful as a debugging tool in QA.

@Antalinka
Copy link

the same issue
Screen Shot 2019-08-27 at 4 09 36 PM

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

3 participants