Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

Windows Troubleshooting

Wilhelm Berg edited this page May 22, 2015 · 14 revisions

{"gitdown": "contents"}

First Steps

Describe your problem

Keep it short and simple, but include as much details as possible. Is your question about a crash/startup or performance problem? e.g.

------ WHAT'S YOUR ENVIRONMENT?
I'm on a French Windows 8.1 64bit.
I downloaded the 64bit installer, version 0.2.8,
from https://www.mapbox.com/mapbox-studio/

------ WHAT'S YOUR DATA?
I have a 543MB shapefile.
The shapefile has 47 attribute columns, the string
attributes contain French characters.
The projection of the shape file is
EPSG:7413 (Lambert zone III + NGF IGN69)
http://spatialreference.org/ref/epsg/7413/

------ WHAT HAVE YOU DONE SO FAR?
I've added the shape file to a source project and saved it?
I exported to MBTiles, but the export is very slow, 1 tiles / sec.

------ WHAT DO YOU WANT TO ACHIEVE?
How can I make the export faster?

A Perfect Test Case

If your issue is data related, it would be great help if you provide a "perfect test case". That's a detailed description of the process, like above, plus a small, portable, simple package, that includes everything needed to reproduce the problem: e.g.

  • data
  • styles
  • custom code

Read more about perfect test cases here: /~https://github.com/mapnik/mapnik/wiki/A-perfect-testcase

Crash / Startup - Problem

Share your logs

  • open File Explorer
  • paste %USERPROFILE%\.mapbox-studio into address bar
  • locate
    • app.log
    • shell.log
  • paste them into your issue or put them into a gist (and link to it) when they are big

Things to try

Delete config files

  • make sure via Task Manager (Processes tab), there are no running zombie processes of node.exe or mapboxstudio.exe
    • kill them via Right Click -> End Process Tree
    • start with node.exe, that should normally also kill the other processes
  • paste %USERPROFILE%\.mapbox-studio into File Explorer's address bar and delete
    • app.db
    • app.db.compacted, if there is one
  • restart Mapbox Studio

Delete Mapbox Studio's memory of last used directory

Problem: /~https://github.com/mapbox/mapbox-studio/issues/1159 If there are errors about wrong paths when adding data, make sure that there are no running instances of Mapbox Studio (see above), then

  • open File Explorer
  • paste %USERPROFILE%\AppData\Roaming\mapbox-studio into the address bar
  • delete folder Local Storage

Start Mapbox Studio from the commandline

  • open command prompt:
    • Press WindowsKey+R
    • type cmd
    • press ENTER
  • type cd "C:\Program Files\mapbox-studio
  • type mapbox-studio.exe enter
  • share the messages that appear in the console

If the above did not work, try:

  • type cd "C:\Program Files\mapbox-studio\resources\app", ENTER
  • type vendor\node index.js, ENTER
  • share the messages that appear in the console

Reinstall Mapbox Studio

  • reboot
  • execute the installer again (will ask you to un-install)

Performance Problem

Shape Files

TODO: add QGIS screenhot

ogr2ogr -f "ESRI Shapefile" out.shp in.shp t_srs EPSG:3857
 ogrinfo -al -so westminster_const_region-orig.shp
ogr2ogr -f "ESRI Shapefile" out.shp in.shp -s_srs EPSG:<CURRENT-EPSG-CODE> -t_srs EPSG:3857

-skipfailures

ogr2ogr out.shp in.shp -lco ENCODING=UTF-8

check it your shapefiles contain invalid data

import os
from PyQt4.QtCore import QVariant

lyr = iface.activeLayer()
if lyr is None:
    raise Exception('select layer in TOC')

skip_cnt = 0
for in_feat in lyr.getFeatures():
    in_geom = in_feat.geometry()
    if in_geom is None:
        print in_feat.id(), 'NULL geometry, skipped'
        skip_cnt += 1
        continue
    if not in_geom.isGeosValid ():
        print in_feat.id(), 'NOT geos valid, skipped'
        skip_cnt += 1
        continue
    geom_errors = in_geom.validateGeometry()
    if len(geom_errors) > 0:
        print in_feat.id(), 'geometry NOT valid:'
        for geom_error in geom_errors:
            print geom_error.what()
        print in_feat.id(), 'skipped'
        skip_cnt += 1

print 'orig feature count', lyr.dataProvider().featureCount()
print 'skipped:', skip_cnt
print 'finished'

PostGIS