maproulette / maproulette/maproulette-backend
/tasks API causes SO
Open
Nobody has claimed this yet.
BACKLOG
- Dominant language
- Scala
- Stars
- 53
- Forks
- 39
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 12
Description
posting the following to /api/v2/tasks causes a SO:
[
{
"name": "1-2-3",
"parent": 1462,
"identifier": "1-2-3",
"instruction": "",
"status": 0,
"geometries": {
"type":"FeatureCollection",
"features":[
{"type":"Feature",
"geometry":
{
"type":"Point",
"coordinates":[-92.67,38.106509010989]
},
"properties":
{
"title": "Probable rouadabout",
"identifier": "1991"
}
}
]
}
}
]
console:
java.lang.StackOverflowError
at play.api.libs.json.Json$.fromJson(Json.scala:125)
at org.maproulette.models.Task$TaskFormat$.reads(Task.scala:93)
at play.api.libs.json.Json$.fromJson(Json.scala:125)
at org.maproulette.models.Task$TaskFormat$.reads(Task.scala:93)
at play.api.libs.json.Json$.fromJson(Json.scala:125)
at org.maproulette.models.Task$TaskFormat$.reads(Task.scala:93)
at play.api.libs.json.Json$.fromJson(Json.scala:125)
at org.maproulette.models.Task$TaskFormat$.reads(Task.scala:93)
at play.api.libs.json.Json$.fromJson(Json.scala:125)
at org.maproulette.models.Task$TaskFormat$.reads(Task.scala:93)
at play.api.libs.json.Json$.fromJson(Json.scala:125)
at org.maproulette.models.Task$TaskFormat$.reads(Task.scala:93)
at play.api.libs.json.Json$.fromJson(Json.scala:125)
at org.maproulette.models.Task$TaskFormat$.reads(Task.scala:93)
at play.api.libs.json.Json$.fromJson(Json.scala:125)
at org.maproulette.models.Task$TaskFormat$.reads(Task.scala:93)
at play.api.libs.json.Json$.fromJson(Json.scala:125)
at org.maproulette.models.Task$TaskFormat$.reads(Task.scala:93)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the POST to /api/v2/tasks with the JSON payload and inspect Task.scala around line 93, where the stack trace repeatedly enters Task$TaskFormat$.reads. Trace the recursive JSON parsing and add or update a focused test for this request. Done means the request no longer produces a java.lang.StackOverflowError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100