Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUI test TestBasic.Test_that_error_report_doesnt_break_the_app fails #66

Closed
krahlro-sick opened this issue Feb 22, 2021 · 4 comments
Closed
Assignees
Labels
bug Something isn't working Metamodel V2.0 The issue is regarding AASPE with Metamodel version V2.0

Comments

@krahlro-sick
Copy link
Contributor

cc @mristin

The problem persists after cleaning and re-building the project. The directory 2zgfhisg.hjx that is mentioned in the exception message does not exist.

The following build will be used for the tests: >>> C:\Projects\aasx-package-explorer\artefacts\build\Debug <<<

NUnit Console Runner 3.11.1 (.NET 2.0)
Copyright (c) 2020 Charlie Poole, Rob Prouse
Montag, 22. Februar 2021 15:26:15

Runtime Environment
   OS Version: Microsoft Windows NT 6.2.9200.0
   Runtime: .NET Framework CLR v4.0.30319.42000

Test Files
    C:\Projects\aasx-package-explorer\artefacts\build\Debug\AasxPackageExplorer.GuiTests.dll

Test Filters
    Test: AasxPackageExplorer.GuiTests.TestBasic.Test_that_error_report_doesnt_break_the_app

Unbehandelte Ausnahme: AasxWpfControlLibrary.PackageCentral.PackageCentralException: PackageCentral: while performing load from C:\Users\krahlro\AppData\Local\Temp\2zgfhisg.hjx\invalid.aasx at \PackageCentral.cs:Zeile 94. gave: Mindestens ein Fehler ist aufgetreten. ---> System.AggregateException: Mindestens ein Fehler ist aufgetreten. ---> AasxWpfControlLibrary.PackageCentral.PackageContainerException: While opening aasx C:\Users\krahlro\AppData\Local\Temp\tmpE032.aasx from source local file: C:\Users\krahlro\AppData\Local\Temp\2zgfhisg.hjx\invalid.aasx buffered to: C:\Users\krahlro\AppData\Local\Temp\tmpE032.aasx at \AdminShellPackageEnv.cs:Zeile 300. gave: While opening the package to read AASX C:\Users\krahlro\AppData\Local\Temp\tmpE032.aasx at \AdminShellPackageEnv.cs:Zeile 296. gave: Die Datei enthõlt beschõdigte Daten.
   bei AasxWpfControlLibrary.PackageCentral.PackageContainerLocalFile.<LoadFromSourceAsync>d__10.MoveNext() in C:\Projects\aasx-package-explorer\src\AasxWpfControlLibrary\PackageCentral\PackageContainerLocalFile.cs:Zeile 148.
--- Ende der Stapel³berwachung vom vorhergehenden Ort, an dem die Ausnahme ausgel÷st wurde ---
   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   bei AasxWpfControlLibrary.PackageCentral.PackageContainerLocalFile.<CreateAndLoadAsync>d__6.MoveNext() in C:\Projects\aasx-package-explorer\src\AasxWpfControlLibrary\PackageCentral\PackageContainerLocalFile.cs:Zeile 85.
--- Ende der Stapel³berwachung vom vorhergehenden Ort, an dem die Ausnahme ausgel÷st wurde ---
   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   bei AasxWpfControlLibrary.PackageCentral.PackageContainerFactory.<GuessAndCreateForAsync>d__1.MoveNext() in C:\Projects\aasx-package-explorer\src\AasxWpfControlLibrary\PackageCentral\PackageContainerFactory.cs:Zeile 193.
--- Ende der Stapel³berwachung vom vorhergehenden Ort, an dem die Ausnahme ausgel÷st wurde ---
   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bei System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   bei System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   bei AasxWpfControlLibrary.PackageCentral.PackageCentralItem.<>c__DisplayClass5_0.<<Load>b__0>d.MoveNext() in C:\Projects\aasx-package-explorer\src\AasxWpfControlLibrary\PackageCentral\PackageCentral.cs:Zeile 86.
   --- Ende der internen Ausnahmestapel³berwachung ---
   bei System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   bei AasxWpfControlLibrary.PackageCentral.PackageCentralItem.Load(PackageCentral packageCentral, String location, String fullItemLocation, Boolean overrideLoadResident, PackageContainerOptionsBase containerOptions, PackCntRuntimeOptions runtimeOptions) in C:\Projects\aasx-package-explorer\src\AasxWpfControlLibrary\PackageCentral\PackageCentral.cs:Zeile 94.
   --- Ende der internen Ausnahmestapel³berwachung ---
   bei AasxWpfControlLibrary.PackageCentral.PackageCentralItem.Load(PackageCentral packageCentral, String location, String fullItemLocation, Boolean overrideLoadResident, PackageContainerOptionsBase containerOptions, PackCntRuntimeOptions runtimeOptions) in C:\Projects\aasx-package-explorer\src\AasxWpfControlLibrary\PackageCentral\PackageCentral.cs:Zeile 105.
   bei AasxPackageExplorer.MainWindow.UiLoadPackageWithNew(PackageCentralItem packItem, AdminShellPackageEnv takeOverEnv, String loadLocalFilename, String info, Boolean onlyAuxiliary, Boolean doNotNavigateAfterLoaded, PackageContainerBase takeOverContainer, String storeFnToLRU) in C:\Projects\aasx-package-explorer\src\AasxPackageExplorer\MainWindow.xaml.cs:Zeile 222.
   bei AasxPackageExplorer.MainWindow.<CommandBinding_GeneralDispatch>d__4.MoveNext() in C:\Projects\aasx-package-explorer\src\AasxPackageExplorer\MainWindow.CommandBindings.cs:Zeile 136.
