[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
EZGraph problem
From: |
Paul Johnson |
Subject: |
EZGraph problem |
Date: |
Wed, 10 Apr 2002 08:10:08 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020326 |
I'm using the EZGraph feature that allows one to pass an integer
argument along with the method that collects data from an object. This
is a feature that was my idea and it works, mostly, except when I try to
archive hdf5 data. I want the graph to be shown on the screen, and I
also want it to archive to an hdf data set. I've stared at the Swarm
source quite a while trying to understand what is happening.
If I try both GUI and hdf5 writing, it is crash city. This crash only
appears when I try the setUnsignedArg thing with the graph sequences.
Regular garden variety EZGraphs don't croke when I try both the screen
and file output.
Here is the code snip I'm working with from the observer level.
opinionGraph2 = [EZGraph createBegin: self];
[opinionGraph2 setHDF5Container: hdf5container];
[opinionGraph2 setFileOutput: YES];
[opinionGraph2 setGraphics: YES];
//Change previous to NO, and there is no crash.
// The hdf5 output is fine
// [opinionGraph2 setGraphics: NO];
[opinionGraph2 setFileName: "testname2"];
SET_WINDOW_GEOMETRY_RECORD_NAME (opinionGraph);
[opinionGraph2 setTitle: "Average Opinion"];
[opinionGraph2 setAxisLabelsX: graphtitle Y: "Average Of Opinions"];
opinionGraph2 = [opinionGraph2 createEnd] ;
[opinionGraph2 enableDestroyNotification: self
notificationMethod: @selector (_opinionGraphDeath_:)];
for(i=0; i < [Citizen getNumCultureFeatures]; i++)
{
char name[15];
sprintf(name,"feature %d",i);
id seq = [opinionGraph2 createSequence: name
withFeedFrom: modelSwarm
andSelector: M(getAverageFeature:)];
[seq setUnsignedArg: i];
}
The runtime error message is:
*** event raised for error: InvalidAllocSize
*** function: _i_Zone_c__allocBlock_(), file:
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/defobj/Zone.m,
line: 415
> Requested allocation size must be at least one byte.
> (Requested allocation size was zero.)
*** execution terminating due to error
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/defobj/Symbol.m:173
-[Error(c) _raiseEvent:]
Aborted (core dumped)
And here is the back trace:
#0 0x40715ae1 in __kill () from /lib/i686/libc.so.6
#1 0x407158ba in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2 0x40717062 in abort () at ../sysdeps/generic/abort.c:88
#3 0x40288f3b in debugabort ()
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/misc/de
bugabort.c:9
#4 0x401faa4d in _i_Error_c__raiseEvent_ ()
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/defobj/
Symbol.m:173
#5 0x401fb7fc in _i_Zone_c__allocBlock_ (self=0x80ada70,
_cmd=0x402261c0, size=0)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/defobj/
Zone.m:415
#6 0x401fd827 in _i_FArguments_c__addArgument_ofType_ (self=0x8320060,
_cmd=0x401836e8, value=0x8288f0c, type=fcall_type_void)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/defobj/
FArguments.m:166
#7 0x4016fe51 in _i_MessageProbe___createFCall__ (self=0x8288e78,
_cmd=0x40183700, target=0x81da848)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/objectb
ase/MessageProbe.m:330
#8 0x401700c1 in _i_MessageProbe__dynamicCallOn_ (self=0x8288e78,
_cmd=0x40183728, target=0x81da848)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/objectb
ase/MessageProbe.m:351
#9 0x40170123 in _i_MessageProbe__doubleDynamicCallOn_ (self=0x8288e78,
_cmd=0x40048470, target=0x81da848)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/objectb
ase/MessageProbe.m:384
#10 0x4003d878 in _i_ActiveOutFile__step (self=0x8288e78, _cmd=0x4004abd8)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/analysi
s/ActiveOutFile.m:50
#11 0x400412c7 in _i_EZSequence__step (self=0x8282ce8, _cmd=0x4004ab30)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/analysi
s/EZGraph.m:580
#12 0x401efb17 in _i_Object_s__perform_ (self=0x8282ce8, _cmd=0x402790c0,
aSel=0x4004ab30)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/defobj/
DefObject.m:571
#13 0x4025a6bf in _i_Collection_any__forEach_ (self=0x82832d8,
_cmd=0x4004ab38,
aSelector=0x4004ab30)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/collect
ions/Collection.m:202
#14 0x40040ee2 in _i_EZGraph__step (self=0x827f678, _cmd=0x80680f0)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/analysi
---Type <return> to continue, or q <return>
to quit---
s/EZGraph.m:503
#15 0x08050fc8 in _i_ObserverSwarm___update_ (self=0x816ec08,
_cmd=0x8068160)
at ObserverSwarm.m:520
#16 0x4001befb in L10 () from /usr/lib/swarm/libswarm.so.0
#17 0x4020e0b0 in objc_call (fa=0x829f780)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/defobj/_fcall.m:185
#18 0x401fcf42 in _i_FCall_c__performCall (self=0x82a0068, _cmd=0x401afc00)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/defobj/FCall.m:735
#19 0x4019b08b in _i_ActionTo_c___performAction__ (self=0x829f738,
_cmd=0x401b4b98, anActivity=0x82a53f0)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/activity/Action.m:309
#20 0x401a55ab in _i_Activity_c___run_ (self=0x82a53f0, _cmd=0x401b4b70)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/activity/XActivity.m:243
#21 0x401a545c in _i_Activity_c___run_ (self=0x82a5890, _cmd=0x401b4b70)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/activity/XActivity.m:193
#22 0x401a545c in _i_Activity_c___run_ (self=0x82a5970, _cmd=0x401b4b70)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/activity/XActivity.m:193
#23 0x401a545c in _i_Activity_c___run_ (self=0x82a5b80, _cmd=0x401b4b70)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/activity/XActivity.m:193
#24 0x401a545c in _i_Activity_c___run_ (self=0x82a3ec8, _cmd=0x401b4af8)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/activity/XActivity.m:193
#25 0x401a51dc in _i_Activity_c__run (self=0x82a3ec8, _cmd=0x4006b218)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/activity/XActivity.m:79
#26 0x4005caca in _i_ControlPanel__startInActivity_ (self=0x81ad820,
_cmd=0x4006ba60, activityID=0x82a3ec8)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/simtoolsgui/ControlPanel.m:80
#27 0x4005d574 in _i_GUISwarm__go (self=0x816ec08, _cmd=0x8066050)
at
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.133.20020318/src/simtoolsgui/GUISwarm.m:56
#28 0x08049eb7 in main (argc=1, argv=0xbfffdad4) at main.m:71
#29 0x40703627 in __libc_start_main (main=0x8049cd0 <main>, argc=1,
ubp_av=0xbfffdad4, init=0x8049864 <_init>, fini=0x805bffc <_fini>,
rtld_fini=0x4000dcc4 <_dl_fini>, stack_end=0xbfffdacc)
at ../sysdeps/generic/libc-start.c:129
If the dual usage of GUI and hdf5 file output did not work at all, then
I would blame code in EZGraph's
-createGraphSequence:forSequence:withFeedFrom:andSelector
method, because it looks to me like, in that method, the thing
"aGrapher" gets created twice if (graphics) and (hdf5container) are both
true.
But if this were the problem, I would get the crash with EZGraph all the
time when I try both GUI and hdf5, but in fact I see it only with
setUnsignedArg:....
So, I'm open to suggestions
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ku.edu/~pauljohn
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66045 FAX: (785) 864-5700
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
- EZGraph problem,
Paul Johnson <=