[GH-ISSUE #1032] [Bug] Program do NOT launch on arm64 #781

Closed
opened 2026-02-26 09:32:36 +03:00 by kerem · 14 comments
Owner

Originally created by @gxj8885718 on GitHub (Dec 27, 2021).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/1032

Originally assigned to: @NickeManarin on GitHub.

Describe the bug
either github release nor windows store edition, can't open screentogif.
runtime installed.
just process, no windows

Desktop (please complete the following information):

  • system:windows 10 21H2
  • device:huawei matebook e 2019
  • architecture:arm64
  • screentogif version:2.35.2

image

Originally created by @gxj8885718 on GitHub (Dec 27, 2021). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/1032 Originally assigned to: @NickeManarin on GitHub. **Describe the bug** either github release nor windows store edition, can't open screentogif. runtime installed. just process, no windows **Desktop (please complete the following information):** - system:windows 10 21H2 - device:huawei matebook e 2019 - architecture:arm64 - screentogif version:2.35.2 ![image](https://user-images.githubusercontent.com/6293425/147453823-2f1e15d3-25ad-4fcc-935c-e4dfe71caa89.png)
Author
Owner

@gxj8885718 commented on GitHub (Dec 27, 2021):

PS: 2.34.1 works fine.

<!-- gh-comment-id:1001444494 --> @gxj8885718 commented on GitHub (Dec 27, 2021): PS: 2.34.1 works fine.
Author
Owner

@NickeManarin commented on GitHub (Dec 27, 2021):

Hi, any error in the event viewer?

image

<!-- gh-comment-id:1001557659 --> @NickeManarin commented on GitHub (Dec 27, 2021): Hi, any error in the event viewer? ![image](https://user-images.githubusercontent.com/14798947/147474092-c5cdf6d8-dea2-4468-9a01-a410faf09146.png)
Author
Owner

@gxj8885718 commented on GitHub (Dec 27, 2021):

just clear all logs and start screentogif,then refresh windws log, nope, it's empty, nothing logged.
image

<!-- gh-comment-id:1001579591 --> @gxj8885718 commented on GitHub (Dec 27, 2021): just clear all logs and start screentogif,then refresh windws log, nope, it's empty, nothing logged. ![image](https://user-images.githubusercontent.com/6293425/147478044-c7c1cd70-05ee-415a-a3a4-3114ddd564d8.png)
Author
Owner

@gxj8885718 commented on GitHub (Dec 27, 2021):

image
<!-- gh-comment-id:1001580376 --> @gxj8885718 commented on GitHub (Dec 27, 2021): <img width="863" alt="image" src="https://user-images.githubusercontent.com/6293425/147478203-cfd2b1dd-fbd9-4c11-86a5-192535c86384.png">
Author
Owner

@gxj8885718 commented on GitHub (Dec 27, 2021):

image
runtime installed

<!-- gh-comment-id:1001580893 --> @gxj8885718 commented on GitHub (Dec 27, 2021): ![image](https://user-images.githubusercontent.com/6293425/147478322-084c3903-53b8-4bd6-a754-2b37adbe49dc.png) runtime installed
Author
Owner

@NickeManarin commented on GitHub (Dec 27, 2021):

Thanks.
In the folder where the app is installed, are there any logs?

It's usually inside a folder, like ScreenToGif (install folder) > ScreenToGif > Logs.
Or inside Users > User > Documents > ScreenToGif.

<!-- gh-comment-id:1001585351 --> @NickeManarin commented on GitHub (Dec 27, 2021): Thanks. In the folder where the app is installed, are there any logs? It's usually inside a folder, like ScreenToGif (install folder) > ScreenToGif > Logs. Or inside Users > User > Documents > ScreenToGif.
Author
Owner

@gxj8885718 commented on GitHub (Dec 28, 2021):

Here's the log(under /users/username/documents/screentogif

► Title -
On dispacher unhandled exception - Unknown
▬ Message -
试图加载格式不正确的程序。 (0x8007000B)
○ Type -
System.BadImageFormatException
♦ [Version] Date/Hour -
[2.35.2] 12/28/2021 19:04:00
▲ Source -
PresentationCore
▼ TargetSite -
Void RenderOptions_ForceSoftwareRenderingModeForProcess(Boolean)
► Fuslog -

♠ StackTrace -
at MS.Win32.PresentationCore.UnsafeNativeMethods.MilCoreApi.RenderOptions_ForceSoftwareRenderingModeForProcess(Boolean fForce)
at System.Windows.Media.RenderOptions.set_ProcessRenderMode(RenderMode value)
at ScreenToGif.App.App_Startup(Object sender, StartupEventArgs e) in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\App.xaml.cs:line 156
at System.Windows.Application.OnStartup(StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)


► Title -
Error while displaying the error.
▬ Message -
Add value to collection of type 'System.Windows.Controls.UIElementCollection' threw an exception.
○ Type -
System.Windows.Markup.XamlParseException
♦ [Version] Date/Hour -
[2.35.2] 12/28/2021 19:04:00
▲ Source -
PresentationFramework
▼ TargetSite -
Void RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri)
♠ StackTrace -
at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri)
at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri)
at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at ScreenToGif.Windows.Other.ExceptionDialog.InitializeComponent() in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\Windows\Other\ExceptionDialog.xaml:line 1
at ScreenToGif.Windows.Other.ExceptionDialog..ctor(Exception exception) in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\Windows\Other\ExceptionDialog.xaml.cs:line 21
at ScreenToGif.Windows.Other.ExceptionDialog.Ok(Exception exception, String title, String instruction, String observation, Boolean bugWith4055002) in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\Windows\Other\ExceptionDialog.xaml.cs:line 101
at ScreenToGif.App.<>c__DisplayClass21_0.b__0() in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\App.xaml.cs:line 433
at System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
at System.Windows.Threading.Dispatcher.Invoke(Action callback)
at ScreenToGif.App.ShowException(Exception exception) in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\App.xaml.cs:line 428
at ScreenToGif.App.App_DispatcherUnhandledException(Object sender, DispatcherUnhandledExceptionEventArgs e) in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\App.xaml.cs:line 238

▬▬ Message -
试图加载格式不正确的程序。 (0x8007000B)
○○ Type -
System.BadImageFormatException
▲▲ Source -
PresentationCore
▼▼ TargetSite -
Void .ctor(System.Windows.Media.MediaContext)
♠♠ StackTrace -
at System.Windows.Media.MediaContextNotificationWindow..ctor(MediaContext ownerMediaContext)
at System.Windows.Media.MediaContext..ctor(Dispatcher dispatcher)
at System.Windows.Media.MediaContext.From(Dispatcher dispatcher)
at System.Windows.Media.Visual.VerifyAPIReadWrite()
at System.Windows.Media.VisualCollection.Add(Visual visual)
at System.Windows.Controls.UIElementCollection.AddInternal(UIElement element)
at System.Windows.Controls.UIElementCollection.Add(UIElement element)
at System.Windows.Controls.UIElementCollection.System.Collections.IList.Add(Object value)
at System.Xaml.Schema.XamlTypeInvoker.AddToCollection(Object instance, Object item)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.Add(Object collection, XamlType collectionType, Object value, XamlType valueXamlType)


<!-- gh-comment-id:1002024323 --> @gxj8885718 commented on GitHub (Dec 28, 2021): Here's the log(under /users/username/documents/screentogif ------------------------------------------------------- ► Title - On dispacher unhandled exception - Unknown ▬ Message - 试图加载格式不正确的程序。 (0x8007000B) ○ Type - System.BadImageFormatException ♦ [Version] Date/Hour - [2.35.2] 12/28/2021 19:04:00 ▲ Source - PresentationCore ▼ TargetSite - Void RenderOptions_ForceSoftwareRenderingModeForProcess(Boolean) ► Fuslog - ♠ StackTrace - at MS.Win32.PresentationCore.UnsafeNativeMethods.MilCoreApi.RenderOptions_ForceSoftwareRenderingModeForProcess(Boolean fForce) at System.Windows.Media.RenderOptions.set_ProcessRenderMode(RenderMode value) at ScreenToGif.App.App_Startup(Object sender, StartupEventArgs e) in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\App.xaml.cs:line 156 at System.Windows.Application.OnStartup(StartupEventArgs e) at System.Windows.Application.<.ctor>b__1_0(Object unused) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) ---------------------------------- ► Title - Error while displaying the error. ▬ Message - Add value to collection of type 'System.Windows.Controls.UIElementCollection' threw an exception. ○ Type - System.Windows.Markup.XamlParseException ♦ [Version] Date/Hour - [2.35.2] 12/28/2021 19:04:00 ▲ Source - PresentationFramework ▼ TargetSite - Void RewrapException(System.Exception, System.Xaml.IXamlLineInfo, System.Uri) ♠ StackTrace - at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at ScreenToGif.Windows.Other.ExceptionDialog.InitializeComponent() in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\Windows\Other\ExceptionDialog.xaml:line 1 at ScreenToGif.Windows.Other.ExceptionDialog..ctor(Exception exception) in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\Windows\Other\ExceptionDialog.xaml.cs:line 21 at ScreenToGif.Windows.Other.ExceptionDialog.Ok(Exception exception, String title, String instruction, String observation, Boolean bugWith4055002) in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\Windows\Other\ExceptionDialog.xaml.cs:line 101 at ScreenToGif.App.<>c__DisplayClass21_0.<ShowException>b__0() in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\App.xaml.cs:line 433 at System.Windows.Threading.Dispatcher.Invoke(Action callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout) at System.Windows.Threading.Dispatcher.Invoke(Action callback) at ScreenToGif.App.ShowException(Exception exception) in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\App.xaml.cs:line 428 at ScreenToGif.App.App_DispatcherUnhandledException(Object sender, DispatcherUnhandledExceptionEventArgs e) in C:\Users\nicke\source\repos\ScreenToGif\ScreenToGif\App.xaml.cs:line 238 ▬▬ Message - 试图加载格式不正确的程序。 (0x8007000B) ○○ Type - System.BadImageFormatException ▲▲ Source - PresentationCore ▼▼ TargetSite - Void .ctor(System.Windows.Media.MediaContext) ♠♠ StackTrace - at System.Windows.Media.MediaContextNotificationWindow..ctor(MediaContext ownerMediaContext) at System.Windows.Media.MediaContext..ctor(Dispatcher dispatcher) at System.Windows.Media.MediaContext.From(Dispatcher dispatcher) at System.Windows.Media.Visual.VerifyAPIReadWrite() at System.Windows.Media.VisualCollection.Add(Visual visual) at System.Windows.Controls.UIElementCollection.AddInternal(UIElement element) at System.Windows.Controls.UIElementCollection.Add(UIElement element) at System.Windows.Controls.UIElementCollection.System.Collections.IList.Add(Object value) at System.Xaml.Schema.XamlTypeInvoker.AddToCollection(Object instance, Object item) at MS.Internal.Xaml.Runtime.ClrObjectRuntime.Add(Object collection, XamlType collectionType, Object value, XamlType valueXamlType) ----------------------------------
Author
Owner

