mapbox / mapbox-studio-classic

https://www.mapbox.com/mapbox-studio/
BSD 3-Clause "New" or "Revised" License
1.14k stars 229 forks source link

Application closes right after start #1303

Closed stefda closed 9 years ago

stefda commented 9 years ago

Mapbox Studio shows the initial screen with the spinner upon start, then closes.

Issue is identical for both Mapbox Studio x86 and x64 v0.2.7 on Windows 7 64-bit OS.

The issue can be resolved by deleting the files app.db and possibly app.db.compacted from the directory C:\Users\<name>\.mapbox-studio. However, the files are recreated upon the next start and the application will fail to load in the future.

Possibly related to #969.

wilhelmberg commented 9 years ago

@stefda

Could you

Starting Mabox Studio from the commandline: https://github.com/mapbox/mapbox-studio/wiki/Windows-Troubleshooting#start-mapbox-studio-from-the-commandline

stefda commented 9 years ago

Here are the contents of my app.log

<Thu, 02 Apr 2015 07:53:07 GMT> Mapbox Studio @ http://localhost:3000/
<Thu, 02 Apr 2015 07:55:33 GMT> Mapbox Studio @ http://localhost:3000/
<Thu, 02 Apr 2015 07:56:52 GMT> Mapbox Studio @ http://localhost:3000/
<Thu, 02 Apr 2015 08:03:29 GMT> Mapbox Studio @ http://localhost:3000/
<Thu, 02 Apr 2015 08:03:54 GMT> Mapbox Studio @ http://localhost:3000/

And here's the cmd output:

C:\Program Files\mapbox-studio>mapbox-studio.exe

C:\Program Files\mapbox-studio>[5132:0402/122428:INFO:renderer_main.cc(211)] Renderer process started
[12124:0402/122431:INFO:CONSOLE(0)] <Thu, 02 Apr 2015 10:24:31 GMT> Mapbox Studio exited with 8.
wilhelmberg commented 9 years ago

That's strange.

Please try this:

Does it also exit?

stefda commented 9 years ago

Running .\vendor\node index.js gives the following error:

C:\Program Files\mapbox-studio\resources\app>.\vendor\node index.js

C:\Program Files\mapbox-studio\resources\app\index-server.js:71
    if (err) throw err;
                   ^
Error: EPERM, rename 'C:\Users\David\.mapbox-studio\app.db'
wilhelmberg commented 9 years ago

Normally this should be resolved by deleting app.db.compacted (as you've already mentioned in your original post).

Could you once more verify that this happens every time?

Does it error again? Only one instance of Mapbox Studio is allowed to run at a time.

stefda commented 9 years ago

Oddly enough, Studio now starts consistently (by following your procedure or by selecting it's icon from the menu). The one thing that has changed since I reported the problem is that I have deleted all Projects, Styles and Data from my Mapbox account.

I have managed to partly recreate the issue when I tried to upload tiles into my Mapbox account and the app crashed. Then, upon startup, I would get the same error as posted above. Deleting app.db and app.db.compacted would resolve the problem but the app crashed few more times when trying to upload the tiles leading to the same behaviour.

The tiles were created using the westminster_const_region.shp from the Boundary-Line dataset at https://www.ordnancesurvey.co.uk/opendatadownload/products.html.

Once I've managed to complete the tiles upload Studio loads fine on each startup.

wilhelmberg commented 9 years ago

Thanks for the analysis. I tried the mentioned data set, but didn't encounter any problems.

When working with lots of data, it is highly recommended to work with PostGIS to have more control over how much data is processed into vector tiles. A guide to get you started, can be found here: https://www.mapbox.com/mapbox-studio/postgis-manual/

Some best practices before you add a shapefile to Mapbox Studio:

stefda commented 9 years ago

Thanks for the tips, it all makes sense. I guess we can close this. If I encounter the same issue in the future I'll revisit the post and add new information.