NAV2016 client crash on run/runmodal page through code

EvR
Member Posts: 178
Hi all,
I have a page (containing a JS control add-in). When I run the page directly from the dev client and just add a hard-coded GET to the OnOpenPage(), everything works just fine. Data is displayed and user interaction works. But when I run the same page from code in another page (of the same record type), the RTC loses connection to the service and crashes:

MyPage.SETRECORD(Rec);
MyPage.RUNMODAL; (client crashes when reaching this line in the debugger)
My event viewer says the following:
Error MicrosoftDynamicsNavServer$DynamicsNAV90
Type: System.Runtime.Serialization.SerializationException
Message: Maximum number of items that can be serialized or deserialized in an object graph is '512000'. Change the object graph or increase the MaxItemsInObjectGraph quota.
StackTrace:
at System.Runtime.Serialization.XmlObjectSerializerContext.IncrementItemCount(Int32 count)
at WriteArrayOfunsignedByteToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract )
at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)........
Any ideas?
I have a page (containing a JS control add-in). When I run the page directly from the dev client and just add a hard-coded GET to the OnOpenPage(), everything works just fine. Data is displayed and user interaction works. But when I run the same page from code in another page (of the same record type), the RTC loses connection to the service and crashes:

MyPage.SETRECORD(Rec);
MyPage.RUNMODAL; (client crashes when reaching this line in the debugger)
My event viewer says the following:
Error MicrosoftDynamicsNavServer$DynamicsNAV90
Type: System.Runtime.Serialization.SerializationException
Message: Maximum number of items that can be serialized or deserialized in an object graph is '512000'. Change the object graph or increase the MaxItemsInObjectGraph quota.
StackTrace:
at System.Runtime.Serialization.XmlObjectSerializerContext.IncrementItemCount(Int32 count)
at WriteArrayOfunsignedByteToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract )
at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)........
Any ideas?
0
Best Answer
-
I'm facing same problem. However I enlarged <add key="ClientServicesMaxItemsInObjectGraph" value="2000" /> then it was working. I'm using angular platform components, so there is really some javasript downloaded.6
Answers
-
You could try to set the "Max. Items on Object Graph" setting on the service tier to 1024. Dont't forget to restart.0
-
Same issue.
I guess it's a bug, especially because the same page runs fine when not being called by code.
I'm not running the latest build so I'll try to update. If partnersource finally lets me download....bugged up mess, Microsoft!0 -
I've tried the latest NAV build, same exception.
If anyone ever faces this same bug;
The page contains a JS add-in with a lot of javascript and css lines. I've minified my javascript and css to reduce the size. And now the page works.
This is a bug in NAV though, because running the page normally without the minified JS/CSS it works fine. It only crashes when calling that same page via code (RUNMODAL/RUN).0 -
I'm facing same problem. However I enlarged <add key="ClientServicesMaxItemsInObjectGraph" value="2000" /> then it was working. I'm using angular platform components, so there is really some javasript downloaded.6
-
Hi all
I am facing RUNMODAL issue who may be related to this topic.
When I call the same page via RUN it works fine and my js interpreteret fine. But when I call with RUNMODAL then nothing happens. Dont get any error eg. just blank page. Seems as the addin is not loaded, it apparently never reach my js part.
so is there anyone who know what the problem is?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions