code logs -> 2006 -> Sat, 07 Oct 2006< code.20061006.log - code.20061008.log >
--- Log opened Sat Oct 07 00:00:51 2006
00:16 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #code
00:17 ReivSTUFF is now known as ReivAuckland
00:24 Mahal is now known as MahalBake
01:16 MahalBake is now known as Mahal
01:50 Thaqui is now known as ThaquiCook
03:05 Janus is now known as Jan[bathipoo]
03:30 Netsplit Troika.TX.US.Nightstar.Net <-> DeepThought.NY.US.Nightstar.Net quits: ThaquiCook, EvilSLEPLord, ReivAuckland, @MahalPC, @ToxicFrog, GeoTube, @ToxicFrog|Lab, @Vornicus-Latens, @Mahal, @McMartin, (+1 more, use /NETSPLIT to show all of them)
03:31 Netsplit over, joins: Vornicus-Latens, ReivAuckland, McMartin, Ev3, Mahal, ToxicFrog, ToxicFrog|Lab, MahalPC, GeoTube, ThaquiCook (+1 more)
03:31 ServerMode/#Code [+v Ev3] by DeepThought.NY.US.Nightstar.Net
03:31 mode/#code [+o Chalain] by ChanServ
03:31 mode/#code [+o jerith] by ChanServ
03:31 mode/#code [+o Pi] by ChanServ
03:31 mode/#code [-o TheWatcher[zZzZ]] by ChanServ
03:33 Netsplit DeepThought.NY.US.Nightstar.Net <-> Blargh.CA.US.Nightstar.Net quits: +Ev3, EvilSLEPLord, Mahal, MahalPC, ReivAuckland
03:33 ToxicFrog|Lab [~ToxicFrog@Admin.Nightstar.Net] has quit [Operation timed out]
03:33 ToxicFrog|Lab [~ToxicFrog@Nightstar-2174.cpe.net.cable.rogers.com] has joined #code
03:33 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has quit [Operation timed out]
03:33 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
03:33 mode/#code [+o ToxicFrog] by ChanServ
03:33 Netsplit over, joins: ReivAuckland, +Ev3, Mahal, MahalPC, EvilSLEPLord
03:34 mode/#code [+o Mahal] by ChanServ
03:49 Jan[bathipoo] is now known as Janus
03:59 Lynzii [~lynzii@Nightstar-18544.home1.cgocable.net] has joined #Code
04:21 ThaquiCook is now known as ThaquiAWAAAAAAY
05:11 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: anonymous presence]
05:18 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #code
05:19
< Janus>
odd...
05:22
< Janus>
I've set up four objects to test the linked list... They're all carbon copies of eachother, and everything, but... very different things happen with each one.
05:26
< Janus>
Cut any combination of the other three out, and it'll still act as it would with them there, even if they're rearranged. And the single one difference between them is 'image2' and 'image3'...
05:26
< McMartin>
What is inside the linked list?
05:27
< McMartin>
And does your linked list special-case empty, one element, and two elements?
05:28
< Janus>
The list only has one element in it prior to this. Outside of that, I'm not quite sure what those terms mean. (?)
05:29
< GeoTube>
Indeed
05:30
< Janus>
Hold on... Alright, I just found something else out.
05:31
< Janus>
Apparently, when you declare the objects like such: "Foo bar1, bar2, bar3, bar4;" bar1 won't work, yet bar4 will...
05:32
< Janus>
Which makes absolutely no sence at all!
05:34
< McMartin>
Um
05:34
< McMartin>
What does the argument-free constructor do?
05:34
< GeoTube>
not argue with you?
05:34 * GeoTube ducks.
05:36
< Janus>
It sets a few private defaults, there's no globals, functions, or innocent bystanders involved.
05:42
< Janus>
The behavior, if it might help, goes like this, in order of first to last (declared): Crashes hard, Crashes not-so-hard, works fine, ditto the last one.
05:43
< GeoTube>
Well, at least it's more stable than windows 95...
05:44
< McMartin>
Run it in a debugger, see where the crash is.
05:46
< Janus>
This is where the debugger ironically *'s on my cake; when I run it, it still bugs out, but it won't Seg Fault.
05:47
< McMartin>
"bugs out"?
05:47
< McMartin>
This sounds like it's trying to access memory that isn't being initialized
05:50
< Janus>
... apparently, debug was acting like it was running a different program because it probably was. Rebuild should have a bigger icon, and preferably flashing red too.
05:50 * Janus oopsies~
05:51
< GeoTube>
...!
05:55
< Janus>
It faults... when those objects from earlier attempt to access a function from one of their pointer members later in the program. But that still doesn't explain how the order they were declared in would cause any problems, since they won't do anything asside from set their defaults unless you add thier pointers to the linked list.
05:56
< GeoTube>
..Indeed...
05:58
< McMartin>
What is that member value?
05:58
< McMartin>
You aren't deliberately dereferencing NULL, are you?
05:58 * Janus can only describe this frustration as having your arms replaced with flippers, and your only means of communicating is via a Light Bright.
05:59 * Janus isn't a masochist~
06:00
< Janus>
I've heard of folks doing just that, but I can't think of any reason to.
06:01
< Janus>
Oh, wait, you mean using the asterisk on it...?
06:02 * Janus should, uh, really have learned these words by now.
06:03
< GeoTube>
*wrods
06:03
< McMartin>
Doing *a or a->whatever when a is NULL will crash your system.
06:03
< McMartin>
Both of those are dereferences.
06:05
< Janus>
That might be the problem. But, the objects are all given the same exact address to point to... so I can't imagine where they would get differing addresses.
06:07
< Janus>
Oh... this is turning into quite the hassle, and it's probably something very simple I've overlooked..
06:07 * McMartin is in the middle of something. If you can toss up a code sample, though...
06:27 Mahal is now known as ColitisatMahals
06:32
< Janus>
It's quite a testiment of just how bad my style and documentation is, if you'd still like to see it~ http://rafb.net/paste/results/gu79rh29.html
06:33
< McMartin>
And the crash is in the declaration?
06:33 * Janus notes how he forgot to correct the 'image7' back to 'image2' before copying.
06:34
< Janus>
No, the segmentation occurs at the very bottem, though it only occurs based on how it's declared.
06:35
< McMartin>
... where is render called?
06:35
< McMartin>
And what is the value of neo_index[n]
06:35
< McMartin>
?
06:36
< Janus>
It's called in the same function as those declarations are. Would you like that pasted out as well..?
06:36
< McMartin>
I want the whole source if at all possible
06:36
< McMartin>
(You may be keeping those pointers around after the object has been destroyed.)
06:37
< McMartin>
My idea, you see, was to try to compile it here and then see if I could tear apart the crash-state to see where and why it's dying
06:40
< Janus>
Can you do that without all the image files and headers..?
06:40
< McMartin>
I'll need the headers.
06:40
< McMartin>
How big are the images?
06:40
< McMartin>
At least the five you're testing
06:43
< Janus>
Well... the one's used by the test landscape are about 1200 x 1000 .png, same goes for the two accompaning grey scales, and the sprite sheets are roughly 500 by1800 .gif. I'm not quite sure what that means in MB though without looking it up.
06:44
< McMartin>
OK, let's just try this remotely, I guess
06:44
< McMartin>
Is it actually getting into the _get_image() routine?
06:44
< McMartin>
Er. _get_layer
06:44
< McMartin>
Or is it crashing in the if statement itself?
06:44
< Janus>
No, it's hung up on calling it.
06:45
< McMartin>
Print out neo_index[n] before the call.
06:45
< McMartin>
printf ("%d: %p\n", n, neo_index[n]);
06:45
< Janus>
It probably got scrambled in the quicksort function...
06:46
< McMartin>
We haven't even confirmed it's scrambled yet.
06:50
< Janus>
"0: 0023FCA0" (?)
06:51
< Janus>
It's not pointing at NULL at anyrate.
06:55
< McMartin>
Does it put a (?) after it?
06:55
< McMartin>
...
06:55
< McMartin>
Oh.
06:55
< McMartin>
Are you setting the unused members of the list to NULL before sorting?
06:56
< Janus>
Hey, that's pretty useful~ Also, the first element of the list has the correct address. Now just to check the others. The pointers are set to NULL on the loose end of the list, yes.
07:02
< Janus>
Hmm.. they all check out, except for the very last element of the list, which is neo_index[4]. It's not that the address is wrong, but rather that the array goes out of bounds at [4].
07:04
< McMartin>
You've got an off-by-one error in either your allocation of neo_index or in your loop, then.
07:04
< McMartin>
Four elements, or five?
07:06
< Janus>
There are 5 elements, so the last one must have been clothes lined somewhere along the way.
07:08
< McMartin>
What is the value of "population"?
07:08
< McMartin>
Also, the "if n < population" check in the first loop is redundant
07:10
< Janus>
Population is set to 1 in the initialization function, as one object is stored into the list. It then increments per added member, so it would be 5 now.
07:10
< McMartin>
*is* it?
07:10
< McMartin>
Print it out.
07:11
< Janus>
Yep, it's 5 alright.
07:12
< McMartin>
All right.
07:12
< McMartin>
Was it 5 when neo_index was defined?
07:12
< McMartin>
Because if so, you shouldn't be walking off the end.
07:13
< Janus>
It was 5 there as well.
07:14
< McMartin>
Then you aren't walking off the end.
07:14
< McMartin>
And neo_index[4] looks roughly similar to the other ones?
07:15 Lynzii [~lynzii@Nightstar-18544.home1.cgocable.net] has quit [Connection reset by peer]
07:15
< Janus>
Yes, there's nothing different between them that would set them apart.
07:16
< Janus>
Sorry to cut and run, but I've got to go to the store, then bed. Thank you for all the help Mr. Martin~
07:18 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: Jouets de Dieu, jouets de jouets, et les jouets de me, fait naĆ®tre Clair voire.]
07:30 GeoTube [~Someone@Nightstar-2676.cable.ubr01.dund.blueyonder.co.uk] has quit [Client exited]
07:31 GeoTube [~Someone@Nightstar-2676.cable.ubr01.dund.blueyonder.co.uk] has joined #Code
08:14 GeoTube [~Someone@Nightstar-2676.cable.ubr01.dund.blueyonder.co.uk] has quit [Quit: ]
10:12 * jerith sneaks in.
10:48 You're now known as TheWatcher
11:46 ColitisatMahals is now known as Mahal
12:07 Mahal is now known as MahalZzz
12:16 EvilSLEPLord is now known as EvilDarkLord
12:26 ThaquiAWAAAAAAY is now known as Thaqui
13:03 Thaqui is now known as ThaquiSleep
13:13 You're now known as TheWatcher[afk]
14:27 You're now known as TheWatcher
17:26 You're now known as TheWatcher[afk]
18:33 You're now known as TheWatcher
18:48 mode/#code [+o TheWatcher] by ChanServ
19:09 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has joined #code
19:14 ThaquiSleep [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has quit [Ping Timeout]
19:18 ThaquiSleep [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has joined #code
20:29 ThaquiSleep [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has quit [Ping Timeout]
20:31 ThaquiSleep [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has joined #code
20:46 MahalZzz is now known as Mahal
21:13 Mahal is now known as MahalAFK
21:17 ThaquiSleep [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has quit [Ping Timeout]
21:18 ThaquiSleep [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has joined #code
21:23 ThaquiSleep [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has quit [Ping Timeout]
21:24 ThaquiSleep [~Thaqui@Nightstar-8486.adsl.xtra.co.nz] has joined #code
21:40 Janus [~Cerulean@Nightstar-10302.columbus.res.rr.com] has quit [Quit: 7% (!)]
22:27 ThaquiSleep is now known as Thaqui
22:43 MahalAFK is now known as Mahal
23:11 Thaqui is now known as ThaquiWork
23:31 EvilDarkLord is now known as EvilNightLord
23:52 You're now known as TheWatcher[T-2]
23:57 You're now known as TheWatcher[zZzZ]
--- Log closed Sun Oct 08 00:00:51 2006
code logs -> 2006 -> Sat, 07 Oct 2006< code.20061006.log - code.20061008.log >