Post

Replies

Boosts

Views

Activity

Could please better understand what is problems with AddressSanitizer: allocator is out of memory?
I did not change nothing in my code, but after iOS 14 and Xcode 12 I started to get the crashes. Previous build was on Xcode 11 and I didn't see the crashes, I tried to create same test cases for deferent iOS and Xcode, and I don’t see the crashes in previous build. I started to get the crashes, only for iOS 14 operating systems and after using Xcode 12.  My function, where I think I have the crash, but I don't understand where exactly, because I didn't change nothing. Maybe something changed in Core Data? (NSMutableArray *)getObjectsforEntity:(NSString *)strEntity sortBy:(NSString *)strSort isAscending:(BOOL)ascending predicate:(NSPredicate *)predicate {     NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:strEntity];     if (strSort) {         NSSortDescriptor *sort = [[NSSortDescriptor alloc] initWithKey:strSort ascending:ascending];         [fetchRequest setSortDescriptors:[NSArray arrayWithObject:sort]];     }     if (predicate) {         [fetchRequest setPredicate:predicate];     }     NSError *error;     NSMutableArray *result = [[[[self managedObjectContext] executeFetchRequest:fetchRequest error:&error] mutableCopy ]autorelease];     if (result == nil) {         return [[NSMutableArray alloc] init];     }     return result; } I tried to caught it and this is what I found: ==13048==ERROR: AddressSanitizer: allocator is out of memory trying to allocate 0x1a0 bytes ==13048==FATAL: AddressSanitizer: internal allocator is out of memory trying to allocate 0x50 bytes AddressSanitizer report breakpoint hit. Use 'thread info -s' to get extended information about the report. (lldb)  thread info -s thread #1: tid = 0x12fa63, 0x00000001041961f8 libclangrt.asaniosdynamic.dylib`asan::AsanDie(), queue = 'SQLQueue 0x16572e2c0 for MyApp.sqlite', stop reason = AddressSanitizer detected: out-of-memory {   "accesssize": 0,   "accesstype": 0,   "address": 0,   "description": "out-of-memory",   "instrumentationclass": "AddressSanitizer",   "pc": 0,   "stoptype": "fatalerror" } This is what I see in log: self RMNDatabaseManager * 0x164416210 0x0000000164416210 NSObject NSObject isa _unsafeunretained Class RMNDatabaseManager 0x000021a1019b6131 predicate NSPredicate * 0x2d7143b90 0x00000002d7143b90 NSObject NSObject predicateFlags struct predicateFlags evaluationBlocked unsigned int 0 reservedPredicateFlags unsigned int 0 reserved uint32t 0 fetchRequest NSFetchRequest * 0x2ce26f2d0 0x00000002ce26f2d0 NSPersistentStoreRequest NSPersistentStoreRequest NSObject NSObject isa unsafeunretained Class 0x61a1fb9ef989 0x000061a1fb9ef989 error NSError * domain: nil - code: 1287 0x0000000102957960 NSObject NSObject isa _unsafeunretained Class 0x102957880 0x0000000102957880 reserved void * 0x10295792c 0x000000010295792c code NSInteger 1287 domain NSString * 0x303 0x0000000000000303 NSObject NSObject isa unsafeunretained Class 0x0 userInfo NSDictionary * 0x20ff 0x00000000000020ff NSObject NSObject isa unsafeunretained Class 0x0 result NSMutableArray * 0x2d5131420 0x00000002d5131420 NSArray NSArray NSObject NSObject isa _unsafeunretained Class 0x154000452 0x0000000154000452 Crashlog  details:  [[Crashed: 0 CoreData 0x000000019d9fb6b8 PFObjectIDFastHash64 + 36 (NSBasicObjectID.m:707) 1 CoreData 0x000000019d9fb6b4 PFObjectIDFastHash64 + 32 (NSBasicObjectID.m:706) 2 CoreFoundation 0x0000000197c1c10c CFBasicHashRehash + 996 (CFBasicHash.c:477) 3 CoreFoundation 0x0000000197c1fdf4 CFBasicHashRemoveValue + 2352 (CFBasicHash.c:1386) 4 CoreFoundation 0x0000000197b3e2f8 CFDictionaryRemoveValue + 224 (CFDictionary.c:471) 5 CoreData 0x000000019d94b8e8 -[NSManagedObjectContext(NSInternalAdditions) forgetObject:propagateToObjectStore:removeFromRegistry:] + 120 (NSManagedObjectContext.m:5088) 6 CoreData 0x000000019d92b450 -[PFManagedObjectReferenceQueue processReferenceQueue:] + 864 (NSManagedObjectContext.m:5077) 7 CoreData 0x000000019da43578 90-[NSManagedObjectContext(NSInternalNotificationHandling) registerAsyncReferenceCallback]blockinvoke + 68 (NSManagedObjectContext.m:8825) 8 CoreData 0x000000019da39b18 developerSubmittedBlockToNSManagedObjectContextPerform + 156 (NSManagedObjectContext.m:3880) 9 libdispatch.dylib 0x000000019782b280 dispatchclientcallout + 16 (object.m:559) 10 libdispatch.dylib 0x00000001977d3fa8 dispatchlaneserialdrain$VARIANT$mp + 612 (inlineinternal.h:2548) 11 libdispatch.dylib 0x00000001977d4a84 dispatchlaneinvoke$VARIANT$mp + 424 (queue.c:3862) 12 libdispatch.dylib 0x00000001977de518 dispatchworkloopworkerthread + 712 (queue.c:6590) 13 libsystempthread.dylib 0x00000001dc7005a4 pthreadwqthread + 272 (pthread.c:2193) 14 libsystempthread.dylib 0x00000001dc703874 startwqthread + 8]]
1
0
2.2k
Aug ’21
Cannot see Console.log in Crash Feedback
Hello, I got crash and I can see it in Crash Feedback, when I download zip file, I can see only feedback.json. Feedback.json file doesn't provide me information about the crash. Where is my Console.log or crash report and why it happened? And how I can fix it? I did not have this problem before, and I have some issues where I am able to get the Console.log and/or Crash report. Thank you for your help.
0
0
460
Mar ’21
BLE: Can not connect to device with service UUID and characteristic UUID?
I am a new in Bluetooth connection and I want to add second device in my iOS project. I already have one device, and the new device is very similar with first one, but little bit deferent. I have one process for the two devices, and I did not change a lot of code, just created all value for the new device. My all devices have different name and identifier, first device is working fine. For creating UUID values, I used UUID generator. let deviceTwoServiceUUID = “59DE3994-6A63-4654-8FF0-F85C5163B2F5” let deviceTwoFirstCharacteristicUUID = “59DE3994-6A63-4654-8FF0-F85C5163B2F6” let deviceTwoSecondCharacteristicUUID = “59DE3994-6A63-4654-8FF0-F85C5163B2F7” let deviceOneServiceUUID = “A6AF4483-E210-457B-B9D6-B8A621513D1D” let deviceOneFirstCharacteristicUUID = “A6AF4483-E210-457B-B9D6-B8A621513D2D” let deviceOneSecondCharacteristicUUID = “A6AF4483-E210-457B-B9D6-B8A621513D2D” } class BleManager: NSObject, CBCentralManagerDelegate, CBPeripheralDelegate { @objc private(set) static var sharedInstance = BleManager() var cbManager : CBCentralManager? = nil var currentPeripheral : CBPeripheral? = nil var secondService : CBService? = nil var firstService : CBService? = nil var secondFirstCharacteristic : CBCharacteristic! var secondSecondCharacteristic : CBCharacteristic! var firstFirstCharacteristic : CBCharacteristic! var firstSecondCharacteristic : CBCharacteristic! func initCentralManager() { 		if cbManager == nil { 				cbManager = CBCentralManager(delegate: self, queue: nil, options: [CBCentralManagerOptionRestoreIdentifierKey : “MyApp”, CBCentralManagerOptionShowPowerAlertKey: true])						 		} func deinitCentralManager() { 		cbManager = nil } func isBluetoothAvailable() -> Bool { 		return cbManager?.state == CBManagerState.poweredOn } func scan() { 		if (cbManager != nil && (cbManager?.isScanning)!) { 				return 		} 		 		discoveredPeripherals.removeAll() 		 		let serviceUUIDs = [CBUUID(string: BleConstants.deviceTwoServiceUUID), CBUUID(string: BleConstants.deviceOneServiceUUID)] 		 		cbManager?.scanForPeripherals(withServices: serviceUUIDs, 																	options: [CBCentralManagerScanOptionAllowDuplicatesKey : 1]) } func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) { 		if(!discoveredPeripherals.contains(peripheral)) { 				discoveredPeripherals.append(peripheral) 		} } func stopScan() { 		if cbManager != nil && (cbManager?.isScanning)! { 				cbManager?.stopScan() 		} } func connect(peripheral: CBPeripheral) { 		if cbManager?.state == CBManagerState.poweredOn { 				if currentPeripheral == nil || currentPeripheral?.state != CBPeripheralState.connected { 						cbManager?.connect(peripheral, options: nil) 				} else { 						cbManager?.cancelPeripheralConnection(peripheral) 				} 		} } func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) { Device.savePeripheralString(peripheral: peripheral.identifier.uuidString) 		AutoConnect.stop() DeviceUpdate.updateProgress = .None Device.isDongleConnected = true currentPeripheral = peripheral currentPeripheral?.delegate = self currentPeripheral?.discoverServices(nil) disableSleep() } func disableSleep() { 		UIApplication.shared.isIdleTimerDisabled = true } func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) { if error != nil { 				return 		} 		if let services = peripheral.services { 				for service in services { 						if service.uuid.uuidString == BleConstants.deviceTwoServiceUUID { 				Device.dongleType = port.second 										secondService = service 								peripheral.discoverCharacteristics(nil, for: service) 				} 						if service.uuid.uuidString == BleConstants.deviceOneServiceUUID { 				Device.dongleType = port.first 								firstService = service 								peripheral.discoverCharacteristics(nil, for: service) 						} else { 								Log.bt("didDiscoverServices for peripheral not found \(peripheral.identifier.uuidString)") 						} 				} 		} } func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) { 		for characteristic in service.characteristics! { 				if characteristic.uuid.uuidString == BleConstants.deviceOneFirstCharacteristicUUID { 		 firstCharacteristic = characteristic 				}	 		else if characteristic.uuid.uuidString == BleConstants.deviceOneSecondCharacteristicUUID { 					 firstSecondCharacteristic = characteristic 				else if characteristic.uuid.uuidString == BleConstants.deviceTwoFirstCharacteristicUUID { 						secondFirstCharacteristic = characteristic 				} else if characteristic.uuid.uuidString == BleConstants.deviceTwoSecondCharacteristicUUID { 		secondSecondCharacteristic = characteristic 				} else { 						Log.bt("didDiscoverCharacteristics not found \(characteristic.uuid.uuidString)") 				} 		} 		 		if Device.dongleType == .deviceTwo { 				 openPortDeviceTwo() 		} else { 				openPortDeviceOne() 		} } Do you have idea, Did I create UUIDs correct? P.S: Android app works fine with both devices. Thanks a lot!
1
0
1.8k
Jan ’21
0x7603700000000 is not in any region. Bytes after previous region: 2076102902153217 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL MALLOC_NANO 0000000280000000-00000002a0000000 [51
Please help to understand the crash better. I am keep getting this intermittently, some users getting it quite often. Details here: Exception Type:	EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0007603700000000 VM Region Info: 0x7603700000000 is not in any region.	Bytes after previous region: 2076102902153217	 			REGION TYPE											START - END						 [ VSIZE] PRT/MAX SHRMOD	REGION DETAIL 			MALLOC_NANO						0000000280000000-00000002a0000000 [512.0M] rw-/rwx SM=PRV	-->	 			UNUSED SPACE AT END Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [54899] Triggered by Thread:	0 Thread 0 name: Thread 0 Crashed: 0	 CoreFoundation								 0x000000018d52cfbc CFDictionaryGetValue + 80 (CFInternal.h:845) 1	 Foundation										 0x000000018d99e114 _NSSetLongLongValueAndNotify + 88 (NSKeyValueObserverNotifying.m:64) 2	 Foundation										 0x000000018d99e114 _NSSetLongLongValueAndNotify + 88 (NSKeyValueObserverNotifying.m:64) 3	 CFNetwork										 0x00000001909e0e00 __51-[NSURLSession delegate_task:didCompleteWithError:]_block_invoke.194 + 60 (Session.mm:676) 4	 Foundation										 0x000000018d9ba3f0 NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK + 16 (NSOperation.m:1541) 5	 Foundation										 0x000000018d8c5710 -[NSBlockOperation main] + 84 (NSOperation.m:1560) 6	 Foundation										 0x000000018d9bc64c NSOPERATION_IS_INVOKING_MAIN + 20 (NSOperation.m:2184) 7	 Foundation										 0x000000018d8c5414 -[NSOperation start] + 740 (NSOperation.m:2201) 8	 Foundation										 0x000000018d9bd044 NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION + 20 (NSOperation.m:2215) 9	 Foundation										 0x000000018d9bcb10 __NSOQSchedule_f + 180 (NSOperation.m:2226) 10	libdispatch.dylib						 0x000000018d28edd0 _dispatch_block_async_invoke2 + 104 (queue.c:525) 11	libdispatch.dylib						 0x000000018d2ab524 _dispatch_client_callout + 16 (object.m:495) 12	libdispatch.dylib						 0x000000018d28e6fc _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 860 (inline_internal.h:2484) 13	CoreFoundation								 0x000000018d5636bc CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12 (CFRunLoop.c:1749) 14	CoreFoundation								 0x000000018d55e590 __CFRunLoopRun + 1724 (CFRunLoop.c:3069) 15	CoreFoundation								 0x000000018d55dba8 CFRunLoopRunSpecific + 424 (CFRunLoop.c:3192) 16	GraphicsServices							 0x00000001976d4344 GSEventRunModal + 160 (GSEvent.c:2246) 17	UIKitCore										 0x00000001916993e4 UIApplicationMain + 1932 (UIApplication.m:4823) 18	DriverConnect								 0x00000001045effe4 0x104448000 + 1736676 19	libdyld.dylib								 0x000000018d3e58f0 start + 4 crashlog - https://developer.apple.com/forums/content/attachment/53ba7957-0168-4bc2-92c3-c389ff618433
2
0
4.9k
Nov ’20
Crash in CoreData EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000b574a9c40310 _PFObjectIDFastHash64 keyboard_arrow_down
I got crash, please see details below. It happens all the time with different customers. Crash is in CoreData but look like comming from Firebase, I already updated the SDK to 7.1.0 and how Firebase said, they fixed issues. Maybe be this is Core Data, please help to better understand it. Thank a lot! Exception Type:	EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x000021a1f54db091 VM Region Info: 0x21a1f54db091 is not in any region.	Bytes after previous region: 36498452623506	 			REGION TYPE								 START - END			[ VSIZE] PRT/MAX SHRMOD	REGION DETAIL 			commpage (reserved)		 1000000000-7000000000 [384.0G] ---/--- SM=NUL	...(unallocated) --->	 			UNUSED SPACE AT END Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [26270] Triggered by Thread:	0 Thread 0 name: Thread 0 Crashed: 0	 libobjc.A.dylib							 0x00000001b254cfe8 object_getClass + 12 (objc-object.h:237) 1	 CoreData											 0x00000001a49e1a98 _PFObjectIDFastHash64 + 28 (NSBasicObjectID.m:706) 2	 CoreFoundation								 0x000000019ebc7aa8 __CFBasicHashRehash + 996 (CFBasicHash.c:477) 3	 CoreFoundation								 0x000000019ebcb790 CFBasicHashRemoveValue + 2352 (CFBasicHash.c:1386) 4	 CoreFoundation								 0x000000019eae95f0 CFDictionaryRemoveValue + 224 (CFDictionary.c:471) 5	 CoreData											 0x00000001a49313c4 -[NSManagedObjectContext(_NSInternalAdditions) _forgetObject:propagateToObjectStore:removeFromRegistry:] + 120 (NSManagedObjectContext.m:5088) 6	 CoreData											 0x00000001a4910f2c -[_PFManagedObjectReferenceQueue _processReferenceQueue:] + 864 (NSManagedObjectContext.m:5077) 7	 CoreData											 0x00000001a49d9cfc -[_PFAutoreleasePoolThunk dealloc] + 40 (_PFRoutines.m:4693) 8	 libobjc.A.dylib							 0x00000001b256d574 AutoreleasePoolPage::releaseUntil(objc_object**) + 200 (NSObject.mm:944) 9	 libobjc.A.dylib							 0x00000001b256d450 objc_autoreleasePoolPop + 208 (NSObject.mm:1211) 10	CoreFoundation								 0x000000019eba93b8 _CFAutoreleasePoolPop + 28 (NSObject.m:798) 11	CoreFoundation								 0x000000019eb1e3d0 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 28 (CFRunLoop.c:1807) 12	CoreFoundation								 0x000000019eb1dfd4 __CFRunLoopDoTimer + 1004 (CFRunLoop.c:2415) 13	CoreFoundation								 0x000000019eb1d4b4 __CFRunLoopDoTimers + 324 (CFRunLoop.c:2575) 14	CoreFoundation								 0x000000019eb17840 __CFRunLoopRun + 1912 (CFRunLoop.c:3090) 15	CoreFoundation								 0x000000019eb16b90 CFRunLoopRunSpecific + 572 (CFRunLoop.c:3242) 16	GraphicsServices							 0x00000001b4e39598 GSEventRunModal + 160 (GSEvent.c:2259) 17	UIKitCore										 0x00000001a1400638 -[UIApplication _run] + 1052 (UIApplication.m:3266) 18	UIKitCore										 0x00000001a1405bb8 UIApplicationMain + 164 (UIApplication.m:4738) 19	MyApp								 0x0000000102c549b8 main + 88 (AppDelegate.swift:14) 20	libdyld.dylib								 0x000000019e7f5588 start + 4
0
0
1.2k
Nov ’20