textadventures / quest

Create text adventure games
http://textadventures.co.uk/quest
MIT License
304 stars 69 forks source link

System.ArgumentOutOfRangeException: Value must be non-negative and less than or equal to Int32.MaxValue. #1084

Closed kasperikoski closed 2 months ago

kasperikoski commented 5 years ago

When I try to start the editor, there comes an error saying:

System.ArgumentOutOfRangeException: Value must be non-negative and less than or equal to Int32.MaxValue.
Parameter name: pressure
   at System.GC.AddMemoryPressure(Int64 bytesAllocated)
   at System.Windows.Media.SafeMILHandle.UpdateEstimatedSize(Int64 estimatedSize)
   at System.Windows.Media.Imaging.BitmapFrameDecode.EnsureSource()
   at System.Windows.Media.Imaging.BitmapFrameDecode.FinalizeCreation()
   at System.Windows.Media.Imaging.BitmapFrameDecode..ctor(Int32 frameNumber, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, BitmapDecoder decoder)
   at System.Windows.Media.Imaging.BitmapDecoder.SetupFrames(BitmapDecoder decoder, ReadOnlyCollection`1 frames)
   at System.Windows.Media.Imaging.BitmapDecoder.get_Frames()
   at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation()
   at System.Windows.Media.Imaging.BitmapImage.EndInit()
   at TextAdventures.Quest.EditorControls.FileDropDown.RefreshFileList()
   at TextAdventures.Quest.EditorControls.FileControl.Populate(IEditorData data)
   at TextAdventures.Quest.EditorControls.ElementEditor.Populate(IEditorData data)
   at TextAdventures.Quest.WPFElementEditor.Populate(IEditorData data)
   at TextAdventures.Quest.Editor.ShowEditor(String key)
   at TextAdventures.Quest.Editor.ctlTree_SelectionChanged(String key)
   at TextAdventures.Quest.EditorControls.WFEditorTree.ChangeSelection(String key)
   at TextAdventures.Quest.EditorControls.WFEditorTree.SelectCurrentTreeViewItem()
   at TextAdventures.Quest.EditorControls.WFEditorTree.ctlTreeView_AfterSelect(Object sender, TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.OnAfterSelect(TreeViewEventArgs e)
   at System.Windows.Forms.TreeView.TvnSelected(NMTREEVIEW* nmtv)
   at System.Windows.Forms.TreeView.WmNotify(Message& m)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I click OK and then comes:

Parameter name: pressure
   at System.GC.AddMemoryPressure(Int64 bytesAllocated)
   at System.Windows.Media.SafeMILHandle.UpdateEstimatedSize(Int64 estimatedSize)
   at System.Windows.Media.Imaging.BitmapFrameDecode.EnsureSource()
   at System.Windows.Media.Imaging.BitmapFrameDecode.FinalizeCreation()
   at System.Windows.Media.Imaging.BitmapFrameDecode..ctor(Int32 frameNumber, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, BitmapDecoder decoder)
   at System.Windows.Media.Imaging.BitmapDecoder.SetupFrames(BitmapDecoder decoder, ReadOnlyCollection`1 frames)
   at System.Windows.Media.Imaging.BitmapDecoder.get_Frames()
   at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation()
   at System.Windows.Media.Imaging.BitmapImage.EndInit()
   at TextAdventures.Quest.EditorControls.FileDropDown.RefreshFileList()
   at TextAdventures.Quest.EditorControls.FileControl.Populate(IEditorData data)
   at TextAdventures.Quest.EditorControls.ElementEditor.Populate(IEditorData data)
   at TextAdventures.Quest.WPFElementEditor.Populate(IEditorData data)
   at TextAdventures.Quest.Editor.ShowEditor(String key)
   at TextAdventures.Quest.Editor._Closure$__64-0._Lambda$__0()

Quest 5.8.0 Windows 10 Pro (1903)

alexwarren commented 2 months ago

Closing out old issues. Please re-open with any additional repro steps if this is still a problem.