Hi there,
first since this is my first post, I really appreciate everything going on with irrlicht. Of course I downloaded 0.6 yesterday and started playing with it (Especially with the meshviewer) right away.
Then I figured out when I modified the config.xml file that the program froze. (Debugging revealed it never finds the way out of the
while(xml && xml->read())
{
}
loop).
I also realized that the size of the modified config.xml is smaller (half to be excact). When I looked at the binary filecontens (using hexworkshop)
I could see immedeatly why, -> in the original config.xml there is a '0' byte
after every character, and that is gone in the modified one, probably by saving the file (with VC.net).
Conclusion: without the '0' characters it's not working, but I think they are not ok if any xml editor removes them.
I havn't checked the XML Reader code yet, and I think you guys can do this much better than me. But somewhere there you have a problem (maybe by writing and reading a 16bit instead if 8bit, or something like that).
Anyway I hope you can fix that soon, because I (and I think I'm not alone) like the XML feature a lot.
best regards
Klaus
bug in 0.6 with config.xml
-
- Posts: 118
- Joined: Thu Sep 18, 2003 10:05 pm
- Location: switzerland
hi, i had some problems with the xmlreader.
this is what if done to resolve the problem. i don't know if this is a good way, but anyhow. the problem i had was that the xmlreader didn't terminate. because for some reason or the other? don't know why, xml->read() always returned true.
so i first did what was suggested in the thread about "segfault" in "Bug reports"
and since that didn't work for me either, i guess larger wchar_t is really a unix specialty i changed the cmlreader a little bit.
CXMLReader.h
1 ) make "parseCurrentNode()" return a boolean value
2 ) "read()" must return the value from parseCurrentNode()
3 ) change CXMLReader::parseCurrentNode()
these changes work for me but i only work with ascii files
hope that help some other desperate xml fans
cheers
tom
this is what if done to resolve the problem. i don't know if this is a good way, but anyhow. the problem i had was that the xmlreader didn't terminate. because for some reason or the other? don't know why, xml->read() always returned true.
so i first did what was suggested in the thread about "segfault" in "Bug reports"
and since that didn't work for me either, i guess larger wchar_t is really a unix specialty i changed the cmlreader a little bit.
CXMLReader.h
1 ) make "parseCurrentNode()" return a boolean value
2 ) "read()" must return the value from parseCurrentNode()
Code: Select all
bool CXMLReader::read()
{
if ((u32)(P - TextBegin) < TextSize - 1)
{
return parseCurrentNode();
}
return false;
}
Code: Select all
bool CXMLReader::parseCurrentNode()
{
wchar_t* start = P;
while(*P != L'<' && *P && ( (u32)(P - TextBegin) < TextSize - 1 ) ) ++P;
if (!*P)
{
os::Printer::print("CXMLReader::parseCurrentNode() bail out!");
return false;
}
if (P - start > 2)
{
// we found some text
setText(start, P);
--P;
return true;
}
++P;
switch(*P)
{
case L'/':
parseClosingXMLElement(); break;
case L'?':
ignoreDefinition(); break;
case L'!':
parseComment(); break;
default:
parseOpeningXMLElement(); break;
}
return true;
}
hope that help some other desperate xml fans
cheers
tom
xml error
Hi,
I had the same problem with my xml file ( i think it's the same).
Try saving it as simple unicode format (open with notepad and save it again as unicode). It worked for me.
I had the same problem with my xml file ( i think it's the same).
Try saving it as simple unicode format (open with notepad and save it again as unicode). It worked for me.
-
- Posts: 118
- Joined: Thu Sep 18, 2003 10:05 pm
- Location: switzerland
Saving as Unicode in Visual Studio ?
I work with MSVC++ 6 (educ. Version) and there it seems that you can't save as unicode.
In the Help File you can find that special libraries support unicode, but i could not find any information for saving as unicode .
In the Help File you can find that special libraries support unicode, but i could not find any information for saving as unicode .