[irr 1.2] [Fixed] Listspointers

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Strong99
Admin
Posts: 687
Joined: Fri Mar 31, 2006 7:06 pm
Location: Netherlands
Contact:

[irr 1.2] [Fixed] Listspointers

Post by Strong99 »

I have an bug, list1 = list2 doesn't work, the code gives an error in the clear function, the list are the sametype and it doens;t matter if list1 is empty or filled before the =.
Last edited by Strong99 on Sat Mar 24, 2007 8:13 pm, edited 2 times in total.
Strong99
Admin
Posts: 687
Joined: Fri Mar 31, 2006 7:06 pm
Location: Netherlands
Contact:

Post by Strong99 »

i use an own made class

named lod.

irr::core::list<CLod*> list1;

some push backs follow readed from file

than

irr::core::list<CLod*>list2 = list1;

And the error occurs in clear... but why? using clear is ok. But why an error when we use = ? even ::Iterator i = list1.begin() crashes
Strong99
Admin
Posts: 687
Joined: Fri Mar 31, 2006 7:06 pm
Location: Netherlands
Contact:

Post by Strong99 »

i found examples from Irrlicht 1.1 and 1.0 over list1 = list2 seemd to work there whats wrong? even those examples stopt working on irr 1.2
Strong99
Admin
Posts: 687
Joined: Fri Mar 31, 2006 7:06 pm
Location: Netherlands
Contact:

Post by Strong99 »

hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

That's no bug fix for your problem, because 1.2 introduced the copy constructor for lists which apparently introduced a bug for you. Maybe I should also make list test cases... Right now I don't know if there's an error in list.
Strong99
Admin
Posts: 687
Joined: Fri Mar 31, 2006 7:06 pm
Location: Netherlands
Contact:

Post by Strong99 »

k thnx
juantar
Posts: 9
Joined: Mon Apr 10, 2006 4:02 pm

Post by juantar »

I get the same problem with the list's copy constructor. By debugging I found out that my program crashes in these lines:

void clear()
{
SKListNode* node = root;
while(node)
{
SKListNode* next = node->next;
delete node;
node = next;
}

root = 0;
last = 0;
size = 0;
}
root happens to have a junk value (non-initialized). I fixed my copy of irrlist.h as this (http://irrlicht.sourceforge.net/phpBB2/ ... sc&start=0 ) post said and it worked.
--------------------------------------------------------
juantar
tarpri.com
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

But that had been fixed some time ago :shock:
Post Reply