AR 11.3 LoadLayout Exception

Posted by: ajanda on 13 May 2018, 11:47 pm EST

    • Post Options:
    • Link

    Posted 13 May 2018, 11:47 pm EST

    Hello

    We’ve encounter a problem with Active Reports 9.2 and 11.3 (possibly more but this was tested on these two). When we create a few threads that run SectionReport.LoadLayout instruction on a template that has an image in it sometimes the application will throw an exception:

    Exception form displayed for Value cannot be null.

    Parameter name: input

    Stack Trace:

    at System.IO.BinaryReader…ctor(Stream input, Encoding encoding, Boolean leaveOpen)

    at GrapeCity.ActiveReports.SectionReportModel.Picture.ReadXml(XmlNode controlNode)

    at GrapeCity.ActiveReports.SectionReportModel.ControlCollection.ReadXml(XmlNode sectionNode, SectionReport report)

    at GrapeCity.ActiveReports.SectionCollection.ReadXml(XmlNode sectionsNode)

    at GrapeCity.ActiveReports.SectionReport.#Qyb(XmlDocument layoutDoc, Boolean checkNames)

    at GrapeCity.ActiveReports.SectionReport.LoadLayout(XmlReader reader, ArrayList& errors)

    at GrapeCity.ActiveReports.SectionReport.LoadLayout(XmlReader reader)

    We attach the screenshot and a sample application that can be used to reproduce the problem. Please help us resolve this issue.

    PLEASE NOTE: The problem cannot be reproduced 100% of the time, if you cannot reproduce the issue change the ‘k’ value in MergeReport.cs, recompile and try again a few times. This problem happens around 10 - 20% of the times.

  • Posted 13 May 2018, 11:48 pm EST - Updated 30 September 2022, 9:16 am EST

    Exception error image:

  • Posted 13 May 2018, 11:50 pm EST

  • Posted 14 May 2018, 8:46 pm EST

    Hello Adrian,

    Could you please use the following line of code and see if the issue resolve:

    
     public void createDocument()
            {
                SectionReport report = new SectionReport();      
                XmlTextReader xmlR = null;
    
                string path = System.IO.Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + @"\..\..\..\Resources\template.rpx";
    
                try
                {
                    xmlR = new System.Xml.XmlTextReader(path);
                    report.LoadLayout(xmlR);
                    xmlR.Close();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                lock (locker)
                {
                    t++;
                }
            }
    
    

    I have tested 7-8 times with above code and no issue occurs at my end.

    Thanks,

    Mohit

  • Posted 15 May 2018, 12:41 am EST - Updated 30 September 2022, 9:16 am EST

    Hello

    Thank you for your suggestion. Unfortunately the exception still occurs, I have tried both with try catch to make the code the same, and without to see full stack in console window. I attached the screenshots below.

    Again I had to try a few times before the exception occurred.

    This test was done on Active reports 11.3

  • Posted 15 May 2018, 12:43 am EST - Updated 30 September 2022, 9:16 am EST

    Second try screenshot:

  • Posted 15 May 2018, 8:04 pm EST

    Hello,

    Thanks for the information.

    I am able to replicate the problem at our end. I have escalated this to the development team(Tracking ID 258334) and will revert you back once have any information from them.

    Thanks

    Mohit

  • Posted 22 May 2018, 7:32 pm EST

    Hello Adrian,

    Issue is fixed in the internal build of AR12. If you want, we can provide you the hotfix of AR12.

    Thanks,

    Mohit

  • Posted 22 May 2018, 7:43 pm EST

    Thank you for your response.

    Can you tell me if this fix will be available in the next release of Active Reports (I assume 12.2) and if there is any release date for that version?

  • Posted 22 May 2018, 9:03 pm EST

    Hello Adrian,

    Yes, the fix will be available in the next release of ActiveReports that is AR12 SP2. This release is scheduled in coming August.

    Also, If you need, we can provide the hotfix of current build that AR12 SP1which include the above fix.

    Thanks,

    Mohit

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels