# Crash in MapWInGis when increasing TilesTHreadPoolSize

**URL:** <https://mapwindow.discourse.group/t/crash-in-mapwingis-when-increasing-tilesthreadpoolsize/1398>\
**Category:** MapWinGIS\
**Created:** [August 18, 2022, 8:19am UTC](https://mapwindow.discourse.group/t/crash-in-mapwingis-when-increasing-tilesthreadpoolsize/1398 "2022-08-18T08:19:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank2x460](https://avatars.discourse-cdn.com/v4/letter/f/b5a626/32.png) [@frank2x460](https://mapwindow.discourse.group/u/frank2x460)\
**Post date:** [August 18, 2022, 8:19am UTC](https://mapwindow.discourse.group/t/crash-in-mapwingis-when-increasing-tilesthreadpoolsize/1398/1 "2022-08-18T08:19:38Z")

</div>

Hello,

when increasing the TilesThreadPoolSize Property of the GlobalSettings Object and using OpenStreetMap the whole App crashes whenn zooming, or moving the map without any errormessage.  
Taking a look into Windows eventlog shows, that there is a problem with libeay32.dll. (needed for https communication). When using a custom provider with the http protocol the problem does not occur.

Sample Code:

```auto
Imports MapWinGIS
Public Class Form1
    Private gs As New GlobalSettings

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        gs.TilesThreadPoolSize = 12
       AxMap1.TileProvider = tkTileProvider.OpenStreetMap
       AxMap1.ZoomBehavior = tkZoomBehavior.zbUseTileLevels
       AxMap1.Projection = tkMapProjection.PROJECTION_GOOGLE_MERCATOR
       AxMap1.Redraw()
    End Sub
End Class

```

Beware of increasing TilesThreadPoolSize when using a tileprovider that relies on the https protocol.  
Tested on VS 2019 and MapwinGis 5.3.0

Best Regards  
Frank

---

<div class="post-metadata">

**Author:** ![robhoney](https://avatars.discourse-cdn.com/v4/letter/r/ba8739/32.png) [@robhoney](https://mapwindow.discourse.group/u/robhoney)\
**Post date:** [August 19, 2022, 6:10pm UTC](https://mapwindow.discourse.group/t/crash-in-mapwingis-when-increasing-tilesthreadpoolsize/1398/2 "2022-08-19T18:10:58Z")

</div>

Hi Frank,

I believe this is the same issue as I reported [here](https://mapwindow.discourse.group/t/suspected-build-problem-in-5-3-tile-requests-crashing/1389) and which itself references another post. For my particular purposes I just replaced libcurl.dll with a more recent one and removed libeay.dll and ssleay.dll and so far so good.

Regards,

Rob

---

<div class="post-metadata">

**Author:** ![frank2x460](https://avatars.discourse-cdn.com/v4/letter/f/b5a626/32.png) [@frank2x460](https://mapwindow.discourse.group/u/frank2x460)\
**Post date:** [August 22, 2022, 10:19am UTC](https://mapwindow.discourse.group/t/crash-in-mapwingis-when-increasing-tilesthreadpoolsize/1398/3 "2022-08-22T10:19:37Z")

</div>

Hi Rob,

I’ve tired your proposal concerning the libraries but it failed with runtime error.  
Beside we discovered that the number in TileThreadPoolSize, that is tolerated, depends on the machine’s processor. E.g. on a core i3 with 2 cores / 4 threads the software crashes even with TileThreadPoolSize set to 4.  
As a consequence, we now set TileThreadPoolSize to 1 when accessing tiles per https-protocol

Regard,  
Frank
