Ticket #204 (closed defect: fixed)

Opened 9 months ago

Last modified 8 months ago

Console error message during undo

Reported by: Aderstedt Owned by: tsnorri
Priority: minor Milestone: 1.7
Component: BaseTen Keywords: undo
Cc:

Description

Using r1301 of BaseTen?, I get the following error when performing an undo on a single -setValue:forKey on a BXDatabaseObject. The undo is completed successfully.

(BaseTen?) [84906] PGTSFoundationObjects.m:62 -[NSObject(PGTSFoundationObjects) PGTSParameterLength:connection:] [0x20b020m] WARNING: Returning NULL from NSObject's implementation.

Change History

  Changed 9 months ago by tsnorri

The warning indicates that an object is (supposed to be) deserialized from a result set fetched from the database, but some data type's class doesn't have a deserialization method.

I'm currently at WWDC but I'll look into this as soon as possible.

follow-up: ↓ 4   Changed 9 months ago by tsnorri

I wasn't able to reproduce this with a very simple test. I'll keep looking but if you can, please post a stack trace. You should be able to get one by setting a symbolic breakpoint to “-[NSObject PGTSParameterLength:connection:]”.

  Changed 9 months ago by tsnorri

  • milestone set to 1.7.1

in reply to: ↑ 2   Changed 9 months ago by Aderstedt

Replying to tsnorri:

I wasn't able to reproduce this with a very simple test. I'll keep looking but if you can, please post a stack trace. You should be able to get one by setting a symbolic breakpoint to “-[NSObject PGTSParameterLength:connection:]”.

Here is a stack trace:

#0  0x00180f15 in -[NSObject(PGTSFoundationObjects) PGTSParameterLength:connection:] ()
#1  0x001839ad in -[PGTSParameterQuery sendQuery:] ()
#2  0x00183fb2 in -[PGTSConcreteQueryDescription sendForConnection:] ()
#3  0x001840da in -[PGTSConcreteQueryDescription finishForConnection:] ()
#4  0x00195cdf in -[BXPGInterface executeUpdateWithDictionary:objectID:entity:predicate:error:] ()
#5  0x00165b1c in -[BXDatabaseContext(PrivateMethods) executeUpdateObject:entity:predicate:withDictionary:error:] ()
#6  0x001675b1 in -[BXDatabaseObject setPrimitiveValue:forKey:] ()
#7  0x927059dd in __invoking___ ()
#8  0x927053c8 in -[NSInvocation invoke] ()
#9  0x92705498 in -[NSInvocation invokeWithTarget:] ()
#10 0x915190bc in -[_NSUndoInvocation invoke] ()
#11 0x91518e24 in -[_NSUndoStack popAndInvoke] ()
#12 0x91518c27 in -[NSUndoManager undoNestedGroup] ()
#13 0x000052f2 in -[InvoiceController sendInvoiceDidEnd:returnCode:contextInfo:] (self=0x39c0b0, _cmd=0x92a4, sheet=0x38ad50, returnCode=0, contextInfo=0xa4a0) at /Users/erik/Program/Skarp/InvoiceController.m:52
#14 0x95b8f1c3 in -[NSApplication endSheet:returnCode:] ()
#15 0x00005227 in -[InvoiceController sendInvoiceCancel:] (self=0x180f0f, _cmd=0x92ce, sender=0x34e5b0) at /Users/erik/Program/Skarp/InvoiceController.m:44
#16 0x95b4d4cb in -[NSApplication sendAction:to:from:] ()
#17 0x95b4d408 in -[NSControl sendAction:to:] ()
#18 0x95b4d28e in -[NSCell _sendActionFrom:] ()
#19 0x95b4c8e7 in -[NSCell trackMouse:inRect:ofView:untilMouseUp:] ()
#20 0x95b4c13a in -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] ()
#21 0x95b4b9f4 in -[NSControl mouseDown:] ()
#22 0x95b4a133 in -[NSWindow sendEvent:] ()
#23 0x95b16cd9 in -[NSApplication sendEvent:] ()
#24 0x95a7462f in -[NSApplication run] ()
#25 0x95a41834 in NSApplicationMain ()
#26 0x00001de2 in start ()

  Changed 9 months ago by tsnorri

(In [1310]) Fixed a bug which caused a warning to be printed when NSNull was passed as a query parameter - Added a separate implementation for getting a NULL parameter for NSNull values. - Wrote a test for it. - References #204.

  Changed 9 months ago by tsnorri

Sorry, I got this mixed up with +copyForPGTSResultSet:withCharacters:type:. Actually the method tries to serialize an object for an SQL query or command. I think I got this fixed, though. If not, the warning is now more informative.

  Changed 8 months ago by tsnorri

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from 1.7.1 to 1.7

I assume that this is now fixed. It happened in time for 1.7.

Note: See TracTickets for help on using tickets.