@gxj8885718 commented on GitHub (Dec 28, 2021):

have tried 3 versions of screentogif
2.35.2 arm64 failed
2.35.2 x86 failed
2.35.0 arm64 failed
2.35.0 x86 failed
2.34.1 x86 worked

so the problem could be both .NET 6 or project restructuring.

<!-- gh-comment-id:1002039636 --> @gxj8885718 commented on GitHub (Dec 28, 2021): have tried 3 versions of screentogif 2.35.2 arm64 failed 2.35.2 x86 failed 2.35.0 arm64 failed 2.35.0 x86 failed 2.34.1 x86 worked so the problem could be both .NET 6 or project restructuring.
Author
Owner

@NickeManarin commented on GitHub (Dec 28, 2021):

The logs tell me that at least one DLL from a different assembly is trying to get loaded, which causes the error (bad image).

<!-- gh-comment-id:1002044147 --> @NickeManarin commented on GitHub (Dec 28, 2021): The logs tell me that at least one DLL from a different assembly is trying to get loaded, which causes the error (bad image).
Author
Owner

@gxj8885718 commented on GitHub (Dec 28, 2021):

clean install Windows 10 Pro 21H2 , nothing modified. All drivers from stock system image. no strange software installed.

<!-- gh-comment-id:1002076900 --> @gxj8885718 commented on GitHub (Dec 28, 2021): clean install Windows 10 Pro 21H2 , nothing modified. All drivers from stock system image. no strange software installed.
Author
Owner

@NickeManarin commented on GitHub (Dec 29, 2021):

Hi @gxj8885718, can you try this one?
It's working in here.

ScreenToGif.zip

<!-- gh-comment-id:1002789916 --> @NickeManarin commented on GitHub (Dec 29, 2021): Hi @gxj8885718, can you try this one? It's working in here. [ScreenToGif.zip](https://github.com/NickeManarin/ScreenToGif/files/7790761/ScreenToGif.zip)
Author
Owner

@gxj8885718 commented on GitHub (Dec 30, 2021):

Hi @gxj8885718, can you try this one? It's working in here.

ScreenToGif.zip

Wonderful!! it works!! Great job!

<!-- gh-comment-id:1002950623 --> @gxj8885718 commented on GitHub (Dec 30, 2021): > Hi @gxj8885718, can you try this one? It's working in here. > > [ScreenToGif.zip](https://github.com/NickeManarin/ScreenToGif/files/7790761/ScreenToGif.zip) Wonderful!! it works!! Great job!
Author
Owner

@NickeManarin commented on GitHub (Dec 30, 2021):

Thank you!

<!-- gh-comment-id:1003056815 --> @NickeManarin commented on GitHub (Dec 30, 2021): Thank you!
Author
Owner

@NickeManarin commented on GitHub (Dec 30, 2021):

Version 2.35.3 should be working then.

<!-- gh-comment-id:1003056950 --> @NickeManarin commented on GitHub (Dec 30, 2021): Version 2.35.3 should be working then.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#781
No description provided.