I'm writing an application that utilizes the XMLSocket object, and the XML / XMLNode objects. It's getting to the point where there is allot of code building / parsing XML some very simple Messages. It seems that once I've passed a certain threshhold of building/sending, then a-synchronously recieving/parsing about 2 xml messages, FMS2 will crash when the application is reloaded. It will work fine the first time the app instance is run after a server restart, but if the app instance ends (via connections dropping, or via application.shutdown()) the next time the app is run, there seems to be a 70% chance that FMS2 will crash. After looking at the core log file, I get this error every time FMS crashes: 2005-11-28 18:12:11 5060 (e)2581279 Assert failed in \server\js\jsXML.cpp line 1523 - Sometimes this error only shows up once, but sometimes it shows up several times in a row (a few seconds apart). A look at the crash dump file lead me to this file path for the problematic source file: c:\flashfarm\depot\branches\FlashCom_Edison\main\tincan\server\js\jsXML.cpp I've tried to narrow down in my code exactly what is invoking this, but since it happens at random times throughout my code (I put traces all over to see where it stops), I can't find it. It's also not really doing anything tricky with XML right now, so that adds to the confusion. If I stop it after it only recieves 1 XML response, then I don't ever seem to run into the issue, but once I've sent / recieved 2 or more messages, the crash is inevitable, albiet it will come at a random time. The one thing I can think of that I'm doing that might be a little out of the ordinary is extending the XML and XMLNode objects to give me an easy way to get a child node by name or name / attribute values. It's very simple though. Here it is (the dots at the begnining of some lines are used to make it more readable on this website... they're not actually in the code): // Extend the XML & XMLNode objects to return a childnode by name, or undefined if the node doesn't exist. // The second & third optional parameters will only return the node if the named attribute / value // combo are also found in the node. XML.prototype.getChildNode = XMLNode.prototype.getChildNode = function(sNodeName, sAttributeName, sAttributeValue) { ....if (this.hasChildNodes) { ........for(var x = 0; x < this.childNodes.length; x++) { ............if (this.childNodes[x].nodeName == sNodeName) { ................if (sAttributeName != null && sAttributeValue != null) { ....................if (this.childNodes[x].attributes[sAttributeName] == sAttributeValue) { ........................return this.childNodes[x]; ....................} ................} else { ....................return this.childNodes[x]; ................} ............} ........} ....} ....// The requested node was not found. Return undefined: ....return undefined; } Sorry for the long post, but this crash, from what I can tell, seems to be a problem in FMS2, and not my code. If anyone knows how to get in touch with Macromedia on bugs like this (I don't know if they read these boards), or if anyone has any ideas on this or has run into the same things, please let me know. If someone from Macromedia could please look at the following cpp file on line 1523: c:\flashfarm\depot\branches\FlashCom_Edison\main\tincan\server\js\jsXML.cpp Please let me know what this might be. I'll understand if it's something that can't be fixed until a later release, but if you could give me a hint as to what I might be able to avoid using in my code in order to avoid this, I'd greatly appreciate it! Thanks, -Bryan
Sorry, forgot to note. The crash alert shows the following: FMSCore.exe - Application Error The instruction at "0x0051d504" referenced memory at "0x0074065". The memory could not be "written". Upon disasembling FMSCore.exe, I found the following line of assembly was causing the error: 0051D504 mov dword ptr [esi+4],edi I have the dump file if macromedia would like it to find out what method was being invoked...
Don't see what you're looking for? Try a search.
|