On Mon, 24 Jan 2000, Vadim Chekan wrote:
> No, ith shouldn't.
> On create
> Dictionary::Dictionary()
> {
> init(101, 10.0f);
> }
>
> Dictionary::init(int initialCapacity, float loadFactor)
> {
> ...
> tableLength = initialCapacity;
>
> May be you'll be able to check if it's ok on start doing something like
> this:
> gdb htdig
> break main
> run
> print config.dcGlobalVars.tableLength
> cont
Did this:
(gdb) break main
Breakpoint 1 at 0x34544: file ../htlib/Object.h, line 30.
(gdb) run
Starting program: /opt/htdig/htdig32/bin/htdig
warning: Unable to find __d_pid symbol in object file.
warning: Suggest linking with /opt/langtools/lib/end.o.
warning: GDB will be unable to track shl_load/shl_unload calls
Breakpoint 1, main (ac=1, av=0x7b03a474) at ../htlib/Object.h:30
30 Object() {}
(gdb) print config.dcGlobalVars.tableLength
$1 = 539787264
(gdb)
Aha! tableLength isn't 0! But WHY is tableLength 0 when htdig
wants to calculate index?
Program received signal SIGFPE, Arithmetic exception.
0x7ae5f88c in () from /opt/htdig/htdig32/lib/libht-3.2.0.sl
(gdb) print config.dcGlobalVars.tableLength
$2 = 539787264
(gdb) up
#1 0x7ae660dc in Dictionary::Add (this=0x7ad6ef3c, name=@0x7b03b100,
obj=0x40008a50) at Dictionary.cc:198
198 int index = hash % tableLength;
(gdb) print tableLength
$3 = 0
(gdb)
--jesse
--------------------------------------------------------------------
J. op den Brouw Johanna Westerdijkplein 75
Haagse Hogeschool 2521 EN DEN HAAG
Sector Techniek Netherlands
Afdeling Elektrotechniek +31 70 4458936
-------------------- [EMAIL PROTECTED] --------------------
Linux - because reboots are for hardware changes
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED]
You will receive a message to confirm this.