CoreData SQL relaunch issue

  • When quitting and relaunching my app I get a never-ending string of
    the following errors:

    NSError "An error occurred while saving." Domain=NSCocoaErrorDomain
    Code=134030 UserInfo={
        NSUnderlyingException = error during execution of SQL string
    'ROLLBACK' : library routine called out of sequence;
    }

    I assume it's because the SQL database hasn't had adequate time to
    close before the relaunch.  The problem goes away if the user waits a
    bit before relaunching.

    Thanks for any info.
    Greg
  • > When quitting and relaunching my app I get a never-ending string of
    > the following errors:
    >
    > NSError "An error occurred while saving." Domain=NSCocoaErrorDomain
    > Code=134030 UserInfo={
    > NSUnderlyingException = error during execution of SQL string
    > 'ROLLBACK' : library routine called out of sequence;
    > }
    >
    >
    > I assume it's because the SQL database hasn't had adequate time to
    > close before the relaunch.  The problem goes away if the user waits a
    > bit before relaunching.

    No.  SQLite is an embedded database, built around a file descriptor
    that the kernel will always clean up when the process terminates
    (under any circumstance, including seg fault)

    What happens if you add to your ~/.gdbinit file

    future-break objc_exception_throw

    and catch this in gdb, and run the following commands
    bt
    info threads
    thread apply all bt

    ?  Also, is this on Tiger or Leopard ?  Do you have multiple processes
    accessing the file ?

    - Ben
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today