Azure-Samples / azure-iot-samples-ios

azure-iot-samples-ios provides a set of easy-to-understand, continuously-tested samples for using Azure IoT Hub via Azure/azure-iot-sdk-c.
MIT License
13 stars 8 forks source link

EXC_BAD_ACCESS error when running sample with MQTT_Protocol and AMQP_Protocol #5

Closed LeePepe closed 5 years ago

LeePepe commented 6 years ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Running the sample of device with both MQTT and AMQP will crash with EXC_BAD_ACCESS at same function dowork_send(TLS_IO_INSTANCE* tls_io_instance)

Minimal steps to reproduce

Just run the sample of device.

Any log messages given by the failure

No log. Both are EXC_BAD_ACCESS.

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

macOS High Sierra 10.13.6 (17G65)

Mention any other details that might be useful

1 0x00000001033b912d in dowork_send at /Users/ltp1994/Development/azure-iot-samples-ios/quickstart/sample-device/Pods/AzureIoTUtility/pal/ios-osx/tlsio_appleios.c:474

2 0x00000001033b8b4e in tlsio_appleios_send_async at /Users/ltp1994/Development/azure-iot-samples-ios/quickstart/sample-device/Pods/AzureIoTUtility/pal/ios-osx/tlsio_appleios.c:700

3 0x00000001033c3960 in xio_send at /Users/ltp1994/Development/azure-iot-samples-ios/quickstart/sample-device/Pods/AzureIoTUtility/src/xio.c:151

4 0x0000000103471e4e in sendPacketItem at /Users/ltp1994/Development/azure-iot-samples-ios/quickstart/sample-device/Pods/AzureIoTuMqtt/src/mqtt_client.c:339

5 0x0000000103471cc9 in mqtt_client_publish at /Users/ltp1994/Development/azure-iot-samples-ios/quickstart/sample-device/Pods/AzureIoTuMqtt/src/mqtt_client.c:1037

6 0x0000000103312625 in publish_mqtt_telemetry_msg at /Users/ltp1994/Development/azure-iot-samples-ios/quickstart/sample-device/Pods/AzureIoTHubClient/iothub_client/src/iothubtransport_mqtt_common.c:837

7 0x0000000103311866 in IoTHubTransport_MQTT_Common_DoWork at /Users/ltp1994/Development/azure-iot-samples-ios/quickstart/sample-device/Pods/AzureIoTHubClient/iothub_client/src/iothubtransport_mqtt_common.c:2704

8 0x000000010332013d in IoTHubTransportMqtt_DoWork at /Users/ltp1994/Development/azure-iot-samples-ios/quickstart/sample-device/Pods/AzureIoTHubClient/iothub_client/src/iothubtransportmqtt.c:115

9 0x00000001032e8d3e in IoTHubClient_LL_DoWork at /Users/ltp1994/Development/azure-iot-samples-ios/quickstart/sample-device/Pods/AzureIoTHubClient/iothub_client/src/iothub_client_ll.c:1338

10 0x0000000102fc1309 in ViewController.dowork() at /Users/ltp1994/Development/azure-iot-samples-ios/quickstart/sample-device/MQTT Client Sample/ViewController.swift:122

11 0x0000000102fc1334 in @objc ViewController.dowork() ()

12 0x00000001035154dd in __NSFireTimer ()

13 0x00000001043a5e64 in CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION ()

14 0x00000001043a5a52 in __CFRunLoopDoTimer ()

15 0x00000001043a560a in __CFRunLoopDoTimers ()

16 0x000000010439ce4c in __CFRunLoopRun ()

17 0x000000010439c30b in CFRunLoopRunSpecific ()

18 0x000000010a087a73 in GSEventRunModal ()

19 0x00000001048930b7 in UIApplicationMain ()

20 0x0000000102fc92c7 in main at /Users/ltp1994/Development/azure-iot-samples-ios/quickstart/sample-device/MQTT Client Sample/AppDelegate.swift:7

There are stack of function


Thanks! We'll be in touch soon.

LeePepe commented 6 years ago

Simulator iPhone 8 Plus (11.3) Xcode Version 9.2 (9C40b)

yzhong94 commented 5 years ago

Hi @LeePepe sorry about the delay on this! Do you still see this issue? Let me investigate and get back to you.

yzhong94 commented 5 years ago

Hi @LeePepe we tested the latest Cocoapod package with XCode 10.1 and it was working. Let us know if you still have trouble building.

yzhong94 commented 5 years ago

Closing due to no response. Please reopen if you still see this issue!