summaryrefslogtreecommitdiff
path: root/Userland/Applications/CrashReporter
AgeCommit message (Collapse)Author
2022-12-15LibThreading+Everywhere: Support returning error from `BackgroundAction`Lucas CHOLLET
This patch allows returning an `Error` from the `on_complete` callback in `BackgroundAction`. It also adds a custom callback to manage errors returned during its execution.
2022-12-14CrashReporter: Use the `Core::Stream` friendly API, `save_file()`Lucas CHOLLET
2022-12-14LibFileSystemAccessClient: Rename `try_save_file` =>Lucas CHOLLET
`try_save_file_deprecated` This precedes the addition of a new api using `Core::Stream`
2022-12-08CrashReporter: Factorize exiting behavior to `window->close()`Lucas CHOLLET
2022-12-08CrashReporter: Disable save button until it is ready to useLucas CHOLLET
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-11-01Everywhere: Mark dependencies of most targets as PRIVATETim Schumacher
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
2022-10-14AK+Userland: Stub out code that isn't currently implemented on AARCH64Gunnar Beutner
Even though this almost certainly wouldn't run properly even if we had a working kernel for AARCH64 this at least lets us build all the userland binaries.
2022-10-12Userland: Properly populate GENERATED_SOURCESAli Mohammad Pur
We previously put the generated headers in SOURCES, which did not mark them as GENERATED (and did not produce a proper dependency). This commit moves all generated headers into GENERATED_SOURCES, and removes useless header SOURCES.
2022-09-29AK+Everywhere: Replace "protocol" with "scheme" url helpersnetworkException
URL had properly named replacements for protocol(), set_protocol() and create_with_file_protocol() already. This patch removes these function and updates all call sites to use the functions named according to the specification. See https://url.spec.whatwg.org/#concept-url-scheme
2022-08-01CrashReporter: Turn off line wrapping in the various text editorsAndreas Kling
It's much nicer to look at a backtrace when it has one line per stack frame instead of a random number of lines.
2022-08-01CrashReporter: Focus the "Close" button on startupAndreas Kling
The most common action people will want to do with these windows is to close them, so let's make that the first choice.
2022-08-01CrashReporter: Add ellipsis (...) to "Save Backtrace" buttonAndreas Kling
Since you must provide a file name before saving occurs, this button should have an ellipsis.
2022-07-27Everywhere: Make the codebase more architecture awareUndefine
2022-07-15CrashReporter: Tweak layoutFrHun
These changes bring the margins, spacing, and sizes more in line with what is used in the rest of the system.
2022-07-12Everywhere: Replace single-char StringView op. arguments with charssin-ack
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-12Userland: Convert command line arguments to String/StringViewsin-ack
StringView was used where possible. Some utilities still use libc functions which expect null-terminated strings, so String objects were used there instead.
2022-06-10LibGUI: Add layout spacer support to GMLFrHun
This is a bit of a hack, but it is an easy way to finally get spacers into GML. This will translate well if spacers are later to become child objects of the continer widget.
2022-06-03Applications: Use spawn_or_show_error() for common spawn patternMacDue
2022-04-27LibCore: Remove main event loopJelle Raaijmakers
The main event loop functionality was used in just two places where the alternative is a bit simpler. Remove it in favor of referencing the event loop directly, or just invoking `EventLoop::current()`. Note that we don't need locking in the constructor since we're now only modifying a thread-local `Vector`. We also don't need locking in the old call sites to `::with_main_locked()` since we already lock the event loop in the subsequent `::post_event()` invocation.
2022-04-20CrashReporter: Don't display an error when cancelling backtrace savingLucas CHOLLET
Pressing the cancel button on the prompt displayed by try_save_file() used to show an error.
2022-04-20CrashReporter: Fix "Save Backtrace" button widthLucas CHOLLET
Previously, the size of the button changed with the window's size. Now this parameter is fixed and consistent with the "Debug in Hack Studio" button.
2022-04-12CrashReporter: Implement `Save Backtrace` buttonAli Chraghi
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-02-13Userland: Run gml-formatIdan Horowitz
This brings the existing GML files up to spec with the new requirements
2022-02-07Meta+Userland: Run the GML formatter on CI and pre-commitkleines Filmröllchen
Now that the GML formatter is both perserving comments and also mostly agrees to the existing GML style, it can be used to auto-format all the GML files in the system. This commit does not only contain the scripts for running the formatting on CI and the pre-commit hook, but also initially formats all the existing GML files so that the hook is successfull.
2022-02-06CrashReporter: Capture backtrace progress callback's arguments by valueSviatoslav Peleshko
Previously we captured them by reference, but when the deferred code finally runs from an event loop, the references may be stale. In that case, value and max of the progressbar are set with random numbers. If we were especially unlucky, the `frame_count` turned into a negative int, and would crash at `VERIFY(min <= max)`.
2022-02-03CrashReporter: Stop attempting to lockdown the process veilBrian Gianforcaro
The idea of locking the process veil in CrashReproter is well intentioned, but ultimately frought with issues. The fundamental premise is a bit flawed, as we are using the crashing program as input to dynamically add new paths to the process veil. This means that an attacker can potentially produce a custom or malformed binary to trick CrashReporter into allowing an arbitrary path to be read.
2022-01-28LibCoredump: Copy out the FooInfo structs to an aligned addressAli Mohammad Pur
We were handing out unaligned pointers to these, which made UBSAN super mad, copy them out to avoid that.
2022-01-25CrashReporter: Dispatch backtrace progress callbacks on the main threadAndreas Kling
We can't fiddle with GUI widgets off the main thread, so let's use Core::EventLoop::deferred_invoke() to dispatch the work. The progress bar doesn't visibly update yet, but at least we're not crashing anymore.
2022-01-20CrashReporter: Don't crash when investigating a HackStudio crashSam Atkins
Previously when opening a crash report for HackStudio, the `unveil("/bin/HackStudio", "rx")` call was failing because of the earlier `unveil(executable_path.characters(), "r")` call requesting only "r" permissions for it. This patch handles this specific case, so you can crash HackStudio to your heart's content. :^) Also, we were unveiling the executable path twice, once manually and once implicitly as part of the coredump's libraries, so we now check for the latter and avoid it. Thanks to Daniel for noticing what was right in front of me and I didn't see! Co-authored-by: Daniel Bertalan <dani@danielbertalan.dev>
2022-01-03CrashReporter: Move progressbar into main windowSamuel Bowman
Previously we would create a temporary progress window to show a progressbar while the coredump is processed. Since we're only waiting on backtraces and CPU register states, we can move the progressbar into the main window and show everything else immediately while the slow parts are generated in a BackgroundAction.
2021-12-11CrashReporter: Remove redundant pledge()bugreport0
2021-12-05Applications: Cast unused smart-pointer TRY return values to voidSam Atkins
2021-12-04CrashReporter: Port to LibMain and use TRY() while building the UI :^)Andreas Kling
2021-11-30CrashReporter: Remove unnecessary button height overrides from GMLAndreas Kling
2021-11-30CrashReporter+HackStudio: Let's call it "Debug in Hack Studio"Andreas Kling
"Inspect in Hack Studio" was a bit vague.
2021-11-24CrashReporter: Don't visualize whitespace in memory regions text editorMaciej
This was visible for memory regions with empty name.
2021-11-21CrashReporter: Show the available memory region informationTim Schumacher
2021-11-20CrashReporter: Add "Inspect in Hack Studio" buttonItamar
This allows the user to open the crash coredump in Hack Studio and inspect it in the Debug tab.
2021-11-20CrashReporter: Unlink coredump file on exitItamar
Previously, when the --unlink flag was passed to CrashReporter, it unlinked the coredump file immediately after reading it. This change makes it so the coredump file is deleted when CrashReporter exits.
2021-10-03CrashReporter: Don't crash when "Generating..." Window gets closedsw1tchbl4d3
2021-09-21CrashReporter: Show coredump loading progress in the Taskbar :^)Andreas Kling
2021-09-21CrashReporter+LibCoredump: Show progress window while loading coredumpAndreas Kling
Some coredumps take a long time to symbolicate, so let's show a simple window with a progress bar while they are loading. I'm not super happy with the factoring of this feature, but it's an absolutely kickass feature that makes crashing feel 100% more responsive than before, since you now get GUI feedback almost immediately after a crash occurs. :^)
2021-09-21CrashDaemon+CrashReporter: Streamline crash reporting a little bitAndreas Kling
Before this patch, this is what would happen after something crashed: 1. CrashDaemon finds a new coredump in /tmp 2. CrashDaemon compresses the new coredump (gzip) 3. CrashDaemon parses the uncompressed coredump and prints a backtrace 4. CrashDaemon launches CrashReporter 5. CrashReporter parses the uncompressed coredump (again) 6. CrashReporter unlinks the uncompressed coredump 7. CrashReporter displays a GUI This was taking quite a long time when dealing with large programs crashing (like Browser's WebContent processes.) The new flow: 1. CrashDaemon finds a new coredump in /tmp 2. CrashDaemon mmap()'s the (uncompressed) coredump 3. CrashDaemon launches CrashReporter 4. CrashDaemon goes to sleep for 3 seconds (hack alert!) 5. CrashReporter parses the (uncompressed) coredump 6. CrashReporter unlinks the (uncompressed) coredump 7. CrashReporter displays a GUI 8. CrashDaemon wakes up (after step 4) 9. CrashDaemon compresses the coredump (gzip) TL;DR: we no longer parse the coredumps twice, and we also prioritize launching the CrashReporter GUI immediately when a new coredump shows up, instead of compressing and parsing it in CrashDaemon first. The net effect of this is that you get a backtrace on screen much sooner. That's pretty nice. :^)
2021-09-19CrashReporter: Add some margin around the backtrace & register viewsAndreas Kling
2021-08-23Everywhere: Core dump => CoredumpAndreas Kling
We all know what a coredump is, and it feels more natural to refer to it as a coredump (most code already does), so let's be consistent.
2021-08-18Userland+LibGUI: Add shorthand versions of the Margins constructorsin-ack
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same margin on all edges, for example. The constructors follow CSS' style of specifying margins. The added constructors are: - Margins(int all): Sets the same margin on all edges. - Margins(int vertical, int horizontal): Sets the first argument to top and bottom margins, and the second argument to left and right margins. - Margins(int top, int vertical, int bottom): Sets the first argument to the top margin, the second argument to the left and right margins, and the third argument to the bottom margin.