--- Ende der Stapel³berwachung vom vorhergehenden Ort, an dem die Ausnahme ausgel÷st wurde ---
   bei System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
   bei MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bei MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   bei System.Windows.Threading.DispatcherOperation.Invoke()
   bei System.Windows.Threading.Dispatcher.ProcessQueue()
   bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   bei System.Windows.Application.RunDispatcher(Object ignore)
   bei System.Windows.Application.RunInternal(Window window)
   bei AasxPackageExplorer.App.Main()

Errors, Failures and Warnings

1) Failed : AasxPackageExplorer.GuiTests.TestBasic.Test_that_error_report_doesnt_break_the_app
The application unexpectedly exited. Check manually why the file could not be opened: C:\Users\krahlro\AppData\Local\Temp\2zgfhisg.hjx\invalid.aasx
   bei AasxPackageExplorer.GuiTests.Common.AssertLoadAasx(Application application, Window mainWindow, String path) in C:\Projects\aasx-package-explorer\src\AasxPackageExplorer.GuiTests\Common.cs:Zeile 272.
   bei AasxPackageExplorer.GuiTests.TestBasic.<>c__DisplayClass7_0.<Test_that_error_report_doesnt_break_the_app>b__0(Application application, UIA3Automation automation, Window mainWindow) in C:\Projects\aasx-package-explorer\src\AasxPackageExplorer.GuiTests\Test.cs:Zeile 156.
   bei AasxPackageExplorer.GuiTests.Common.RunWithMainWindow(Implementation implementation, Run run) in C:\Projects\aasx-package-explorer\src\AasxPackageExplorer.GuiTests\Common.cs:Zeile 169.
   bei AasxPackageExplorer.GuiTests.TestBasic.Test_that_error_report_doesnt_break_the_app() in C:\Projects\aasx-package-explorer\src\AasxPackageExplorer.GuiTests\Test.cs:Zeile 154.

Execution terminated after first error

Run Settings
    DisposeRunners: True
    WorkDirectory: C:\Projects\aasx-package-explorer\artefacts\build\Debug
    StopOnError: True
    ImageRuntimeVersion: 4.0.30319
    ImageTargetFrameworkName: .NETFramework,Version=v4.7.2
    ImageRequiresX86: False
    ImageRequiresDefaultAppDomainAssemblyResolver: False
    RuntimeFramework: net-4.0
    NumberOfTestWorkers: 4

Test Run Summary
  Overall result: Failed
  Test Count: 1, Passed: 0, Failed: 1, Warnings: 0, Inconclusive: 0, Skipped: 0
    Failed Tests - Failures: 1, Errors: 0, Invalid: 0
  Start time: 2021-02-22 14:26:15Z
    End time: 2021-02-22 14:26:27Z
    Duration: 11.681 seconds

Results (nunit3) saved as C:\Projects\aasx-package-explorer\artefacts\GuiTestResults.xml
powershell : Running the GUI test(s) with Nunit3 console failed.
In Zeile:1 Zeichen:1
+ powershell -ExecutionPolicy Bypass -File .\TestGui.ps1 AasxPackageExp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Running the GUI...console failed.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
In C:\Projects\aasx-package-explorer\src\TestGui.ps1:152 Zeichen:13
+             throw "Running the GUI test(s) with Nunit3 console failed ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Running the GUI...console failed.:String) [], RuntimeException
    + FullyQualifiedErrorId : Running the GUI test(s) with Nunit3 console failed.
@krahlro-sick krahlro-sick added the bug Something isn't working label Feb 22, 2021
@mristin
Copy link
Contributor

mristin commented Feb 22, 2021

@krahlro-sick thanks, I'll try to have a look this Wednesday. This error shows up on master, I suppose?

@krahlro-sick
Copy link
Contributor Author

Yes, on c674d69. I might be able to bisect it tomorrow.

@krahlro-sick
Copy link
Contributor Author

756b3c2 is the first offending commit.

@martafullen martafullen transferred this issue from admin-shell-io/aasx-package-explorer Feb 16, 2024
@martafullen martafullen transferred this issue from another repository Feb 21, 2024
@juileetikekar juileetikekar self-assigned this Mar 28, 2024
@juileetikekar juileetikekar added the Metamodel V2.0 The issue is regarding AASPE with Metamodel version V2.0 label Mar 28, 2024
@juileetikekar
Copy link
Contributor

Hi @krahlro-sick,

The issue is not reproducible in the latest version of the AASX Package Explorer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Metamodel V2.0 The issue is regarding AASPE with Metamodel version V2.0
Projects
None yet
Development

No branches or pull requests

3 participants