naurril / SUSTechPOINTS

3D Point Cloud Annotation Platform for Autonomous Driving
GNU General Public License v3.0
783 stars 206 forks source link

rarely could not save a valid json file #155

Open Wata-Brian opened 1 year ago

Wata-Brian commented 1 year ago

hi I'm using sustech very well But lately some errors have occurred after working label job, Json file was rarely saved wrong format. (for example) [ { "obj_id": "1", "obj_type": "Pedestrian", "psr": { "position": { "x": 16.149415411283627, "y": -2.974860096210354, "z": 0.7953080968026437 }, "rotation": { "x": 0, "y": 0, "z": 2.0333085785733944 }, "scale": { "x": 0.43052559103131166, "y": 0.5166047666881702, "z": 1.817102633161171 } } } ]] << save more"]" or "}]" last row in file : }]}] or }]]

I don't understand why json file was saved this pattern

and if json file was saved this pattern, when loading the file, an error occured. stop webpage and cannot move another frame

Do you have any idea about this problem?

naurril commented 1 year ago

could be caused by the multi-threading handling of events of cherrypy. try not operate the same frame/scene by multipler users, and increase the save-delay time (500ms by default) in save.js. For a complete solution, a file writing sync mechanism is needed.