in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Exception "Index was out of range"

Last post 05-21-2008 9:43 AM by C1_Dima. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 04-21-2008 3:58 PM

    Exception "Index was out of range"

    C1.C1Preview.2.dll  - version: 2.0.20082.50016

    In trying to reproduce the 'The given key was not present in the dictionary' exception that some of our users get (a different thread in this forum), I was able to produce an "Index out of Range" exception when calling generate on the C1PrintDocument.

    Our users are still using the older version 2.0.20073.42112 so maybe this explains the different exception.

    Attached files include the stack trace and a saved C1Document that produces the exception when I load it into your PageLayout1 sample project with the following Form1_Load code:

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

       C1PrintDocument1.Load("c:\badC1DOC.xml")

       '//MakeDoc1(C1PrintDocument1)

       C1PrintDocument1.Generate()

    End Sub

    Thanks,

    Chris

  • 04-21-2008 5:27 PM In reply to

    Re: Exception "Index was out of range"

    Thanks, I will look into this.
    Cheers,
    Dima.
  • 04-21-2008 6:06 PM In reply to

    Re: Exception "Index was out of range"

    More info:

    I rolled back to version 2.0.20073.42112.  Now I am getting the exception that our users are getting:  "The given key was not present in the dictionary".

    Attached is a stack trace and saved 2.0.20073.42112 C1PrintDocument that you can use to produce the exception.

    To summarize:  Through code I create the same C1PrintDocument object graph.  However, using 2.0.20073.42112 versus 2.0.20082.50016 produces different excpetions when calling the generate method.

    Sorry about starting a new thread on this. 

    Chris

  • 04-22-2008 8:51 AM In reply to

    Re: Exception "Index was out of range"

    This was a bug, it is fixed now, the fix will be in the next public build. Thanks for the sample. 

    Cheers,
    Dima.
  • 04-22-2008 11:44 AM In reply to

    Re: Exception "Index was out of range"

    Thank you, Dima.  Looking forward to the next public build.

     Chris

  • 04-22-2008 11:49 AM In reply to

    Re: Exception "Index was out of range"

    Dima,

    Do you have an estimate for when the next public build will be released?  Thanks.

     Chris

  • 04-22-2008 1:15 PM In reply to

    Re: Exception "Index was out of range"

    I will try to post a build with the fix here within a week. But, it will be a "pre-prerelease", i.e. it won't have passed QA yet.
    Cheers,
    Dima.
  • 04-29-2008 12:50 PM In reply to

    Re: Exception "Index was out of range"

    Please try the latest build:

    http://download3.componentone.com/pub/Net/c1printpreview/misc/C1Preview.2_2.0.20082.50021.zip 

    Let me know whether this helps. Thanks. 

    Cheers,
    Dima.
  • 04-29-2008 6:13 PM In reply to

    Re: Exception "Index was out of range"

    Hi Dima,

    You have made some progress.  The number of exceptions have decreased with ver. 2.0.20082.50021, but we are still getting some "Index was out of range" exceptions.

    The attached zip file includes the stack trace and a saved C1Document that produces the exception when I load it into your PageLayout1 sample project with the following Form1_Load code:

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

       C1PrintDocument1.Load("c:\badC1DOC_50021.xml")

       '//MakeDoc1(C1PrintDocument1)

       C1PrintDocument1.Generate()

    End Sub

    Please continue to put out updates we'll keep testing it.  Thanks.

    Chris

  • 05-01-2008 4:41 PM In reply to

    Re: Exception "Index was out of range"

    Should be fixed in the latest build: http://download3.componentone.com/pub/Net/c1printpreview/misc/C1Preview.2_2.0.20082.50022.zip

    Please try it and let me know. 

    Cheers,
    Dima.
  • 05-02-2008 1:45 PM In reply to

    Re: Exception "Index was out of range"

    Success!  Our test generates 300+ fairly complex documents and your last build was able to generate all of them with no exceptions.

    Thank you very much for your efforts in getting this resolved.

    Chris

  • 05-21-2008 9:43 AM In reply to

    Re: Exception "Index was out of range"

    Great, thanks for letting us know.
    Cheers,
    Dima.
Page 1 of 1 (12 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.