ShareX / ShareX

ShareX is a free and open source program that lets you capture or record any area of your screen and share it with a single press of a key. It also allows uploading images, text or other types of files to many supported destinations you can choose from.
https://getsharex.com
GNU General Public License v3.0
28.37k stars 3.11k forks source link

I am not a coding expert at all, and I keep getting this error. Can someone help me? #7358

Open loserbt opened 3 months ago

loserbt commented 3 months ago

I downloaded the current and two previous versions and tried them all but I keep getting this error. It worked wonderfully couple of days ago, but today it seems to act up and give me this error. Can someone help me? PS: I am on Windows 11.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.SEHException: External component has thrown an exception. at System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromStream(IStream stream, IntPtr& image) at System.Drawing.Image.InitializeFromStream(Stream stream) at System.Drawing.Image..ctor(SerializationInfo info, StreamingContext context) at System.Drawing.Bitmap..ctor(SerializationInfo info, StreamingContext context) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.SerializationInvoke(IRuntimeMethodInfo method, Object target, SerializationInfo info, StreamingContext& context) at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context) at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder) at System.Runtime.Serialization.ObjectManager.DoFixups() at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Resources.ResourceReader.DeserializeObject(Int32 typeIndex) at System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode) at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase, Boolean isString) at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream) at ShareX.HelpersLib.Properties.Resources.get_Loading() at ShareX.HelpersLib.MyPictureBox.InitializeComponent() at ShareX.HelpersLib.MyPictureBox..ctor() at ShareX.MainForm.InitializeComponent() at ShareX.MainForm.InitializeControls() at ShareX.Program.Run() at ShareX.Program.Main(String[] args)

ShareX 16.0.1

Combinacijus commented 2 months ago

This seems like error not really related to ShareX so I took liberty and edited GPT4 answer to copy here in case it might help

Given that the issue is with a GDI+ method used by the System.Drawing namespace to load an image from a stream, it might be related to a corrupted image resource within the application or the .NET Framework installation on your system. Here's what you could try:

  1. Run the application with administrative privileges to ensure it has all necessary permissions.
  2. If it's an issue with .NET Framework, you could try repairing or reinstalling the .NET Framework.
  3. If you suspect that the application configuration or temporary files may be corrupted, try clearing them. This might involve deleting user settings or application cache, which is typically found in the AppData directory on Windows.