diff --git a/HelperService/main.swift b/HelperService/main.swift index 937bfea..45a5090 100644 --- a/HelperService/main.swift +++ b/HelperService/main.swift @@ -2,9 +2,11 @@ import Foundation import Libbox import Library +LibboxPrepareCrashSignalHandlers() NativeCrashReporter.installForCurrentProcess( basePath: URL(fileURLWithPath: WorkingDirectoryManager.helperNativeCrashBasePath, isDirectory: true) ) +LibboxReinstallCrashSignalHandlers() let pendingCrashLogs = RootHelperService.readCrashLogFiles() diff --git a/Library/Network/ExtensionProvider.swift b/Library/Network/ExtensionProvider.swift index 79c0264..ecdda75 100644 --- a/Library/Network/ExtensionProvider.swift +++ b/Library/Network/ExtensionProvider.swift @@ -81,6 +81,7 @@ open class ExtensionProvider: NEPacketTunnelProvider { #endif override public init() { + LibboxPrepareCrashSignalHandlers() #if os(macOS) if Variant.useSystemExtension { NativeCrashReporter.installForCurrentProcess( @@ -93,6 +94,7 @@ open class ExtensionProvider: NEPacketTunnelProvider { #else NativeCrashReporter.installForCurrentProcess() #endif + LibboxReinstallCrashSignalHandlers() super.init() } diff --git a/MacLibrary/ApplicationDelegate.swift b/MacLibrary/ApplicationDelegate.swift index b2de6bc..29f70ad 100644 --- a/MacLibrary/ApplicationDelegate.swift +++ b/MacLibrary/ApplicationDelegate.swift @@ -7,7 +7,9 @@ import UserNotifications open class ApplicationDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDelegate { public func applicationDidFinishLaunching(_: Notification) { + LibboxPrepareCrashSignalHandlers() NativeCrashReporter.installForCurrentProcess() + LibboxReinstallCrashSignalHandlers() NSLog("Here I stand") let options = LibboxSetupOptions() options.basePath = FilePath.sharedDirectory.relativePath diff --git a/SFI/ApplicationDelegate.swift b/SFI/ApplicationDelegate.swift index 64771e6..1683f0a 100644 --- a/SFI/ApplicationDelegate.swift +++ b/SFI/ApplicationDelegate.swift @@ -12,7 +12,9 @@ class ApplicationDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCe private var reportTransferServer: ReportTransferServer? func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { + LibboxPrepareCrashSignalHandlers() NativeCrashReporter.installForCurrentProcess() + LibboxReinstallCrashSignalHandlers() NSLog("Here I stand") let options = LibboxSetupOptions() options.basePath = FilePath.sharedDirectory.relativePath diff --git a/SFT/ApplicationDelegate.swift b/SFT/ApplicationDelegate.swift index 7b10219..d6c6562 100644 --- a/SFT/ApplicationDelegate.swift +++ b/SFT/ApplicationDelegate.swift @@ -6,7 +6,9 @@ import UIKit class ApplicationDelegate: NSObject, UIApplicationDelegate { func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { + LibboxPrepareCrashSignalHandlers() NativeCrashReporter.installForCurrentProcess() + LibboxReinstallCrashSignalHandlers() NSLog("Here I stand") let options = LibboxSetupOptions() options.basePath = FilePath.sharedDirectory.relativePath