iOS Question Error: The given key was not present in the dictionary

Discussion in 'iOS Questions' started by CaptKronos, Apr 14, 2019.

  1. CaptKronos

    CaptKronos Active Member Licensed User

    I have noticed other threads discussing this error message but I think my experience is different. It's not a big deal but every 10 to 20 compile requests throws up this error.

    An error occured.
    The given key was not present in the dictionary.


    I then hit F5 again and everything is fine. I am wondering if there is some race condition between the IDE saving a file and the compiler starting?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Do you see it in the compilation window?
     
  3. CaptKronos

    CaptKronos Active Member Licensed User

    This is it.



    givenkeyerror.jpg
     
  4. Erel

    Erel Administrator Staff Member Licensed User

  5. CaptKronos

    CaptKronos Active Member Licensed User

    ok, I'll report back here if I manage to catch anything.
     
  6. CaptKronos

    CaptKronos Active Member Licensed User

    It's just done it again.

    Code:
    *** no reuse *** 
    *** no reuse *** 
    *** no reuse *** 
    *** no reuse *** 
    *** no reuse *** 
    Compilation task: 
    950.4556
    Gui: 
    213
    System.Collections.Generic.KeyNotFoundException: The given key was 
    not present in the dictionary.
       at System.Collections.Generic.SortedDictionary`
    2.get_Item(TKey key)
       at b6.a(
    String A_0, bp A_1)
       at f4.a(Boolean A_0, 
    List`1 A_1, dp A_2)
       at f4.a(aw A_0)
       at ed.a(Object A_0)
       at hb.a(Object A_0)
    Gui: 
    106
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    Not sure. Are you using B4i v5.5?
     
  8. CaptKronos

    CaptKronos Active Member Licensed User

  9. Erel

    Erel Administrator Staff Member Licensed User

    Will keep it open for now.
     
  10. CaptKronos

    CaptKronos Active Member Licensed User

    Definitely not a big deal. Just thought I would let you know.:)
     
  11. Pendrush

    Pendrush Well-Known Member Licensed User

    Step to reproduce it on large project:
    1. Open some large B4I project. Don't work on small projects.
    2. Start app in debug mode.
    3. While app running in debug mode, change some code, press CTRL+S and right away (as fast as you can) press F11.
     
  12. CaptKronos

    CaptKronos Active Member Licensed User

    I never use F11 (had to check what it does - Restart), my go to key is F5, so I thought I would follow Pendrush's steps:
    1. Yep, large project
    2. Yep
    3. Pressed F11

    And got the following in the IDE log.
    Code:
    Gui: 946
    System.Exception: Error compiling program.
    Error description: An item with the same key has already been added.
    Error occurred on line: 
    39
    End Sub
       at cy.a(
    List`1 A_0, String A_1)
       at a7.b()
       at ed.a(Object A_0)
    Compilation task: 
    2980.3499
    Gui: 
    112
    Compilation task: 
    5555.157
    which is slightly different to what I had seen before. At step 3, I didn't do Ctrl+S, just F11, so I am guessing the IDE saved the changes automatically before restarting, hence the Ctrl+S isn't required.
    As before, compiling again, straight after receiving the error, everything is back to normal and the project compiles without error.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice