swarm-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [swarm-hackers] Help on Heatbugs (Git)


From: Nima Talebi
Subject: Re: [swarm-hackers] Help on Heatbugs (Git)
Date: Thu, 19 Nov 2009 09:24:05 +1100

Sure can - I'll do that in a minute - just an update too on this...

I found the freeze, eventually crashes if I bothered to wait a little longer.

The thread with the crash has the following traceback...


#0 0x92ea2756 in _cache_malloc
#1 0x92ea257e in _cache_fill
#2 0x92eaa6ff in lookUpMethod
#3 0x92ea1da7 in _class_lookupMethodAndLoadCache
#4 0x92ea1953 in objc_msgSend
#5 0x96cf95f2 in +[_NSCallStackArray arrayWithFrames:count:symbols:]
#6 0x96cf96d1 in +[NSThread callStackSymbols]
#7 0x9129c58a in __raiseError
#8 0x92ea5f49 in objc_exception_throw
#9 0x96d95fda in _NSOutOfMemoryErrorHandler
#10 0x911cd632 in _CFRuntimeCreateInstance
#11 0x911cd2ab in CFBasicHashCreate
#12 0x911cf358 in __CFDictionaryCreateGeneric
#13 0x911cf131 in CFDictionaryCreateMutable
#14 0x911f379f in -[__NSPlaceholderDictionary initWithCapacity:]
#15 0x911f3712 in -[__NSPlaceholderDictionary init]
#16 0x9129c51b in __raiseError
#17 0x92ea5f49 in objc_exception_throw
#18 0x96d95fda in _NSOutOfMemoryErrorHandler
#19 0x912ca88b in __CFStringHandleOutOfMemory
#20 0x911d6045 in __CFStringChangeSizeMultiple
#21 0x911f3085 in __CFStringAppendBytes
#22 0x911f6112 in _CFStringAppendFormatAndArgumentsAux
#23 0x911f5429 in _CFStringCreateWithFormatAndArgumentsAux
#24 0x911fdbfe in CFStringCreateWithFormatAndArguments
#25 0x911fdbc9 in CFStringCreateWithFormat
#26 0x911cd60e in _CFRuntimeCreateInstance
#27 0x98c5139d in CGTypeCreateInstanceWithAllocator
#28 0x98c51fae in CGTypeCreateInstance
#29 0x98c5ddb9 in CGColorCreate
#30 0x9426040d in -[NSDeviceRGBColor _createCGColorWithAlpha:]
#31 0x9424c3c2 in -[NSCalibratedRGBColor set]
#32 0x00086f00 in -[Value2dDisplay updateDisplay]
#33 0x000033b4 in -[HeatbugsGUI updateGraphicalDisplays] at HeatbugsGUI.m:156
#34 0x00084f0b in __builtin_avcall
#35 0x0007cb25 in -[Activity_c _run_]
#36 0x0007c94b in -[Activity_c _run_]
#37 0x0007c94b in -[Activity_c _run_]
#38 0x0007c94b in -[Activity_c _run_]
#39 0x0007c65f in -[Activity_c run]
#40 0x000776ee in -[ScheduleActivity_c stepUntil:]
#41 0x00086405 in -[OpenStepSwarmController processStateFlag]
#42 0x000865cf in -[OpenStepSwarmController simulationControl:]
#43 0x00086113 in -[OpenStepSwarmController newSimulation:]
#44 0x96c7b964 in -[NSThread main]
#45 0x96c7b914 in __NSThread__main__
#46 0x97aaef39 in _pthread_start
#47 0x97aaedbe in thread_start

Note that I've disabled threading to simplify things a little.

The segment from my code that is involved in this is as follows...


- (void)updateGraphicalDisplays {

    // Update any displays with current model state.

    

#if THREADED > 0

    if([lock tryLock]) {

        [NSThread detachNewThreadSelector:@selector(updateHeatSpaceDisplay)

                                 toTarget:self

                               withObject:nil];

        [lock unlock];

    }

    if([lock tryLock]) {

        [NSThread detachNewThreadSelector:@selector(updateHeatbugDisplay)

                                 toTarget:self

                               withObject:nil];

        [lock unlock];

    }

#else

    [heatSpaceDisplay updateDisplay];

    [heatbugDisplay updateDisplay];

    

    //. Inform ourselves that updates are complete and graphical views

    //. should be re-displayed.

    [self swarmHasUpdatedNotification];

#endif


    //. [self viewNeedsDisplay: [_delegate heatbugSpaceView]];

}



Tarball coming up next.


Nima

On Thu, Nov 19, 2009 at 3:38 AM, Scott Christley <address@hidden> wrote:
Hey Nima,

I don't have git, can you email me a tar ball of the source directly (off-list) and I will give it a try.

Scott

On Nov 18, 2009, at 1:00 AM, Nima Talebi wrote:

Hi All,

I've almost got it all working, one last problem that's truly difficult to debug (for me).

Could someone please clone this...

...and run it on Mac OS X.

You can enable/disable threading in the build preprocessor macros - doesn't seem to be related to that at all however.

The app runs as expected for some random number of minutes, and then freezes; There is no crash, no traceback, no messages on the console.

In Debug mode, when all the extra assertions and strict checks are enabled, no violations are made.

While you can see that the psudo RNG is active (the evolution of the swarm is identical each time), the app freezing point is quite random.

I'm out of ideas.

Nima

_______________________________________________
swarm-hackers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/swarm-hackers


_______________________________________________
swarm-hackers mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/swarm-hackers




--
Nima Talebi
web: http://ai.autonomy.net.au/People/Nima
gpg: B51D 1F18 D8E2 B702 B027 23A4 E06B DAC1 BE70 ADC0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]