Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoRotatingFileDestination crashes #249

Closed
gilroykilroy opened this issue Mar 8, 2018 · 4 comments
Closed

AutoRotatingFileDestination crashes #249

gilroykilroy opened this issue Mar 8, 2018 · 4 comments

Comments

@gilroykilroy
Copy link

I've been seeing a few of these crashes:

*** -[NSConcreteFileHandle synchronizeFile]: No such file or directory

0 CoreFoundation __exceptionPreprocess + 124
1 libobjc.A.dylib objc_exception_throw + 56
2 CoreFoundation -[NSException initWithCoder:] + 0
3 Foundation _NSFileHandleRaiseOperationException + 160
4 XCGLogger block_copy_helper.11 + 26280
5 XCGLogger block_copy_helper.14 + 12280
6 XCGLogger globalinit_33_37E021B542BFDF2516C3B96896CA446C_func4 + 21728
7 XCGLogger __swift_destroy_boxed_opaque_existential_1 + 1732
8 XCGLogger __swift_destroy_boxed_opaque_existential_1 + 2668
9 XCGLogger swift_rt_swift_isUniquelyReferenced_nonNull_native + 20816
10 XCGLogger swift_rt_swift_isUniquelyReferenced_nonNull_native + 8440
11 XCGLogger globalinit_33_15E519061A979936292C27E39C87C896_func37 + 11532
12 XCGLogger globalinit_33_15E519061A979936292C27E39C87C896_func34 + 16136
13 XCGLogger globalinit_33_15E519061A979936292C27E39C87C896_func34 + 11536
@DaveWoodCom
Copy link
Owner

@gilroykilroy Can you please give me some more info. How you're reproducing this. What version of Xcode etc you're using.

@gilroykilroy
Copy link
Author

gilroykilroy commented Jun 11, 2018 via email

@DaveWoodCom
Copy link
Owner

Ok thanks.

@Zeropointer11
Copy link

Hi i use the XCGLogger Version 6.1.0 github "DaveWoodCom/XCGLogger" "6.1.0" and get sometimes the File Rotataion Crash at syncronizeFile()
may be you will add a Lock on the File Handler to fix it?

private func closeFile() { logFileHandle?.synchronizeFile() logFileHandle?.closeFile() logFileHandle = nil }

Here is the Crash Report

`Application Specific Information:
*** Terminating app due to uncaught exception 'NSFileHandleOperationException', reason: '*** -[NSConcreteFileHandle synchronizeFile]: No such file or directory'

Last Exception Backtrace:
0 CoreFoundation 0x00000001948c4ec4 __exceptionPreprocess + 228
1 libobjc.A.dylib 0x0000000193a95a40 objc_exception_throw + 52
2 CoreFoundation 0x00000001947cb594 +[NSException raise:format:] + 112
3 Foundation 0x0000000195318610 NSFileHandleRaiseOperationException + 156
4 XCGLogger 0x000000010d25a38c XCGLogger.FileDestination.rotateFile(to: Any, closure: (Swift.Bool) -> ()?) -> Swift.Bool (FileDestination.swift:137)
5 XCGLogger 0x000000010d249478 XCGLogger.AutoRotatingFileDestination.rotateFile() -> () (AutoRotatingFileDestination.swift:237)
6 XCGLogger 0x000000010d249768 XCGLogger.AutoRotatingFileDestination.write(message: Swift.String) -> () (AutoRotatingFileDestination.swift:283)
7 XCGLogger 0x000000010d23902c closure #1 () -> () in XCGLogger.BaseQueuedDestination.output(logDetails: XCGLogger.LogDetails, message: Swift.String) -> () (BaseQueuedDestination.swift:41)
8 XCGLogger 0x000000010d238bcc XCGLogger.BaseQueuedDestination.output(logDetails: XCGLogger.LogDetails, message: Swift.String) -> () (BaseQueuedDestination.swift:48)
9 XCGLogger 0x000000010d23ea8c XCGLogger.BaseDestination.process(logDetails: XCGLogger.LogDetails) -> () (BaseDestination.swift:124)
10 XCGLogger 0x000000010d2400c4 protocol witness for XCGLogger.DestinationProtocol.process(logDetails: XCGLogger.LogDetails) -> () in conformance XCGLogger.BaseDestination : XCGLogger.DestinationProtocol in XCGLogger (:0)
11 XCGLogger 0x000000010d25dff8 XCGLogger.XCGLogger.logln(
: XCGLogger.XCGLogger.Level, functionName: Swift.String, fileName: Swift.String, lineNumber: Swift.Int, userInfo: [Swift.String : Any], closure: () -> Any?) -> () (XCGLogger.swift:335)
12 XCGLogger 0x000000010d25dc7c XCGLogger.XCGLogger.logln(: XCGLogger.XCGLogger.Level, functionName: Swift.StaticString, fileName: Swift.StaticString, lineNumber: Swift.Int, userInfo: [Swift.String : Any], closure: () -> Any?) -> () (XCGLogger.swift:313)
13 XCGLogger 0x000000010d25f9d0 merged XCGLogger.XCGLogger.verbose(
: @autoclosure () -> Any?, functionName: Swift.StaticString, fileName: Swift.StaticString, lineNumber: Swift.Int, userInfo: [Swift.String : Any]) -> () + 144
14 XCGLogger 0x000000010d25f2ac XCGLogger.XCGLogger.warning(: @autoclosure () -> Any?, functionName: Swift.StaticString, fileName: Swift.StaticString, lineNumber: Swift.Int, userInfo: [Swift.String : Any]) -> () + 28
15 Ticketing-Offline 0x00000001031135b4 generic specialization <Ticketing_Offline.TSDataImageDownloadResponse> of closure #3 (Alamofire.DefaultDownloadResponse) -> () in closure #1 (RxSwift.AnyObserver) -> RxSwift.Disposable in Ticketing_Offline.TSAPIService.download(
: Swift.String, destinationPath: Swift.String, method: Alamofire.HTTPMethod, parameters: [Swift.String : Any]?, headers: [Swift.String : Swift.String]?) -> RxSwift.Observable (TSAPIService.swift:390)
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants