POST
|
Hi, - Can you share any of the multi-threading code? It is hard to copy all code, it is too much.We have two windows, each one holds a map. They are loading in multi-threading by calling the method I post... - Do you see the exception if only one thread is accessing the mobile map package? I did not try with one thread on purpose..But even if I run it multi-threading, it does not happen every time...Sometimes, it happens 3 times in a row....Sometimes, I cannot see it once a whole day...And there is a strange thing, if the first time startup has this issue, mostly, the second time startup will be good. The multi-threading code has been used 3 months...I detect this issue in recent 3 weeks...Before, I did not notice this problem.. - What code runs in GetMaxScaleTask and GetMinScaleTask? These two methods are simply retrieving a value from mmpk... public async Task<double> GetMaxScaleTask() { string nameKey = KeyMaxScale; var qryParams = new QueryParameters() { WhereClause = $"{GeoElementHelper.ColumnUName}='{nameKey}'", ReturnGeometry = false, }; var floorTable = GetTable(MapPackageTableTypes.settings); var result = await floorTable.QueryFeaturesAsync(qryParams).ContinueWith(t => t.Result.FirstOrDefault()); if (null == result) { throw new InvalidOperationException(string.Format(Resources.Msg_NoKeyInMapPackage, KeyMaxScale)); } return double.Parse(result.GetAttributeValue(GeoElementHelper.ColumnUValue1).ToString()); } public async Task<double> GetMinScaleTask() { string nameKey = KeyMinScale; var qryParams = new QueryParameters() { WhereClause = $"{GeoElementHelper.ColumnUName}='{nameKey}'", ReturnGeometry = false, }; var floorTable = GetTable(MapPackageTableTypes.settings); Feature result = await floorTable.QueryFeaturesAsync(qryParams).ContinueWith(t => t.Result.FirstOrDefault()); if (null == result) { throw new InvalidOperationException(string.Format(Resources.Msg_NoKeyInMapPackage, KeyMinScale)); } return double.Parse(result.GetAttributeValue(GeoElementHelper.ColumnUValue1).ToString()); } ************************************************** - Can you try awaiting the Map.LoadAsync operation before attempting to set the MaxScale and MinScale? - What happens if you remove the List parallelization? I will try this... And I have two questions.. 1. Does the stack trace I copied provide some useful information? 2. Can you let me know if loading mmpk in multi-threading is safe? Thanks...
... View more
09-20-2020
05:12 AM
|
0
|
0
|
1287
|
POST
|
Hi, Thanks....After roll back to 100.8, I got the following stack trace when the exception occurred. **************************************************************************** Exception thrown at 0x00007FF8EC20F5F4 (runtimecore.dll) in MyClient.exe: 0xC0000005: Access violation writing location 0x0000000002ADC0F0. > runtimecore.dll!std::vector<class std::weak_ptr<class Esri_runtimecore::Geo_model::WMS_layer_info>,class std::allocator<class std::weak_ptr<class Esri_runtimecore::Geo_model::WMS_layer_info> > >::_Emplace_reallocate<class std::shared_ptr<class Esri_runtimecore::Geo_model::WMS_layer_info> const &>(class std::weak_ptr<class Esri_runtimecore::Geo_model::WMS_layer_info> * const,class std::shared_ptr<class Esri_runtimecore::Geo_model::WMS_layer_info> const &) Unknown runtimecore.dll!Esri_runtimecore::Geo_model::Geodatabase::load_sync_(class pplx::cancellation_token const &) Unknown runtimecore.dll!std::_Func_impl_no_alloc<<lambda_22e1f3949484d95b0c39990ed8fbdeea>,void>::_Do_call() Unknown runtimecore.dll!std::_Func_impl_no_alloc<<lambda_23d350ddfca9531044d43a119b81b3d3>,boost::any>::_Do_call() Unknown runtimecore.dll!<lambda>(void)() Unknown runtimecore.dll!std::_Func_impl_no_alloc<<lambda>(void),boost::any>::_Do_call() Unknown runtimecore.dll!pplx::task<boost::any>::_InitialTaskHandle<boost::any,<lambda>(void),pplx::details::_TypeSelectorNoAsync>::_Init() Unknown runtimecore.dll!pplx::details::_PPLTaskHandle<boost::any,pplx::task<boost::any>::_InitialTaskHandle<boost::any,<lambda>(void),pplx::details::_TypeSelectorNoAsync>,pplx::details::_TaskProcHandle>::invoke() Unknown runtimecore.dll!pplx::details::_TaskProcHandle::_RunChoreBridge(void *) Unknown runtimecore.dll!Esri_runtimecore::Common::Core_scheduler::Queued_proc::invoke(void) Unknown runtimecore.dll!Esri_runtimecore::Common::Core_scheduler::bridge_proc_(void *) Unknown runtimecore.dll!Esri_runtimecore::Common::Windows_Threadpool_scheduler::Scheduler_param::work_callback(struct _TP_CALLBACK_INSTANCE *,void *,struct _TP_WORK *) Unknown ntdll.dll!00007ff9a1c938a0() Unknown ntdll.dll!00007ff9a1c4276a() Unknown kernel32.dll!00007ff9a1336fd4() Unknown ntdll.dll!00007ff9a1c7cec1() Unknown **************************************************************************** Seems it is related to WMS_layer_info, but we do not use WMS_layer (I checked API documents, I do not know what it is)... Regarding the code, I cannot copy all code... The following code is the method which opens mmpk file. It is invoked from two separate instances in two threads, I expect they read the same mmpk file from two separate instances to create two separate map instances(we have two windows to display mapview, one is for detail map, the other is for overview.) public abstract class MobileMapPackageBase : IMapPackage { protected virtual async Task Initialize() { try { MapPackage = await MobileMapPackage.OpenAsync(MapSettings.MapPackagePath); } catch (Exception e) { Logger.Error($"{Resources.Error_OpenMapFailure}.{e}"); throw new OpenMapFailureException(Resources.Error_OpenMapFailure, e); } if (MapPackage.Maps.Count <= 0) { throw new InvalidOperationException(Resources.Error_NoMapObjectInMmpk); } MapObject = MapPackage.Maps.First(); MapObject.MaxScale = await GetMaxScaleTask(); MapObject.MinScale = await GetMinScaleTask(); foreach (var layer in MapObject.OperationalLayers.ToList().AsParallel()) { if (!RequestedLayerTypes.Contains(GetLayerTypeValue(layer.Name))) { MapObject.OperationalLayers.Remove(layer); } } _layers.AddRange(MapObject.OperationalLayers); } }
... View more
09-17-2020
04:40 PM
|
0
|
2
|
1287
|
POST
|
Thank you for reply.. I follow your suggestion, upgrade to 100.9, it still happens. But I got the following exception. Exception thrown at 0x00007FF8F82FD354 (runtimecore.dll) in MyClient.exe: 0xC0000005: Access violation writing location 0xFFFFFFFFFD37ACA0. Stacktrace: > runtimecore.dll!00007ff8f82fd354() Unknown runtimecore.dll!00007ff8f7e48b4f() Unknown runtimecore.dll!00007ff8f7e4f2f6() Unknown runtimecore.dll!00007ff8f9d83cef() Unknown runtimecore.dll!00007ff8f9d842e2() Unknown runtimecore.dll!00007ff8f9d8a932() Unknown runtimecore.dll!00007ff8f9d8a6ec() Unknown runtimecore.dll!00007ff8f9d897c4() Unknown runtimecore.dll!00007ff8f7b2434d() Unknown runtimecore.dll!00007ff8f9d9c2fb() Unknown runtimecore.dll!00007ff8f9d9c1e6() Unknown runtimecore.dll!00007ff8f9d9ebff() Unknown ntdll.dll!00007ff9ae5138a0() Unknown ntdll.dll!00007ff9ae4c276a() Unknown kernel32.dll!00007ff9ad106fd4() Unknown ntdll.dll!00007ff9ae4fcec1() Unknown Then, symbol loader showed info "runtimecore_link.pdb could not be found in the selected paths". Looks the missing runtimecore_link.pdb stopped me getting more stacktrace.... How can I get runtimecore_link.pdb? In addition, I have a question which could relate to this issue... My app has two threads to read a mmpk simultaneously at startup....Is it okay to do this? Does it possibly cause the crash?
... View more
09-16-2020
11:28 PM
|
0
|
4
|
1287
|
POST
|
My application crashed due to the following error which copied from windows event log. In my code, I couldn't catch the exception. The app just crashed without any exception. It happens at startup, not every time, but quite often. Does anyone have same issue? Can someone tell me how to solve this issue or how to find the root cause? Faulting application name: MyClient.exe, version: 5.11.0.0, time stamp: 0x85799697 Faulting module name: runtimecore.dll, version: 100.8.0.2768, time stamp: 0x5eac7fc3 Exception code: 0xc0000005 Fault offset: 0x0000000000c8f5f4 Faulting process ID: 0x1580 Faulting application start time: 0x01d68befb01d39ca Faulting application path: C:\Workspace\MyClient\Client\MyClient\bin\x64\Debug\MyClient.exe Faulting module path: C:\Workspace\MyClient\Client\MyClient\bin\x64\Debug\runtimecore.dll Report ID: 9d362766-7135-4e70-98d4-a5b0b4c19329 Faulting package full name: Faulting package-relative application ID:
... View more
09-15-2020
11:26 PM
|
0
|
6
|
1374
|
POST
|
I am wondering how to draw a oval around a polyline as below... The blue one is the polyline stored in mmpk, I need to draw a oval around it on a GraphicOverlay.... Can someone please help? Thanks...
... View more
08-06-2020
10:16 PM
|
0
|
2
|
609
|
POST
|
I found a way to make it. I am not sure if this the proper way.. SimpleRenderer r0 = new SimpleRenderer(); PictureMarkerSymbolLayer symbolLayer = new PictureMarkerSymbolLayer(picture); MultilayerPolylineSymbol symbol = new MultilayerPolylineSymbol(new[] { symbolLayer }) { Width = 10d, }; r0.Symbol = symbol;
... View more
07-28-2020
12:07 AM
|
1
|
2
|
700
|
POST
|
I want to create renderer to fill the lines like what ArcGIS pro does in the picture below(Picture stroke). Is it possible? I could not find example code for it. Can someone help please....
... View more
07-27-2020
10:45 PM
|
0
|
3
|
770
|
POST
|
I am wondering, is it possible to make PictureMarkerSymbol auto-re-sizable while zooming in/out?
... View more
07-23-2020
05:56 PM
|
0
|
2
|
950
|
POST
|
It is packaged into MPKX. Querying again is not quicker...LocalServer unpack mpkx into app data folder. I did another test, changing FeatureRequestMode to Manual, then using PopulateFromServiceAsync to load into local cache, then QueryFeaturesAsync gets similar performance to mmpk. But PopulateFromServiceAsync takes around 20 seconds. I guess most time is spent on serialize/deserialize in LocalServer, since the data is transmitted in Json format.
... View more
06-11-2020
04:36 PM
|
0
|
0
|
1247
|
POST
|
Hi Nick, Thank you for suggestion... 1. Our product is based on windows desktop. 2. "I wouldn't expect it to be huge to be honest, but there is always some overhead with hitting the Local Server." Actually, I made a test on performance between mmpk and mpkx.. I use FeatureLayer.FeatureTable.QueryFeaturesAsync(qryParams) to load 24,599 features with mmpk and mpkx. mmpk: 0.57 second mpkx: 27.11 secons. The performance difference is huge... I even feel unbelievable. I am afraid if I had some wrong configuration. Do you have bench mark for this? Can you share? 3. In order to work with Preplanned Offline Map workflow(ArcGIS online), what license should we have?
... View more
06-10-2020
08:39 PM
|
0
|
4
|
1247
|
POST
|
Thank you for the mmpk solution, we are considering this solution. Seems mmpk has better performance on querying features than mpkx. But MMPK does not support editing feature. If we want to have the capability of editing feature on the fly, is there other solution other than mpkx? Is it possible mmpk would have feature editing functionality in the future?
... View more
06-09-2020
10:32 PM
|
0
|
0
|
1368
|
POST
|
I am integrating ESRI map into our product, we use it as offline map. Now we have two solutions, MMPK and MPKX(LocalServer). From arcgis document, I already know mmpk is designed for offline map. And I made a test, mmpk has better performance on QueryFeaturesAsync than mpkx(localserver). We have a big amount of data in FeatureTable( around 30,000 features), so the performance is important to us. But mpkx(LocalServer) has editing feature capability, which could be requested by our customers in future, so it is tempting to us as well. The customers expect not to regenerate mpkx very often. I am struggling which solution I should go with? Or maybe there are other better solutions? (BTW, enterprise level server is not an option, the customer cannot afford)
... View more
06-09-2020
08:56 PM
|
0
|
6
|
1400
|
Title | Kudos | Posted |
---|---|---|
1 | a week ago | |
1 | 07-28-2020 12:07 AM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|