iDevGames Forums
Look over my code please? - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: Look over my code please? (/thread-1132.html)



Look over my code please? - TimMcD - Jun 13, 2009 08:50 PM

Could someone please look over my code?

Controller.h: http://pastie.org/511233
Controller.m: http://pastie.org/511234

The main.xib correctly sets up the 'field' IBOutlet (an NSTextView) and -(IBAction)inserted:(id)sender is sent by an NSTextField. Those two things are just about the only thing working >_>

I'm trying to connect to a MUD and send/receive data at the same time.


Look over my code please? - mikey - Jun 14, 2009 04:18 AM

Sorry, I can't help, I'm plain C with carbon Smile. But maybe you could try to find the problem - many people have neither the time nor patience to read all of your code?


Look over my code please? - NelsonMandella - Jun 14, 2009 06:43 AM

mikey Wrote:Sorry, I can't help, I'm plain C with carbon Smile. But maybe you could try to find the problem - many people have neither the time nor patience to read all of your code?

This is the most ridiculous reply I've ever seen.


Look over my code please? - TimMcD - Jun 14, 2009 07:56 AM

I'm completely lost wikth the errors that gives me. Thats more of the problem. It was late last night (for me, atleast), and it looks like a totally forgot to give any helpful information >_>

EDIT: Sorry, that error is kinda long (It just keeps going, and going.)

The error I'm getting (over...and over... and over...) is this:
Quote:2009-06-14 08:53:49.865 GMC[6892:10b] Vertscroller instantiated.
2009-06-14 08:53:50.795 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x1691e0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:50.980 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x160130 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:50.982 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:50.985 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x15fa70 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:50.986 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:50.987 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x11f3d0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:50.988 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x160220 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:50.989 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:50.989 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x11dc30 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:50.990 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:50.991 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x161820 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:50.992 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x16b1d0 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:50.993 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:50.994 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x163df0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:51.004 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:51.007 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x1632b0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:51.008 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x163da0 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:51.014 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:51.015 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x1209f0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:51.016 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:51.017 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x167550 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:51.017 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x1209a0 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:51.018 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:51.020 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x165ac0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:51.020 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:51.021 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x162c10 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:51.022 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x165a70 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:51.023 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:51.024 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x14f0b0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:51.025 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:51.025 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x16b0f0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:51.026 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x14f060 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:51.027 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:51.028 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x167710 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:51.029 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:51.034 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x1405b0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:51.036 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x1676c0 of class NSCFString autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a08 0x96300d70 0x920870c8)
2009-06-14 08:53:51.036 GMC[6892:3703] Operation could not be completed. (NSUnknownErrorDomain error 0.)
2009-06-14 08:53:51.037 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x13f930 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x2a38 0x96300d70 0x920870c8)
2009-06-14 08:53:51.038 GMC[6892:3703] NSUnknownErrorDomain
2009-06-14 08:53:51.073 GMC[6892:3703] *** _NSAutoreleaseNoPool(): Object 0x167ef0 of class NSError autoreleased with no pool in place - just leaking
Stack: (0x963cdd74 0x962fadfc 0x29e8 0x96300d70 0x920870c8)
2009-06-14 08:53:51.075 GMC[6892:3703]
I'm on PowerBook G4 Leopard. I don't plan on shipping out to any other platforms besides possibly intel leopard, so I haven't used any autorelease pools (Objective-c 2.0 takes care of that?).

On a side not: My spacebar is sticking horridly. Sad


Look over my code please? - ThemsAllTook - Jun 14, 2009 09:15 AM

See the NSAutoreleasePool class reference. If your application calls autorelease (directly or indirectly) in a context where no autorelease pool has been allocated for you (for example, in a secondary thread, or in a custom run loop not using NSApplicationMain), you have to manage one yourself by allocating and releasing it at the appropriate times.


Look over my code please? - TimMcD - Jun 15, 2009 12:00 PM

Ah thanks. It doesn't look like my input is getting to the MUD tho, or atleast it is and I'm not reading frmo the MUD more than once... Any idea what could be happening?


Look over my code please? - mikey - Jun 15, 2009 12:15 PM

Quote:This is the most ridiculous reply I've ever seen.
How? I was just trying to explain that I once posted 500+ lines of code and said:
"Why is this not working?". I just wanted to help. HuhHuh


Look over my code please? - wyrmmage - Jun 15, 2009 02:18 PM

erm, ya, I thought that reply was fine too (although there wasn't too much code posted, so it worked out fine Smile)


Look over my code please? - OneSadCookie - Jun 16, 2009 12:52 AM

It sounds like you think you're using garbage collection with ObjC 2.0; if you're getting this message, then you're not. You'll need to turn on garbage collection in your target settings if that's what you want.