browserquest / BrowserQuest

Continuing the development of Mozilla BrowserQuest
http://browserquest.herokuapp.com
Other
445 stars 219 forks source link

Map Exporter Fails on Linux #19

Closed dylenbrandon closed 11 years ago

dylenbrandon commented 12 years ago

Map exporter fails on both Ubuntu 12.04 x64 Desktop and Server editions. Others have reported failed exports on Fedora 16 x86_64. Map exports successfully on MacOSX.

./export.py Killed

undefined:0

^ SyntaxError: Unexpected end of input at Object.parse (native) at /home/drivera/BrowserQuest/tools/maps/exportmap.js:58:27 at fs.readFile (fs.js:176:14) at Object.oncomplete (fs.js:297:15)

sh: 1: growlnotify: not found

dylenbrandon commented 12 years ago

I found some developers talking about a similar problem. One suggested this

"Ah, I notice you are using JSON.parse without a try catch. This is very unsafe. JSON parse is blocking and will thus throw when something goes wrong (eg. invalid input). Code changes have been made. A try/catch has been added around JSON.parse. If a problem occurs while parsing a JSON string it will be emitted as an error event."

The other user reported that this solved the issue. Someone take a crack at it? :]

lzbk commented 11 years ago

Succesfully exported maps on linux mint 11 (based on ubuntu 11.10), without doing anything special… Not a very helpful comment in that I have no idea why it works here and not on your computer, but maybe someone can make something of this…

lzbk commented 11 years ago

Has anyone had the same problem since we are using the tiled JSON export ? If not, we should close this bug…

Aaron1011 commented 11 years ago

I can confirm that there are no problems on Ubuntu 13.04 64 bit.

lzbk commented 11 years ago

I'm closing this bug, I can always reopen it if someone provides another evidence…