my application crashed with this message NSInternalInconsistencyException', reason: 'Printing failed because PMSessionEndDocumentNoDialog() returned -30871.'
-
hi all on printing action application get crashed with NSInternalInconsistencyException', reason: 'Printing failed because PMSessionEndDocumentNoDialog() returned -30871.' message. please help me for this. crash log is
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 4Application Specific Information:
abort() called
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Printing failed because PMSessionEndDocumentNoDialog() returned -30871.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00007fff83ab3784 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x00007fff89814f03 objc_exception_throw + 45
2 CoreFoundation 0x00007fff83ab35a7 +[NSException raise:format:arguments:] + 103
3 CoreFoundation 0x00007fff83ab3534 +[NSException raise:format:] + 148
4 AppKit 0x00007fff879c386e -[NSPrintSpoolingGraphicsContext dealloc] + 37
5 CoreFoundation 0x00007fff83a2ff93 __CFArrayReleaseValues + 435
6 CoreFoundation 0x00007fff83a0da73 _CFRelease + 179
7 AppKit 0x00007fff8746e53d __NSAppKitFinalizeThreadData + 260
8 libSystem.B.dylib 0x00007fff8098f751 _pthread_tsd_cleanup + 187
9 libSystem.B.dylib 0x00007fff8098f39c _pthread_exit + 147
10 Foundation 0x00007fff84f9718f __NSFinalizeThreadData + 0
11 Foundation 0x00007fff84f97127 __NSThread__main__ + 1448
12 libSystem.B.dylib 0x00007fff8098efd6 _pthread_start + 331
13 libSystem.B.dylib 0x00007fff8098ee89 thread_start + 13
)Thread 4 Crashed:
0 libSystem.B.dylib 0x00007fff809c89ce __semwait_signal_nocancel + 10
1 libSystem.B.dylib 0x00007fff809c88d0 nanosleep$NOCANCEL + 129
2 libSystem.B.dylib 0x00007fff80a253ce usleep$NOCANCEL + 57
3 libSystem.B.dylib 0x00007fff80a44a00 abort + 93
4 libstdc++.6.dylib 0x00007fff8a10e5d2 __tcf_0 + 0
5 libobjc.A.dylib 0x00007fff89818b39 _objc_terminate + 100
6 libstdc++.6.dylib 0x00007fff8a10cae1 __cxxabiv1::__terminate(void (*)()) + 11
7 libstdc++.6.dylib 0x00007fff8a10cb16 __cxxabiv1::__unexpected(void (*)()) + 0
8 libstdc++.6.dylib -
hi all on printing action application get crashed with NSInternalInconsistencyException', reason: 'Printing failed because PMSessionEndDocumentNoDialog() returned -30871.' message. please help me for this. crash log is
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 4Application Specific Information:
abort() called
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Printing failed because PMSessionEndDocumentNoDialog() returned -30871.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00007fff83ab3784 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x00007fff89814f03 objc_exception_throw + 45
2 CoreFoundation 0x00007fff83ab35a7 +[NSException raise:format:arguments:] + 103
3 CoreFoundation 0x00007fff83ab3534 +[NSException raise:format:] + 148
4 AppKit 0x00007fff879c386e -[NSPrintSpoolingGraphicsContext dealloc] + 37
5 CoreFoundation 0x00007fff83a2ff93 __CFArrayReleaseValues + 435
6 CoreFoundation 0x00007fff83a0da73 _CFRelease + 179
7 AppKit 0x00007fff8746e53d __NSAppKitFinalizeThreadData + 260
8 libSystem.B.dylib 0x00007fff8098f751 _pthread_tsd_cleanup + 187
9 libSystem.B.dylib 0x00007fff8098f39c _pthread_exit + 147
10 Foundation 0x00007fff84f9718f __NSFinalizeThreadData + 0
11 Foundation 0x00007fff84f97127 __NSThread__main__ + 1448
12 libSystem.B.dylib 0x00007fff8098efd6 _pthread_start + 331
13 libSystem.B.dylib 0x00007fff8098ee89 thread_start + 13
)Thread 4 Crashed:
0 libSystem.B.dylib 0x00007fff809c89ce __semwait_signal_nocancel + 10
1 libSystem.B.dylib 0x00007fff809c88d0 nanosleep$NOCANCEL + 129
2 libSystem.B.dylib 0x00007fff80a253ce usleep$NOCANCEL + 57
3 libSystem.B.dylib 0x00007fff80a44a00 abort + 93
4 libstdc++.6.dylib 0x00007fff8a10e5d2 __tcf_0 + 0
5 libobjc.A.dylib 0x00007fff89818b39 _objc_terminate + 100
6 libstdc++.6.dylib 0x00007fff8a10cae1 __cxxabiv1::__terminate(void (*)()) + 11
7 libstdc++.6.dylib 0x00007fff8a10cb16 __cxxabiv1::__unexpected(void (*)()) + 0
8 libstdc++.6.dylibLookup the error code:
kPMOutOfScope - Anonymous | Apple Developer Documentation[^]:
kPMOutOfScope Your application called this function out of sequence with other printing functions. Declaration kPMOutOfScope = -30871
From that I would guess that you have called
PMSessionEndDocumentNoDialog()
while printing is not - or not anymore - active. -
Lookup the error code:
kPMOutOfScope - Anonymous | Apple Developer Documentation[^]:
kPMOutOfScope Your application called this function out of sequence with other printing functions. Declaration kPMOutOfScope = -30871
From that I would guess that you have called
PMSessionEndDocumentNoDialog()
while printing is not - or not anymore - active. -
i not called any of fiction related PMSessionEndDocumentNoDialog or kPMOutOfScope i really don't know what happened even crash log not show any link to my application its shows all link to lib
kPMOutOfScope
is just the name of the error (a definition or anenum
; should be declared in PMError.h).PMSessionEndDocumentNoDialog
might be called by other printing related functions or by a library (which seems happened in your case). So it may be a bug in that library or your code calls (printing) functions from that library without follwing the library reference documentation. There should be not so many code lines in your application that are printing related. I would start inspecting them for correct usage of functions by reading the documentation for the used functions. Add code to check function return values (if a start print / preparation function fails for example and you did not detect that but call other printing functions later, they will fail too which might include exceptions). If it is a third party library, contact the supplier or ask in a related forum. -
kPMOutOfScope
is just the name of the error (a definition or anenum
; should be declared in PMError.h).PMSessionEndDocumentNoDialog
might be called by other printing related functions or by a library (which seems happened in your case). So it may be a bug in that library or your code calls (printing) functions from that library without follwing the library reference documentation. There should be not so many code lines in your application that are printing related. I would start inspecting them for correct usage of functions by reading the documentation for the used functions. Add code to check function return values (if a start print / preparation function fails for example and you did not detect that but call other printing functions later, they will fail too which might include exceptions). If it is a third party library, contact the supplier or ask in a related forum. -
Lookup the error code:
kPMOutOfScope - Anonymous | Apple Developer Documentation[^]:
kPMOutOfScope Your application called this function out of sequence with other printing functions. Declaration kPMOutOfScope = -30871
From that I would guess that you have called
PMSessionEndDocumentNoDialog()
while printing is not - or not anymore - active.What do you propose to do about this?
I do not quite understand your logic. use the mind