Lldb rpc server что это
Перейти к содержимому

Lldb rpc server что это

  • автор:

Что такое LLDB RPC-сервер? Когда происходит сбой в Xcode? Почему это вылетает?

/ Library / Logs / DiagnosticReports и имеет префикс «lldb-rpc-server». Пожалуйста, сообщите об ошибке и приложите самый последний журнал сбоя.

enter image description here

11 ответов

Убедитесь, что вы не запускаете приложение в режиме выпуска , если оно находится в режиме выпуска , измените его на отладка .

В моем случае сервер LLDB RPC постоянно падал каждый раз, когда я запускал свое приложение, даже после очистки папки сборки и полного удаления и переустановки Xcode (Версия 8.3.3 (8E3004b)).

Оказалось, что LLDB возражал против установленной мною точки останова, просто смещение этой точки останова на линию решило проблему.

В моем случае: я обновляюсь до Xcode Version 9.3 (9E145) недавно, и Xcode выполняет строку с точкой останова, затем я набираю «po XXX» и рекомендую, чтобы оно показало то же сообщение Я пытаюсь удалить следующие файлы

И это решено. не зная точно, почему, но стоит попробовать.

Не забудьте сделать резервную копию этих файлов для восстановления в случае возникновения непредвиденной ситуации.

Ясно, что для этого есть много разных причин, но я использовал DispatchGroup для отслеживания нескольких асинхронных задач.

Я забыл вызвать dispatchGroup.enter() перед одной из асинхронных задач (но все еще вызывал dispatchGroup.leave() , когда она закончилась).

Добавление этого в исправленный сбой для меня.

Я нашел решение для этой проблемы. Я не знаю, правильно это или нет, но это решение для меня. На самом деле я подключил два устройства к своему mac mini, на одном устройстве я запускаю приложение и получаю в консоли указанную выше ошибку. Затем я удалил одно устройство и попытался, на этот раз я не получил никакой ошибки в моей консоли, она работала нормально. Я думаю, что вы, ребята, не поверите, я пытался почти 3 раза с двумя устройствами и одним устройством, его работа только для одного устройства

Эта ошибка возникает по разным причинам, и главная из них заключается в том, что вы позже добавляете приложение наблюдения в свой проект, где XCode добавляет в схему дополнительную цель сборки. щелкните по разделу схемы в правой части «кнопок запуска / остановки», затем нажмите на схему редактирования, нажмите на раздел «Сборка», который является первым, там вы видите 2 цели, одна из которых имеет 2 подзадачи, которые включают в себя приложение для просмотра и расширение для просмотра в нем и у другого нет подзадач, и это цель приложения для просмотра.

Решение состоит в том, чтобы просто удалить цель приложения наблюдения, у которой нет подзадач, и снова запустить приложение.

Я столкнулся с этой же ошибкой, не зная, что делать дальше. Я попробовал принятый ответ, и у моего проекта вообще не было точек останова.

Оказывается, у меня был наблюдатель, которого я не удалял, и каждые несколько раз, когда я включал / выключал ВК, который содержал его, он в конечном итоге падал с ошибкой ОП. Мне пришлось включить зомби чтобы выяснить, какой vc вызвал ошибку. Мне пришлось вручную построчно проходить код, чтобы понять, что я не удалил наблюдателя. Как только я удалил его, все работало нормально.

В моем случае. Я также использую SQLite.swift для создания базы данных. Сбой произошел, когда я попытался изменить тип данных столбца существующей таблицы в коде (что было неправильно), затем вставил кортеж с новым типом данных, а затем попытался распечатать весь кортеж.

Решение: удалите файл базы данных .sqlite3 или удалите таблицу с типом данных конфликта и заново создайте их все.

Если рабочая область имеет много точек останова, это произойдет, поэтому попробуйте удалить все точки останова и увидеть волшебство.

У меня была та же проблема, и я исправил ее после того, как удалил некоторые из точек останова. Не уверен, почему это вообще происходит, но, по крайней мере, вы можете удалить точки останова и использовать некоторые NSLog() или print() , если вы находитесь в Swift и отлаживаете с помощью них. Удачи!

Что касается меня, в моем списке наблюдения было выражение, над которым он бился. При просмотре журналов сбоев в консоли обнаружилось что-то подобное в сообщенном аварийном потоке, который выдал его:

Debugger: Xcode has killed the LLDB RPC server to allow the debugger to detach from your process. You may need to manually terminate your process

Message from debugger: Xcode has killed the LLDB RPC server to allow the debugger to detach from your process. You may need to manually terminate your process.

I keep running into errors when trying to run Xcode projects. The first one involved a code signing issue and after fixing that I am now running into this debugging issue. I never had issues like this before but once I upgraded by iPhone to 15.6.1 is when these issues started to occur. This happens to every application I attempt to run.

Could someone please explain what this message means and if they have any solutions to how I can solve this?

1 Answer 1

This happens when the process of attaching the debugger to the new process goes too slowly and Xcode thinks lldb is stuck. One common cause of that for remote debugging is if there’s no "host side" copy of the system libraries that are loaded into your binary on the phone. iOS applications are really complex these days, with lots of shared libraries and lots and lots of symbols. lldb has to read them all since you might want to put a breakpoint on any one of them.

The debugging protocol lldb uses has the advantage of ubiquity but it wasn’t designed for high speed data transfer. When lldb has to read all that symbol information from the process being debugged, that goes pretty slowly.

Xcode gets around this by copying the system libraries from your device to a cache on the host Mac, putting them in a place lldb knows to look for them. It has to do that every time it sees a device with a new OS. It sounds like that process has failed.

The cache is stored on the Mac you are debugging from in:

There might be no directory for your 15.6.1, or there may be one, but it doesn’t actually have all the files. You can often fix this by deleting the <OS Version> directory in the Device Support, and then unplugging and re-plugging in your device. The next time Xcode runs you should see some message about "preparing device for debugging" — which is it copying these files over. If that still doesn’t work, it’s best to file a bug with the Apple BugReporter so we can look into it more deeply.

What is LLDB RPC Server ? When does it crash in Xcode? Why it crashes?

/Library/Logs/DiagnosticReports and has a prefix ‘lldb-rpc-server’. Please file a bug and attach the most recent crash log.

enter image description here

14 Answers

Make sure you are not running the app in release mode, if it is in release mode then change it to debug.

In my case the LLDB RPC server consistently crashed every time I ran my app, even after cleaning the build folder and removing and reinstalling Xcode (Version 8.3.3 (8E3004b)) completely.

It turned out that apparently LLDB took objection to a breakpoint I had set, just moving this breakpoint by a line resolved the issue.

In my case: I update to Xcode Version 9.3 (9E145) recently and Xcode execute to the line with breakpoint then I type «po XXX» commend it will show the same message. I try to delete following files

and it solved. not knowing exactly why but worth to try.

remember to backup those files in order to recovered in case any unexpected situation occur.

I had the same problem and fixed it after I deleted some of the breakpoints. Not sure why this happen at all, but at least you can remove breakpoints and use some NSLog() or print() if you are in Swift and debug with the help of those. Good luck!

Clearly a lot of different causes for this, but for me I was using a DispatchGroup to keep track of multiple async tasks.

I had forgotten to call dispatchGroup.enter() before one of the async tasks (but still calling dispatchGroup.leave() when it finished).

Adding this in fixed the crash for me.

For me just restarting the simulator worked.

I found the solution to this issue. I don’t know is this correct or not, but this solution is work for me. what I did is Actually I connected two devices to my mac mini, in one device I run the app and get the above error in my console. Then I removed one device and tried, this time I didn’t get any error in my console its worked fine. I think you guys won’t believe this, I tried Almost 3 time with two devices and one device its only work for one device

This error occurs for different reasons and the main one is when you add a watch app later to your project where Xcode adds an extra build target to scheme. click on scheme section in right side of «run/stop buttons» then hit on edit scheme, hit on Build section which is the first one, There you see 2 targets one has 2 sub targets which includes watch app and watch extension in it and the other one has no sub targets and it is a watch app target.

Solution is simple delete the watch app target which has no sub targets and run the app again.

For me, I had an expression in my watch list that it was barfing on. When looking at the crash logs in Console, there was something like this on the reported crashed thread which gave it away:

I ran across this same error with zero idea of what to do next. I tried the accepted answer and my project didn’t have any breakpoints at all.

Turns out I had an observer that I didn’t remove and every few times I would push off/on the vc that contained it it would eventually crash with the op’s error. I had to enable zombies to figure out which vc was causing the error. I had to manually go through the code line by line to realize I didn’t remove the observer. Once I removed it everything worked fine.

I have found a solution for this, this may not be the perfect but kind a fix my problem.

Go to target Build Settings -> Other Swift Flags -> check Debug Values added Remove everything except $(inherited) and -DDEBUG

Remove Derived Data

Clean and Run

If workspace has lots of breakpoint then it will happen, So try to remove all the break point and see the magic.

I am having this issue in Xcode 12.1.1 (12A7605b) in January 2021 on macOS Catalina with a Swift project.

I tried Clean, delete Derived data, restarting mac, running on different simulators and real devices — no luck.

Others suggest removing the breakpoint, but for me this breakpoint is needed for debugging (I guess I can figure out how to debug in a different way, with a differently placed breakpoint or with print statements, but that’s frustrating).

I filed a bug report with Apple as the error message suggest — I urge others to do the same to increase the chance of a fix by Apple.

In the meanwhile I use this workaround — wrap the code where you want the breakpoint in a DispatchQueue.main.async :

(Note we use [self] here because it’s just debug code, but in most cases these async calls need [weak self] to avoid retain cycles and memory leaks)

Name already in use

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

A RPC server interface for the LLDB Python bridge.

Principally the lldb debugger is usable as a python module but on many systems it is compiled against the system’s default Python, if you want to use another Python version there will be incompatability problems.

Usually you don’t want to have a debugger running in-process because if that crashes, all your Python code will crash with it. So we wrapped the lldb interface into an XMLRPC server (as that’s in the standard lib of Python). So when the debugger crashes the worst thing that could happen would be an exception on the receiver side.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *