Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash while trying to load a SUMO XML file using the "ParseXML" option #4

Closed
akrishnamachar1 opened this issue Feb 4, 2019 · 1 comment

Comments

@akrishnamachar1
Copy link

akrishnamachar1 commented Feb 4, 2019

Hi, I was able to compile and open the editor on my Ubuntu 16.04 computer, however when I try to use the "ParseXML" option in the editor to select and load any SUMO XML file, the editor immediately crashes. I have tried this for both the provided SUMO XML files as well as ones that I generated on my own.

I've included the crash log for reference - it looks like something is triggering an Array index out of bounds error, but I'm not sure where in the code it's being caused.

SumoToUnreal.log

As an aside, I had to make one small change to the code in order to get it to compile on my computer. I was getting a TCHAR* error from Sources/Plugins/ParseXML/Source/ParseXML/fileParser.cpp, so I fixed it by adjusting the UfileParser::loadxml() function as follows (I would have opened new branch/pull request to fix this, but I don't have write permission on this repository):

bool UfileParser::loadxml()
{
	UE_LOG(LogEngine, Warning, TEXT("Loading started"));
	FText outError;
	int32 outErrorNum;
        FString Text = "";
        bool success = FFastXml::ParseXmlFile((IFastXmlCallback*)(this), selectedXMLFile.GetCharArray().GetData(),
                                          (TCHAR*)*Text, nullptr, false, false, outError, outErrorNum);
	return success;
}
@akrishnamachar1 akrishnamachar1 changed the title Crash while trying to a SUMO XML file using the "ParseXML" option Crash while trying to load a SUMO XML file using the "ParseXML" option Feb 4, 2019
@ishaan95
Copy link
Contributor

Hi,
Please pull the latest version of the repository. It should work now.

In the ParseXML.cpp file, PluginButtonClicked() function, a TArray was not being copied on ubuntu which led to incorrect indexing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants