swarm-support
[Top][All Lists]
Advanced

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

strange messages


From: Friedemann Buergel
Subject: strange messages
Date: Tue, 11 Jun 1996 12:18:01 +0200 (MET DST)

Recently, I ran into a problem which I could not resolve to my own
mistake though I cannot tell for sure. What happens is that the program
crashes because an arbitrary message send happens that I never define.
After some debugging I found out that actually data is taken from 
memory locations near my variables and this is interpreted as an
object and sent messages to. In the following example, the adress in 
"test1" will be sent a message with method "step". Interestingly, the
correct object, co2Curve is ALSO sent the message, so all in all, one
superfluous message is sent to a foul destination. Therefore, this 
problem remains unnoticed, as long as test1 contains 0x0.
I was too lazy to find out WHO is actually sending the message (it could
be eihter the scheduler, or a followup like the co2Curve).
I did however check that the message send is caused
by the entry in the ActionGroup as shown in the code below.
Is there an easy way to see where a message is comming from that
gets rejected?
Am I doing something wrong with schedules or ActionGroups or whatever?

Here is the code:




fragment from ObserverSwarm.h
-------------------------------------
@interface LemObserverSwarm : GUISwarm 
{
int test1;
        BLTGraph * co2Graph;
int test2;
        GraphElement * co2Data;
int test3;
        ActiveGraph * co2Curve;
int test4;
{more variables}


fragment from ObserverSwarm__buildObjects
--------------------------------------------------
        co2Graph = [BLTGraph create: [self getZone]];

        [co2Graph title: "Globale CO2 Entwicklung"];
        [co2Graph axisLabelsX: "Zeit" Y: "CO2 Menge"];
        [co2Graph pack];

        co2Data = [co2Graph createElement];
        [co2Data setLabel: "CO2"];
        [co2Data setColor: "black"];

        co2Curve = [ActiveGraph createBegin: [self getZone]];
        [co2Curve setElement: co2Data];
        [co2Curve setDataFeed: world;
        [co2Curve setProbedSelector: M(f_ask_co2)];
        co2Curve = [co2Curve createEnd];


fragment from ObserverSwarm__buildActions
--------------------------------------------
        displayActions = [ActionGroup create: [self getZone]];
        [displayActions createActionTo: controlPanel message: M(doTkEvents)];

        [displayActions createActionTo: co2Curve message: M(step)];

{more display actions are added here, but these work correctly}

        displaySchedule = [Schedule createBegin: [self getZone]];
        [displaySchedule setRepeatInterval: displayRate];
        displaySchedule = [displaySchedule createEnd];
        [displaySchedule at: 0 createAction: displayActions];




Regards
 - FB

____________________________________________________________________________
Friedemann Buergel                                  e-mail: address@hidden
EAWAG, Switzerland                                  phone:    +41-1-823-5534
Environmental Physics                               fax:      +41-1-823-5210





reply via email to

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