Search results for

“LLDB crash”

30,531 results found

Post

Replies

Boosts

Views

Activity

popen() crash
I have a multithreaded application that uses popen() for system calls. Here is the snippet. I crashes in popen() (line 2 below). 1 fp = NULL; 2 if ((fp = popen(dnsCommand, r)) == NULL) { 3 logPrint(errno, *executeDNS: popen failed. Exiting...); 4 exitProcess(__func__, __LINE__); } I caught this under xcode debug and under cli lldb. To replicate it I have to let it run for several hours, and this functions is called repeatedly during that time. I can't really tell the exact conditions that cause the crash. The error messages is Thread 43: EXC_BAD_ACCESS (code=1, address=0x3010000080e) In this case dnsCommand is dnsCommand char [200] /Applications/NetBeez/bin/dig +noall +search +stats +comments xfinity.com 2>/dev/null Here is the backtrace (lldb) bt * thread #43, stop reason = EXC_BAD_ACCESS (code=1, address=0x3010000080e) * frame #0: 0x00007ff803997d22 libsystem_c.dylib`popen + 478 frame #1: 0x000000010004b53e nbagentgdb`executeDNS(param=0x0000000128900000) at executeDNS.
11
0
1.9k
Mar ’23
Reply to Xcode breaks with SIGCONT before OpenURL handler is called
Well, if I set process handle -s false SIGCONT At application load, then the test continues without entering the debugger. That doesn't help by itself because it still requires manual intervention at multiple points during the test suite. I haven't found any good documentation on custom LLDB settings, especially settings that take effect after the process is running. I've verified that .lldbinit is read on start of the testing and again when the process enters the SIGCONT break point. The problem is that the process handle . . . command is target-specific, and can't be run without a target. Even when breaking for SIGCONT I get an error about an invalid target for that command. Is there any documentation on how to override LLDB behavior from a configuration file, including commands which only take effect in a specific process? For example when LLDB attaches to a target do X. A way to change global LLDB behavior would also be good if one exists.
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’21
Reply to UITextField asserts in console on keyboard long press
@frameworksengineer I'm also running into this in iOS 15 in a UIKit app. When it happens the textField isn't visible anymore, although I still see it in the View Debugger. I think it happens when I enter some text and then tap outside the textField. I see the Assert warnings a number of times and also this one: WARNING: Calling updateFocusIfNeeded while a focus update is in progress. This call will be ignored. I did what you ask and the UITextField.interactions[UITextInteraction].textInput property is simply the UITextField. (lldb) po (UITextField*)0x7f9fd7c2d200 ; text = '1.99'; borderStyle = None; background = <_UITextFieldNoBackgroundProvider: 0x7f9fe29e0120: textfield=>; layer = > (lldb) po ((UITextField*)0x7f9fd7c2d200).interactions <__NSArrayI 0x7f9fccbb1600>( , , <_UITextMenuLinkInteraction: 0x7f9fc6880dd0>, , <_UIClickPresentationInteraction: 0x7f9fc68819e0>, , <_UIKeyboardBasedTextSelectionInteraction: 0x7f9fc4b71ef0>, , , , , , , ) (lldb)
Topic: UI Frameworks SubTopic: UIKit Tags:
Jan ’22
Reply to Can't add category method in SKPhysicsWorld
Duh, I assumed that PKPhysicsWorld was a typo, but I just tried adding the category and found out this is the class name. It turns out that Sprite Kit is playing shenanigans with classes:(lldb) po [self.physicsWorld className] PKPhysicsWorld (lldb) po self.physicsWorld.superclass NSObject (lldb) p [self.physicsWorld isKindOfClass: [SKPhysicsWorld class]] (char) $1 = 'x01'So it's not a SKPhysicsWorld class cluster, and PKPhysicsWorld is not a subclass of SKPhysicsWorld, but it does pose as a SKPhysicsWorld!If you must add the method, you might be able to do so by manipulating the Obj-C runtime metadata directly, but it doesn't seem like a good way, going forward.
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Feb ’18
Reply to XPC as plain IPC, no launchd involved
Incidentally — I am playing with the login item to test the hack, and I have found that there's some pretty convenient trickery, probably at lldb level:if my login item is launched properly (i.e., through SMLoginItemSetEnabled), it works as expected;if my login item is launched manually (e.g., by running its executable from Terminal), it does not work, the service is invalidated — fully as expected, of course;if my login item is run by Xcode (or manually in lldb) though, the XPC communication does work!That's a really nice surprise; I have expected to debug, I would have to launch the login item through SMLoginItemSetEnabled, and to connect lldb to its pid. Kudos to whomever designed/implemented this little trick!
Jun ’18
Single-Stepping in LLDB Doesn't Work on M1 Hardware
The instruction pointer jumps all over the place when single-stepping through iOS Objective-C code on M1 hardware (Big Sur 11.2, Xcode 12.4). I tested on an M1 MacBook Air and an M1 MacMini and get the same behavior (running my app on a simulator or iPad hardware). All compiler, linker, etc. optimizations (that I know about) are turned off. Anyone else having this problem? Anyone have a work-around?
0
0
1.3k
Feb ’21
Reply to XCode 13.3 stuck when input Chinese in lldb console
I already had a radar: FB9958917 Thanks for filing that. Some notes: We can definitely reproduce it in-house. It seems to be related to Xcode’s console pane, not LLDB itself. If running lldb from the command-line is an option for you, that’s a simple workaround. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Apr ’22
Attach lldb debugger to the compiled program's executable when the main executable is not the compiled program
I am building an MPI C project in Xcode. In order to do run it, I had to: Specify /path/to/mpiexec in Edit Scheme -> Run -> Info -> Executable, instead of the default one, say myprogram if my target is called myprogram. Specify the following arguments in Edit Scheme -> Run -> Arguments -> Arguments Passed On Launch: -np 4, ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_NAME} This is clearly analogous to a mpiexec -np 4 a.out command launched on terminal. The problem is, when I want to debug my application, the execution doesn't stop on the breakpoints. I instantly thought that it is because of the check box Debug Executable in Edit Scheme -> Run -> Info -> Executable. Indeed (as I have just said), the Executable specified in there is mpiexec and not myprogram. Thus, is there an option or some command I could set in Xcode to attach the lldb to myprogram?
2
0
626
Oct ’24
Reply to Can't change background task identifier
My understanding is that you’re doing this: Run app with identifier A. Test it from LLDB. It works. Change the app to use identifier B. Test it from LLDB. It fails. If you delete the app from the device between steps 3 and 4, does that help? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’24
Xcode debugger crashes on breakpoint
Hello,We are having a systematic crash of the lldb-rpc-server when debugging our project, so we are unable to use the debugger. The crash is as follow:https://gist.github.com/bvirlet/89ecb0388c659932f5b572fa0d79e4f5I have submitted a crash report to Apple (FB7671116) but in the meantime I would be interested in a possible workaround.The problem is present for several developers, on different machines.Thanks!Bruno
0
0
782
Apr ’20
Reply to IOS 14 App Crash If Keyboard Is Open And Happens Only In Release
It happens every time.. Now I catch this problem in debug. When this happens?: When keyboard is shows and then Loading popup show called which works with adding a view to ViewController's View.. Only happens in ios14 Issue Running 'AppName' popup show up and this message was inside: The app “AppName” on iPhone’u quit unexpectedly. Domain: IDEDebugSessionErrorDomain Code: 4 Failure Reason: Message from debugger: Terminated due to memory issue - System Information macOS Version 10.15.7 (Build 19H2) Xcode 12.0 (17219) And last log was: 2020-10-13 16:29:33.171937+0300 AppName[10638:3084588] [ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]blockinvoke
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’20
Reply to Under stress tests, our Network Extension crashed due to QOS?
Anything I should look for or do, other than telling lldb to attach to the correct pid, and wait for a crash? That’s the obvious place to start. If you want to write more code you could: Investigate core dumps. Install a SIGABRT signal handler than stops the process to allow you to attach. Disable SIP and start messing around with DTrace. We might get to that point, but they all see like overkill right now. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Feb ’24
popen() crash
I have a multithreaded application that uses popen() for system calls. Here is the snippet. I crashes in popen() (line 2 below). 1 fp = NULL; 2 if ((fp = popen(dnsCommand, r)) == NULL) { 3 logPrint(errno, *executeDNS: popen failed. Exiting...); 4 exitProcess(__func__, __LINE__); } I caught this under xcode debug and under cli lldb. To replicate it I have to let it run for several hours, and this functions is called repeatedly during that time. I can't really tell the exact conditions that cause the crash. The error messages is Thread 43: EXC_BAD_ACCESS (code=1, address=0x3010000080e) In this case dnsCommand is dnsCommand char [200] /Applications/NetBeez/bin/dig +noall +search +stats +comments xfinity.com 2>/dev/null Here is the backtrace (lldb) bt * thread #43, stop reason = EXC_BAD_ACCESS (code=1, address=0x3010000080e) * frame #0: 0x00007ff803997d22 libsystem_c.dylib`popen + 478 frame #1: 0x000000010004b53e nbagentgdb`executeDNS(param=0x0000000128900000) at executeDNS.
Replies
11
Boosts
0
Views
1.9k
Activity
Mar ’23
Reply to XCode15 debugger is working really slow with iOS 17.0.2
After spending several hours profiling lldb, I have identified the reason behind the high CPU usage and slow app launch and breakpoints. It turns out that a custom xcconfig file was disabling dSYM for the Debug build. However, once I restored the dSYM in the Derived Data Xcode, both lldb and our app started up quickly again.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’23
Reply to Xcode breaks with SIGCONT before OpenURL handler is called
Well, if I set process handle -s false SIGCONT At application load, then the test continues without entering the debugger. That doesn't help by itself because it still requires manual intervention at multiple points during the test suite. I haven't found any good documentation on custom LLDB settings, especially settings that take effect after the process is running. I've verified that .lldbinit is read on start of the testing and again when the process enters the SIGCONT break point. The problem is that the process handle . . . command is target-specific, and can't be run without a target. Even when breaking for SIGCONT I get an error about an invalid target for that command. Is there any documentation on how to override LLDB behavior from a configuration file, including commands which only take effect in a specific process? For example when LLDB attaches to a target do X. A way to change global LLDB behavior would also be good if one exists.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Mar ’21
Reply to UITextField asserts in console on keyboard long press
@frameworksengineer I'm also running into this in iOS 15 in a UIKit app. When it happens the textField isn't visible anymore, although I still see it in the View Debugger. I think it happens when I enter some text and then tap outside the textField. I see the Assert warnings a number of times and also this one: WARNING: Calling updateFocusIfNeeded while a focus update is in progress. This call will be ignored. I did what you ask and the UITextField.interactions[UITextInteraction].textInput property is simply the UITextField. (lldb) po (UITextField*)0x7f9fd7c2d200 ; text = '1.99'; borderStyle = None; background = <_UITextFieldNoBackgroundProvider: 0x7f9fe29e0120: textfield=>; layer = > (lldb) po ((UITextField*)0x7f9fd7c2d200).interactions <__NSArrayI 0x7f9fccbb1600>( , , <_UITextMenuLinkInteraction: 0x7f9fc6880dd0>, , <_UIClickPresentationInteraction: 0x7f9fc68819e0>, , <_UIKeyboardBasedTextSelectionInteraction: 0x7f9fc4b71ef0>, , , , , , , ) (lldb)
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Can't add category method in SKPhysicsWorld
Duh, I assumed that PKPhysicsWorld was a typo, but I just tried adding the category and found out this is the class name. It turns out that Sprite Kit is playing shenanigans with classes:(lldb) po [self.physicsWorld className] PKPhysicsWorld (lldb) po self.physicsWorld.superclass NSObject (lldb) p [self.physicsWorld isKindOfClass: [SKPhysicsWorld class]] (char) $1 = 'x01'So it's not a SKPhysicsWorld class cluster, and PKPhysicsWorld is not a subclass of SKPhysicsWorld, but it does pose as a SKPhysicsWorld!If you must add the method, you might be able to do so by manipulating the Obj-C runtime metadata directly, but it doesn't seem like a good way, going forward.
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Replies
Boosts
Views
Activity
Feb ’18
Reply to XPC as plain IPC, no launchd involved
Incidentally — I am playing with the login item to test the hack, and I have found that there's some pretty convenient trickery, probably at lldb level:if my login item is launched properly (i.e., through SMLoginItemSetEnabled), it works as expected;if my login item is launched manually (e.g., by running its executable from Terminal), it does not work, the service is invalidated — fully as expected, of course;if my login item is run by Xcode (or manually in lldb) though, the XPC communication does work!That's a really nice surprise; I have expected to debug, I would have to launch the login item through SMLoginItemSetEnabled, and to connect lldb to its pid. Kudos to whomever designed/implemented this little trick!
Replies
Boosts
Views
Activity
Jun ’18
Single-Stepping in LLDB Doesn't Work on M1 Hardware
The instruction pointer jumps all over the place when single-stepping through iOS Objective-C code on M1 hardware (Big Sur 11.2, Xcode 12.4). I tested on an M1 MacBook Air and an M1 MacMini and get the same behavior (running my app on a simulator or iPad hardware). All compiler, linker, etc. optimizations (that I know about) are turned off. Anyone else having this problem? Anyone have a work-around?
Replies
0
Boosts
0
Views
1.3k
Activity
Feb ’21
Reply to XCode 13.3 stuck when input Chinese in lldb console
I already had a radar: FB9958917 Thanks for filing that. Some notes: We can definitely reproduce it in-house. It seems to be related to Xcode’s console pane, not LLDB itself. If running lldb from the command-line is an option for you, that’s a simple workaround. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Replies
Boosts
Views
Activity
Apr ’22
Attach lldb debugger to the compiled program's executable when the main executable is not the compiled program
I am building an MPI C project in Xcode. In order to do run it, I had to: Specify /path/to/mpiexec in Edit Scheme -> Run -> Info -> Executable, instead of the default one, say myprogram if my target is called myprogram. Specify the following arguments in Edit Scheme -> Run -> Arguments -> Arguments Passed On Launch: -np 4, ${BUILT_PRODUCTS_DIR}/${EXECUTABLE_NAME} This is clearly analogous to a mpiexec -np 4 a.out command launched on terminal. The problem is, when I want to debug my application, the execution doesn't stop on the breakpoints. I instantly thought that it is because of the check box Debug Executable in Edit Scheme -> Run -> Info -> Executable. Indeed (as I have just said), the Executable specified in there is mpiexec and not myprogram. Thus, is there an option or some command I could set in Xcode to attach the lldb to myprogram?
Replies
2
Boosts
0
Views
626
Activity
Oct ’24
Reply to Can't change background task identifier
My understanding is that you’re doing this: Run app with identifier A. Test it from LLDB. It works. Change the app to use identifier B. Test it from LLDB. It fails. If you delete the app from the device between steps 3 and 4, does that help? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’24
Xcode debugger crashes on breakpoint
Hello,We are having a systematic crash of the lldb-rpc-server when debugging our project, so we are unable to use the debugger. The crash is as follow:https://gist.github.com/bvirlet/89ecb0388c659932f5b572fa0d79e4f5I have submitted a crash report to Apple (FB7671116) but in the meantime I would be interested in a possible workaround.The problem is present for several developers, on different machines.Thanks!Bruno
Replies
0
Boosts
0
Views
782
Activity
Apr ’20
Ios10 beta nightmare crash on keychain and keyboard crash crash crash crash
iiOS 10 crash crash crash ****
Replies
0
Boosts
0
Views
356
Activity
Jul ’16
Reply to Is my copy of lldb up-to-date?
Latest release version appears to be: lldb-340.4.119OSX 10.11.2, Xcode 7.2 release
Replies
Boosts
Views
Activity
Dec ’15
Reply to IOS 14 App Crash If Keyboard Is Open And Happens Only In Release
It happens every time.. Now I catch this problem in debug. When this happens?: When keyboard is shows and then Loading popup show called which works with adding a view to ViewController's View.. Only happens in ios14 Issue Running 'AppName' popup show up and this message was inside: The app “AppName” on iPhone’u quit unexpectedly. Domain: IDEDebugSessionErrorDomain Code: 4 Failure Reason: Message from debugger: Terminated due to memory issue - System Information macOS Version 10.15.7 (Build 19H2) Xcode 12.0 (17219) And last log was: 2020-10-13 16:29:33.171937+0300 AppName[10638:3084588] [ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]blockinvoke
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’20
Reply to Under stress tests, our Network Extension crashed due to QOS?
Anything I should look for or do, other than telling lldb to attach to the correct pid, and wait for a crash? That’s the obvious place to start. If you want to write more code you could: Investigate core dumps. Install a SIGABRT signal handler than stops the process to allow you to attach. Disable SIP and start messing around with DTrace. We might get to that point, but they all see like overkill right now. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Replies
Boosts
Views
Activity
Feb ’24