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

Adding shp issues Shape plugin error (Windows 7/64bit using 2.2) #1159

Open
geografa opened this issue Jan 30, 2015 · 8 comments
Open

Adding shp issues Shape plugin error (Windows 7/64bit using 2.2) #1159

geografa opened this issue Jan 30, 2015 · 8 comments
Labels

Comments

@geografa
Copy link
Contributor

Original issue: user receives error in Windows 7/64bit install (2.2) when adding any shp:

Shape Plugin: shapefile 'c:/Program Files/mapbox-studio/resources/app/node_modules/mapbox-studio-default-source/\Users\Jake\Desktop\AllStates/AllStates_Proj.shp' does not exist

The path seems to get garbled. Opening and creating new projects is no problem. Per chat, possibly related.

@geografa geografa added the bug label Jan 30, 2015
@wilhelmberg
Copy link
Contributor

Cannot reproduce.

Tried

  • W7/64bit
  • W8.1/64bit
  • folder location
    • directly on C:\
    • on the desktop
  • with underscores in the filename

@Reach-Above
Copy link

Same issue on windows 7/32bit (2.2) install. Try adding 3 or more shapefiles and wait. 30-60 mins until you try adding another shapefile. New projects work for a bit and then this error starts occuring. Overcame issue by manually adding in path .shp name when adding a new layer.

Shape Plugin: shapefile 'c:/TEMP/NaturalEarth/2/Studio_v2.tm2source/\TEMP\NaturalEarth\2\10m_physical/ne_10m_graticules_10.shp' does not exist

@jwitcoski
Copy link

Same error.

There error occurs when I browse to the file...
It should be:
/Temp/buildings/buildings.shp
but it comes up as:
\Temp\buildings/buildings.shp

capture1

mapstudycapture

@wilhelmberg
Copy link
Contributor

@Reach-Above @jwitcoski
Is it possible for you to upgrade to latest Mapbox Studio (0.2.5 at the moment) and try again?

https://www.mapbox.com/mapbox-studio/

@Reach-Above
Copy link

Downloaded latest build and issue persists.

@wilhelmberg
Copy link
Contributor

Try adding 3 or more shapefiles and wait. 30-60 mins until you try adding another shapefile.

I did this without problems:

  • added 3 shape files
  • waited 70 minutes
  • aded another shape file

@Reach-Above @jwitcoski

Are you using shortcuts or hard links to your shapefiles?

@jwitcoski
Copy link

same issue persists, will add 3 shapefiles and now will wait a few hours.

On Mon, Mar 9, 2015 at 4:02 AM, Wilhelm Berg notifications@github.com
wrote:

@Reach-Above /~https://github.com/Reach-Above @jwitcoski
/~https://github.com/jwitcoski
Is it possible for you to upgrade to latest Mapbox Studio (0.2.5 at the
moment) and try again?

https://www.mapbox.com/mapbox-studio/


Reply to this email directly or view it on GitHub
#1159 (comment)
.

@wilhelmberg
Copy link
Contributor

@jwitcoski @Reach-Above @springmeyer @geografa

I was finally able to reproduce:

Tested with latest 64bit version available at https://www.mapbox.com/mapbox-studio (0.2.6 as of today).

image

image

Reason

There seems to be a race condition, that paths are not correctly parsed when data is still being processed in the background and CPU is maxed out.

Temporary Solution

I know this is not perfect, but it worked for me as a temporary workaround (We are already in the process of hunting down some hard to find performance problems when processing shape files on Windows).

1.) exit Mapbox Studio

Close Mapbox Studio and make sure via Task Manager that there are no running mapbox-studio.exe or node.exe processes.
Kill them via: Right-Click -> Kill Process Tree

2.) delete Mapbox Studio's memory of last used directory

otherwise you won't get rid of the /paths. Even after a new start of Mapbox Studio.

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

3.) make sure your shape files are pre-processed (projection, encoding, shapeindex)

This takes the weight of Mapbox Studio to do it on the fly in the background all the time.
How to prepare the shape files:
#1200 (comment)

4.) create new Source Project

and add one layer

5.) Observe task manager

Monitor the cpu usage of node.exe.
If you added a shape file just before, panned or zoomed around, wait till node.exe has "cooled down" and doesn't use the whole processing power available.

Don't add now:
image

Add the next shape file only after node.exe is idle again.

Add now:
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants