ADRIFT Forum


The place to discuss the ADRIFT Interactive Fiction toolkit

V5 Error: An item with the same key has already

This forum is the place to learn about and discuss ADRIFT 5. Feel free to mention any bugs you find here, but please also add these to the Bugs & Enhancements list.

Please also refer to the ADRIFT 5 Wiki for more information.

V5 Error: An item with the same key has already

Postby rotter » Tue Oct 04, 2016 7:49 pm

Hi

Had a problem with my WIP game The Blank Wall, during loading it reports "Error loading Adventure: An item with the same key has already been added". I save copies all the time of my WIP games routinely (learned the hard way with V4) so I just went back to the last one that worked. Can anyone tell me what I do to cause this issue? so I don't do it again. I'm running V5.0.35.

adrift Code: Select all
 at ADRIFT.frmError..ctor(String sErrorMessage, Exception ex)
   at ADRIFT.SharedModule.ErrMsg(String sMessage, Exception ex)
   at ADRIFT.FileIO.Load500(MemoryStream stmMemory, Boolean bLibrary, Boolean bAppend, LoadWhatEnum eLoadWhat, DateTime dtAdvDate, String sFilename)
   at ADRIFT.FileIO.LoadFile(String sFilename, FileTypeEnum eFileType, LoadWhatEnum eLoadWhat, Boolean bLibrary, DateTime dtAdvDate, Int64 lOffset, Boolean bSilentError)
   at ADRIFT.GeneratorGlobal.OpenAdventure(String sFilename)
   at ADRIFT.SharedModule.OpenAdventureDialog(OpenFileDialog ofd)
   at ADRIFT.frmGenerator.DoToolClick(String sKey, String sCaption, String sTag)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnToolClick(ToolClickEventArgs e)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.FireEvent(ToolbarEventIds id, EventArgs e)
   at Infragistics.Win.UltraWinToolbars.PopupMenuItemUIElement.DoClickProcessing(MouseEventArgs e)
   at Infragistics.Win.UltraWinToolbars.PopupMenuItemUIElement.OnMouseUp(MouseEventArgs e)
   at Infragistics.Win.TextUIElementBase.OnMouseUp(MouseEventArgs e)
   at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)
   at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)
   at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
   at Infragistics.Win.UltraWinToolbars.PopupControlBase.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at Infragistics.Win.UIAutomation.UiaProviderControlNativeWindow.WndProc(Message& msg)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at ADRIFT.frmGenerator.Main()
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at R.P.Main(String[] args)
 
Attachments
Untitled.png
Error Message
Untitled.png (24.28 KiB) Viewed 2820 times
Currently working on "The Blank Wall" in ADRIFT 5 and "Again and Again" in Inform 7.
Delron, the home of Otter Interactive Fiction.
User avatar
rotter
 
Posts: 1352
Joined: Sat May 08, 2004 12:12 am
Location: UK
Points: 10

Re: V5 Error: An item with the same key has already

Postby ElliotM » Wed Oct 05, 2016 2:03 am

Do you have another computer with Adrift installed? Does opening your wip on that computer give you the same error message?
ElliotM
 
Posts: 1227
Joined: Tue Apr 17, 2007 8:04 pm
Location: The Midwest in the USA
Points: 13

Re: V5 Error: An item with the same key has already

Postby Campbell » Wed Oct 05, 2016 8:00 am

If you send it to me, I'll take a look.
ADRIFT Developer developer.
User avatar
Campbell
Site Admin
 
Posts: 4618
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland

Re: V5 Error: An item with the same key has already

Postby rotter » Thu Oct 06, 2016 4:38 am

ElliotM wrote:Do you have another computer with Adrift installed? Does opening your wip on that computer give you the same error message?


Yes, it seems to do this on all three installs of Adrift I have - so it is well broken.
Currently working on "The Blank Wall" in ADRIFT 5 and "Again and Again" in Inform 7.
Delron, the home of Otter Interactive Fiction.
User avatar
rotter
 
Posts: 1352
Joined: Sat May 08, 2004 12:12 am
Location: UK
Points: 10

Re: V5 Error: An item with the same key has already

Postby rotter » Thu Oct 06, 2016 4:39 am

Campbell wrote:If you send it to me, I'll take a look.


Thanks Campbell, I've emailed you a copy.
Currently working on "The Blank Wall" in ADRIFT 5 and "Again and Again" in Inform 7.
Delron, the home of Otter Interactive Fiction.
User avatar
rotter
 
Posts: 1352
Joined: Sat May 08, 2004 12:12 am
Location: UK
Points: 10

Re: V5 Error: An item with the same key has already

Postby P/o Prune » Fri Oct 07, 2016 5:22 pm

Let's know what the problem was.
D-Day V.5 in progress 86Kb (On backburner)
Anno 1700 Fourth beta test in progress.
User avatar
P/o Prune
Site Admin
 
Posts: 4164
Joined: Mon Jun 24, 2002 8:18 am
Location: Denmark
Points: 23

Re: V5 Error: An item with the same key has already

Postby rotter » Sat Oct 08, 2016 2:46 pm

Campbell got to the bottom of the problem if not how it happened. I managed to get a task and variable with the same key. I was copying and amending a block of tasks which where related. Campbell tells me Adrift should check for duplicates on creation. It might be something to do with the variable as I copy tasks all the times and have never had this before.

Well, the moral is remember things can go wrong and backup the taf before making changes.
Currently working on "The Blank Wall" in ADRIFT 5 and "Again and Again" in Inform 7.
Delron, the home of Otter Interactive Fiction.
User avatar
rotter
 
Posts: 1352
Joined: Sat May 08, 2004 12:12 am
Location: UK
Points: 10

Re: V5 Error: An item with the same key has already

Postby Apocca » Wed Oct 12, 2016 1:35 am

I just came here to post about the exact same problem. I just lost 2 weeks of work to this error so i'm a real sad panda right now. Don't suppose the file could be fixed?

Edit: Nevermind. I just remembered theres a backup file. I tried opening it and it seems to be from literally the moment before i copied a task that caused the error. Jesus this scared the cr*p out of me for a while. How does the backup work? It doesn't seem to create one every time you save?
Apocca
 
Posts: 4
Joined: Thu Sep 22, 2016 12:51 am

Re: V5 Error: An item with the same key has already

Postby rotter » Wed Oct 12, 2016 5:32 am

Apocca wrote:I just came here to post about the exact same problem. I just lost 2 weeks of work to this error so i'm a real sad panda right now. Don't suppose the file could be fixed?


Campbell can fix the file for you, if you still need it mending. Always, always, always make a backup of your game before starting work. I simply make copies of the TAF file starting.
Currently working on "The Blank Wall" in ADRIFT 5 and "Again and Again" in Inform 7.
Delron, the home of Otter Interactive Fiction.
User avatar
rotter
 
Posts: 1352
Joined: Sat May 08, 2004 12:12 am
Location: UK
Points: 10

Re: V5 Error: An item with the same key has already

Postby Campbell » Wed Oct 12, 2016 7:06 am

Apocca wrote:How does the backup work? It doesn't seem to create one every time you save?
It should copy your existing TAF every time you save the file.
ADRIFT Developer developer.
User avatar
Campbell
Site Admin
 
Posts: 4618
Joined: Sun Jun 23, 2002 11:05 am
Location: Edinburgh, Scotland


Return to ADRIFT 5.0

Who is online

Users browsing this forum: No registered users and 4 guests