Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Objective-C and Swift
  4. my application crashed with this message NSInternalInconsistencyException', reason: 'Printing failed because PMSessionEndDocumentNoDialog() returned -30871.'

my application crashed with this message NSInternalInconsistencyException', reason: 'Printing failed because PMSessionEndDocumentNoDialog() returned -30871.'

Scheduled Pinned Locked Moved Objective-C and Swift
c++data-structureshelp
6 Posts 3 Posters 11 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Le rner
    wrote on last edited by
    #1

    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: 4

    Application 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

    J 1 Reply Last reply
    0
    • L Le rner

      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: 4

      Application 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

      J Offline
      J Offline
      Jochen Arndt
      wrote on last edited by
      #2

      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.

      L E 2 Replies Last reply
      0
      • J Jochen Arndt

        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.

        L Offline
        L Offline
        Le rner
        wrote on last edited by
        #3

        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

        J 1 Reply Last reply
        0
        • L Le rner

          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

          J Offline
          J Offline
          Jochen Arndt
          wrote on last edited by
          #4

          kPMOutOfScope is just the name of the error (a definition or an enum; 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.

          L 1 Reply Last reply
          0
          • J Jochen Arndt

            kPMOutOfScope is just the name of the error (a definition or an enum; 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.

            L Offline
            L Offline
            Le rner
            wrote on last edited by
            #5

            thanks

            1 Reply Last reply
            0
            • J Jochen Arndt

              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.

              E Offline
              E Offline
              EssayWriter
              wrote on last edited by
              #6

              What do you propose to do about this?
              I do not quite understand your logic. use the mind

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups