Building content threw ArgumnetException

Topics: Developer Forum, User Forum
Mar 19, 2007 at 10:30 PM
Hi
I have created a 3d animated model in 3ds Max 8 using bones and i exported it using PandaSoft.
When i try loading it i get this error
Error 1 Building content threw ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Xclna.Xna.Animation.Content.XModelImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAndLoadAsset(BuildItem item, BuildItem requestingItem)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetViaCache(BuildItem item, String importerName)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, ITaskItem[] sourceAssets, TaskLoggingHelper msbuildLog, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates) C:\Documents and Settings\baggyn\My Documents\Visual Studio 2005\Projects\threeDGame\threeDGame\models\robot\gunner.X threeDGame


Looking through the Forum i noticed someone else had this problem but it was fixed by Dastle
The post was created on Nov 18 2006

I am using the latest release so i assume i have he fix

Any ideas?
Coordinator
Mar 20, 2007 at 2:38 AM
I'll have to take a look at that changeset to see what the exact error was. The library has gone through major refactoring since then and it's possible I re-introduced the problem. At the very least, a more informative exception should be thrown.
Mar 20, 2007 at 4:02 PM

dastle wrote:
I'll have to take a look at that changeset to see what the exact error was. The library has gone through major refactoring since then and it's possible I re-introduced the problem. At the very least, a more informative exception should be thrown.


So is there anything i can do at the moment?
Coordinator
Mar 21, 2007 at 6:55 PM
I'll take a look at it today since someone else also had this problem.
Coordinator
Mar 21, 2007 at 8:38 PM
Well the other question turned out to be unrelated to this issue.

The error messages will be much improved for the next release.

Here are the possible causes:
- You are using an XML file and try to add two new animations with the same name
- You are using multiple animations with the same name
- (Unlikely) you are using an animation with more than one channel for the same bone.

If none of this helps, feel free to send the model. These are the only possible errors I could find in the processor.