[Mono-dev] Using imageList with treeView: TargetInvocationException
Heertsch
heertsch at gmail.com
Mon Oct 5 16:30:24 EDT 2009
If I use a imageList ("ilTreeView") with treeView in winforms I get the
following exception in the forms-designer at line:
this.ilTreeView.ImageStream =
((System.Windows.Forms.ImageListStreamer)(resources.GetObject("ilTreeView.ImageStream")));
the same code runs in nativ windows fine.
is this a know bug?
Thanks Andreas
Unhandled Exception: System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. --->
System.ArgumentException: index+count
Parameter name: The size of the buffer is less than index + count.
at System.IO.MemoryStream.InternalConstructor (System.Byte[] buffer, Int32
index, Int32 count, Boolean writable, Boolean publicallyVisible) [0x00000]
at System.IO.MemoryStream..ctor (System.Byte[] buffer, Int32 index, Int32
count) [0x00000]
at (wrapper remoting-invoke-with-check) System.IO.MemoryStream:.ctor
(byte[],int,int)
at System.Windows.Forms.ImageListStreamer..ctor
(System.Runtime.Serialization.SerializationInfo info, StreamingContext
context) [0x0014a] in
/private/tmp/monobuild/build/BUILD/mono-2.4.2.3/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ImageListStreamer.cs:91
at (wrapper managed-to-native)
System.Reflection.MonoCMethod:InternalInvoke
(object,object[],System.Exception&)
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000]
--- End of inner exception stack trace ---
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00000]
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[]
parameters) [0x00000]
at System.Runtime.Serialization.ObjectRecord.LoadData
(System.Runtime.Serialization.ObjectManager manager, ISurrogateSelector
selector, StreamingContext context) [0x00000]
at System.Runtime.Serialization.ObjectManager.DoFixups () [0x00000]
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject
(System.IO.BinaryReader reader) [0x00000]
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph
(System.IO.BinaryReader reader, Boolean readHeaders, System.Object& result,
System.Runtime.Remoting.Messaging.Header[]& headers) [0x00000]
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize
(System.IO.Stream serializationStream,
System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000]
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
(System.IO.Stream serializationStream) [0x00000]
at System.Resources.ResourceReader.ReadNonPredefinedValue (System.Type
exp_type) [0x00000]
at System.Resources.ResourceReader.ReadValueVer2 (Int32 type_index)
[0x00000]
at System.Resources.ResourceReader.LoadResourceValues
(.ResourceCacheItem[] store) [0x00000]
at System.Resources.ResourceReader+ResourceEnumerator.FillCache ()
[0x00000]
at System.Resources.ResourceReader+ResourceEnumerator..ctor
(System.Resources.ResourceReader readerToEnumerate) [0x00000]
at System.Resources.ResourceReader.GetEnumerator () [0x00000]
at System.Resources.ResourceSet.ReadResources () [0x00000]
at System.Resources.ResourceSet.GetObjectInternal (System.String name,
Boolean ignoreCase) [0x00000]
at System.Resources.ResourceSet.GetObject (System.String name, Boolean
ignoreCase) [0x00000]
at System.Resources.RuntimeResourceSet.GetObject (System.String name,
Boolean ignoreCase) [0x00000]
at System.Resources.ResourceManager.GetObject (System.String name,
System.Globalization.CultureInfo culture) [0x00000]
at System.Resources.ResourceManager.GetObject (System.String name)
[0x00000]
at Basal.Forms.FrmBasal.InitializeComponent () [0x00000]
at Basal.Forms.FrmBasal..ctor () [0x00000]
at (wrapper remoting-invoke-with-check) Basal.Forms.FrmBasal:.ctor ()
at Basal.Code.Program.Main () [0x00000]
Die Anwendung beendete mit Code: SIGHUP
--
View this message in context: http://www.nabble.com/Using-imageList-with-treeView%3A-TargetInvocationException-tp25757001p25757001.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list
mailing list