View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003957 | Multi Theft Auto : San Andreas | Scripting | public | 2008-12-29 10:21 | 2010-03-21 11:34 |
Reporter | erorr404 | Assigned To | mabako | ||
Priority | normal | Severity | minor | Reproducibility | random |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | 1.0.4 | Fixed in Version | 1.0.4 | ||
Summary | 0003957: XML functions sometimes return bad root node | ||||
Description | Willy and I have experienced a bug where the root node of an XML file returned by xmlLoadFile() is bogus, and we cannot use it to get any data from the XML file. When we get the address of the node using tostring(rootNode) we get the value: FFFFFFFF. The code is correct because the function returns a node rather than false. It works for a while and then messes up despite no changes being made to the file or the code. This has happened to Willy in DP2 in a server-side script, and to me in the latest nightly build (12/28/08) in a client-side script, which indicates that this bug has exited for a long time and is both in the server and client. I had the restart the client to get rid of the problem (restarting the resource or reconnecting wouldn't fix it). | ||||
Steps To Reproduce | I reproduced this bug by repeatedly accessing the file using xmlLoadFile(). After a number of accesses, it wouldn't get a attributes from the subnodes, and on all subsequent attempts it wouldn't access any subnodes. I didn't unload the XML file before loading it again. Then I tried unloading it after every use, and I can no longer reproduce the the bug.. so it might be related to loading a file multiple times without ever unloading it. | ||||
Tags | No tags attached. | ||||
|
This bug is still alive and well. I tried in r272 with and without the resource parameter and it didn't work. |
|
Yes, this is when you load a file more than once. I've always noticed it. |
|
It wasn't for me... it was the first time the file was loaded. |
|
Still there? |
|
The problem occurs when more than 100000 nodes are allocated - It runs out of ID's. |
|
Maximum number of XML elements is indeed set on 100000. sdk/Common.h #define MAX_XML 100000 We could increase this number and/or provide a check if this number is exceeded. |
|
http://github.com/marcusbauer/multitheftauto/commit/f233c2b2d63b80bb4b1529a47814ac240c847193 |
|
Fixed in: |