Topic: Error: Text node cannot appear in this state. Line 1, position 1.

Hi,

I have a problem when working with osm requests.

I am sending for the users location a request with specific osm key/value pairs  in the area of ~1x1km. Also I am sending the same request for neighbor areas.

I am processing the response in the OnComplete() function in a thread for each request.

When moving very fast the location of the player, it happens that I get the following unity message:

Error: Text node cannot appear in this state. Line 1, position 1.

But I cannot see where it happens (usually I can double click to see the line of code, but in this case it doesn't work.)

I then have the problem, that no information is gathered for this area.

Does anyone know what this is about?

Post's attachments

Attachment icon 2016-03-17_16h17_48.png 520.41 kb, 118 downloads since 2016-03-17 

Re: Error: Text node cannot appear in this state. Line 1, position 1.

Hello.

Use a try ... catch, to exactly find a place where is a problem.
https://msdn.microsoft.com/en-us/library/0yd65esw.aspx
When you find the place of the error, please send the full path of an error (stack trace) and the response string that you get in OnComplete.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Error: Text node cannot appear in this state. Line 1, position 1.

Hello,

I am getting the same error messages. It does not only affect my own osm calls though, but also the built-in buildings. If the error message is called, they won't load.
Furthermore I can access where the error occurs:

Text node cannot appear in this state.  Line 1, position 1.
UnityEngine.Debug:Log(Object)
OnlineMapsXML:Load(String) (at Assets/Infinity Code/Online maps/Scripts/XML/OnlineMapsXML.cs:648)
OnlineMapsOSMAPIQuery:ParseOSMResponse(String, Dictionary`2&, List`1&, List`1&) (at Assets/Infinity Code/Online maps/Scripts/GoogleAPI/OnlineMapsOSMAPIQuery.cs:95)
<OnBuildingRequestComplete>c__AnonStorey37:<>m__28() (at Assets/Infinity Code/Online maps/Scripts/Plugins/Buildings/OnlineMapsBuildings.cs:207)
OnlineMapsThreadManager:StartNextAction() (at Assets/Infinity Code/Online maps/Scripts/OnlineMapsThreadManager.cs:77)

Text node cannot appear in this state.  Line 1, position 1.
UnityEngine.Debug:Log(Object)
OnlineMapsXML:Load(String) (at Assets/Infinity Code/Online maps/Scripts/XML/OnlineMapsXML.cs:648)
OnlineMapsOSMAPIQuery:ParseOSMResponse(String, List`1&, List`1&, List`1&) (at Assets/Infinity Code/Online maps/Scripts/GoogleAPI/OnlineMapsOSMAPIQuery.cs:65)
Marker3DController:OnCompleteData(String) (at Assets/scripts/mapping/Marker3DController.cs:260)
OnlineMapsGoogleAPIQuery:CheckComplete() (at Assets/Infinity Code/Online maps/Scripts/GoogleAPI/OnlineMapsGoogleAPIQuery.cs:86)
OnlineMaps:CheckGoogleAPIQuery() (at Assets/Infinity Code/Online maps/Scripts/OnlineMaps.cs:949)
OnlineMaps:Update() (at Assets/Infinity Code/Online maps/Scripts/OnlineMaps.cs:1780)

The reason seems to be the OSM response "429 Too Many Requests" and it only happens occasionally in the beginning or when the map moves to fast and new data is loaded to often/quickly.
I can react to that in my own OnCompleteData Method and resend my requests, but the issue with your buildings stays, they just won't appear until I move the map by a certain amount. Is there any way I can ensure the buildings will reload in case of this error getting caught without moving the map?

Re: Error: Text node cannot appear in this state. Line 1, position 1.

Hello.

Thank you for reporting an issue.
We will fix it within 24 hours.
New (fixed) version will be available through the built-in update system.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Error: Text node cannot appear in this state. Line 1, position 1.

Thanks for the awesome support smile

Re: Error: Text node cannot appear in this state. Line 1, position 1.

Hello.

The problem is fixed.
The new version is already available through the built-in update system.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.