Code Monkey home page Code Monkey logo

Comments (17)

urasandesu avatar urasandesu commented on May 24, 2024

It maybe seems same cause to #33. Could you download my latest local build *.nupkg and try the following steps?

  1. Install the above package.
  2. Unregister the Prig framework assemblies from GAC(execute gacutil /u "Urasandesu.Prig.Framework, Version=0.1.0.0, Culture=neutral, PublicKeyToken=acabb3ef0ebf69ce, processorArchitecture=MSIL" and gacutil /u "Urasandesu.NAnonym, Version=0.2.0.0, Culture=neutral, PublicKeyToken=ce9e95b04334d5fb, processorArchitecture=MSIL" from Developer Command Prompt for VS2013 as Administrator)
  3. Rebuild your test project.
  4. Copy the Prig framework assemblies to your test solution directory. For example, if your test solution is located at C:\Users\Wegged\Documents\Visual Studio 2013\Projects\YourTest\YourTest.sln, copy the assemblies like C:\Users\Wegged\Documents\Visual Studio 2013\Projects\YourTest\Urasandesu.NAnonym.dll and C:\Users\Wegged\Documents\Visual Studio 2013\Projects\YourTest\Urasandesu.Prig.Framework.dll.
  5. Copy the Prig framework assemblies to the directory that is same to test execution engine. Usually, it is C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow, so copy the assemblies to there like the above step.
  6. Execute your tests in Visuatl Studio Test Explorer.

If the internal error gone after the above steps, the cause is probably same as #33.

from prig.

wegged avatar wegged commented on May 24, 2024

Getting an error when trying to install the package am I using the correct command ?

c:\Users\wege\Desktop>choco install Prig.2.0.0-alpha031.nupkg
!!ATTENTION!!
The next version of Chocolatey (v0.9.9) will require -y to perform
behaviors that change state without prompting for confirmation. Start
using it now in your automated scripts.

For details on the all new Chocolatey, visit http://bit.ly/new_choco
Chocolatey (v0.9.8.33) is installing 'Prig.2.0.0-alpha031.nupkg' and dependencie
s. By installing you accept the license for 'Prig.2.0.0-alpha031.nupkg' and each
dependency you are installing.
Unable to find package 'Prig.2.0.0-alpha031.nupkg'.

Command 'install' failed (sometimes this indicates a partial failure). Additional info/packages: Prig.2.0.0-alpha031.nupkg

from prig.

wegged avatar wegged commented on May 24, 2024

I was able to run from command line and I have the same issues with the new build

from prig.

urasandesu avatar urasandesu commented on May 24, 2024

Thank you for trying the package!
If it was failed, I have no idea to debug that at the moment 😧

By the way, could you tell me the API that triggered the error?

In #33, it was System.Collections.Generic.List<T>.Add(T). If it is possible, I want to try mocking the API that you were going to replace, too.

from prig.

wegged avatar wegged commented on May 24, 2024

Honestly it could be something else my prig setup seems corrupt now lots of things are causing a crash that worked before. I tried to uninstall and reinstall from chocolaty and remove the files I copied over but it seems like its not helping.

The error occurs even if I am not mocking anything just creating an instance of the class.

from prig.

urasandesu avatar urasandesu commented on May 24, 2024

In Prig's architecture, the mocking preparation is usually done long before instantiating the target class in user's code. My guess is that the test executor of Visual Studio performs unintended instantiation against the target class in accordance with the indirection setting.

This is a just idea, but you can probably get some different results if deleting the indirection setting in reverse order.

from prig.

wegged avatar wegged commented on May 24, 2024

I get the same result with one indirectionsetting. Btw I managed to install your package but it seemed to make the issue worst maybe it is the same issue and there is a different regression in the new build.

I did a simple mscorlib test DateTime.Now that worked with the old build which I then uninstalled. Then I installed the new build and followed your instructions but it crashes with the new build.

I tested it with Nunit as well and I get the same behavior. CLR error:80004005

from prig.

wegged avatar wegged commented on May 24, 2024

Ok I take it back the new version works with NUnit for the simple case. For the case raising the issue before it just hangs. I do see this in the log folder though perhaps this will shed some light.

","C:\Users\Akira\Prig\Swathe\Urasandesu.Swathe\Urasandesu/Swathe/Profiling/ICorProfilerCallbackImpl.h",274,"long __cdecl CWeaverDetail::CWeaverImpl::JITCompilationStartedCore(unsigned __int64,int)=>'Weaver.cpp,393","pModProf.IsPersisted()=>'Weaver.cpp,412","!prigData.m_indirectablesInit=>'Weaver.cpp,425"
2015/04/09 11:08:34.157604,ERROR,00000x3740,26,0x00003bbc," C:\Users\Akira\Prig\Swathe\Urasandesu.Swathe\Urasandesu/Swathe/Metadata/BaseClassPimpl/BaseAssemblyMetadataPimpl.hpp(2125): Throw in function void __cdecl Urasandesu::Swathe::Metadata::BaseClassPimpl::BaseAssemblyMetadataPimpl''::ResolveAssemblyPathByCurrentDirectory(const class Urasandesu::Swathe::Metadata::BaseClassPimpl::BaseAssemblyMetadataPimpl'' *,const class std::basic_string'<wchar_t,struct std::char_traits'<wchar_t>',class std::allocator'<wchar_t>' >' &,class boost::filesystem::path &)
Dynamic exception type: class boost::exception_detail::clone_impl''
std::exception::what: The designated assembly is not found: Urasandesu.Prig.Framework
[struct Urasandesu::CppAnonym::tag_stack_trace * __ptr64] = at '' in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at TranslateSecurityAttributes in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at CopyPDBs in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at InstallCustomModule in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at InstallCustomModule in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at '' in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at '' in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at '' in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at InstallCustomModule in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at DllGetClassObjectInternal in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at InitializeFusion in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at _CorExeMain in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at _CorExeMain in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at _CorExeMain in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at _CorExeMain in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at _CorExeMain in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll
at _CorExeMain in C:\Windows\SYSTEM32\MSCOREE.DLL
at BaseThreadInitThunk in C:\Windows\system32\KERNEL32.dll
at RtlUserThreadStart in C:\Windows\SYSTEM32\ntdll.dll

","C:\Users\Akira\Prig\Swathe\Urasandesu.Swathe\Urasandesu/Swathe/Profiling/ICorProfilerCallbackImpl.h",274,"long __cdecl CWeaverDetail::CWeaverImpl::JITCompilationStartedCore(unsigned __int64,int)=>'Weaver.cpp,393","pModProf.IsPersisted()=>'Weaver.cpp,412","!prigData.m_indirectablesInit=>'Weaver.cpp,425"
2015/04/09 11:16:37.773337,ERROR,00000x47ac,18541,0x00003700," C:\Users\Akira\Prig\Swathe\Urasandesu.Swathe\Urasandesu/Swathe/Metadata/BaseClassPimpl/BaseInstructionMetadataPimpl.hpp(431): Throw in function unsigned long __cdecl Urasandesu::Swathe::Metadata::BaseClassPimpl::BaseInstructionMetadataPimpl''::TakeInlineToken(const class Urasandesu::Swathe::Metadata::BaseClassPimpl::BaseInstructionMetadataPimpl'' *,const unsigned char *,const unsigned char *,class boost::variant'<struct boost::blank,bool,unsigned char,double,short,int,int64,struct Urasandesu::Swathe::Metadata::ILocal const *,struct Urasandesu::Swathe::Metadata::Signature const *,struct Urasandesu::Swathe::Metadata::IField const *,struct Urasandesu::Swathe::Metadata::IMethod const *,char,float,class std::basic_string'<wchar_t,struct std::char_traits'<wchar_t>',class std::allocator'<wchar_t>' >',struct Urasandesu::Swathe::Metadata::IType const *,class Urasandesu::Swathe::Metadata::Label,class std::vector'<int,class std::allocator'' >',class std::vector'<class Urasandesu::Swathe::Metadata::Label,class std::allocator'' >',struct boost::detail::variant::void,struct boost::detail::variant::void>' &)
Dynamic exception type: class boost::exception_detail::clone_impl''
std::exception::what: mdtTarget: 0x0A00045C
[struct Urasandesu::CppAnonym::tag_stack_trace * __ptr64] = at '' in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at DllUnregisterServer in C:\ProgramData\chocolatey\lib\Prig.2.0.0-alpha031\tools\x64\Urasandesu.Prig.dll
at TranslateSecurityAttributes in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at CopyPDBs in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at InstallCustomModule in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at InstallCustomModule in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at '' in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
at '' in ''
at '' in ''
at '' in ''
at '' in ''
at '' in ''
at '' in ''

","C:\Users\Akira\Prig\Swathe\Urasandesu.Swathe\Urasandesu/Swathe/Profiling/ICorProfilerCallbackImpl.h",274,"long __cdecl CWeaverDetail::CWeaverImpl::JITCompilationStartedCore(unsigned __int64,int)=>'Weaver.cpp,393","pModProf.IsPersisted()=>'Weaver.cpp,412","(result = prigData.m_indirectables.find(mdt)) != prigData.m_indirectables.end()=>'Weaver.cpp,454","Modifying method=>'Weaver.cpp,460"

from prig.

wegged avatar wegged commented on May 24, 2024

sent some details via email by process of elimination I have found at least two methods in my class where if I add settings to stub them I have the hanging/crashing behavior

from prig.

urasandesu avatar urasandesu commented on May 24, 2024

Thank you for the detailed information! 😆
The log indicates the two errors that have separate causes:

  1. Urasandesu.Prig.Framework was not found (occurred at 2015/04/09 11:08:34.157604).
  2. Some MemberRef token appeared after ldtoken opcode in the indirection target method (occurred at 2015/04/09 11:16:37.773337).

About the 1st error, I believe that you have already resolved. Because it is impossible that the 2nd error occurs before the fix in same environment.
About the 2nd error, it is certainly a bug of the infrastructure of Prig.

My guess is the method you e-mailed contains the section that is cause like the 2nd error.

from prig.

wegged avatar wegged commented on May 24, 2024

Would it be possible to get a build with the fix to test this out?

Thanks

from prig.

urasandesu avatar urasandesu commented on May 24, 2024

Yes, of cource 👌
My latest local build *.nupkg is here. Could you retry the above steps?

from prig.

wegged avatar wegged commented on May 24, 2024

Ok one problem solved there is another method in the same class giving me issues now. This is the stacktrace

ntdll.dll!7707e753()    Unknown
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] 
ntdll.dll!7707f659()    Unknown
ntdll.dll!76fde023()    Unknown

Urasandesu.Prig.dll!0ffca699() Unknown
ntdll.dll!76fcfaea() Unknown
Urasandesu.Prig.dll!0ff40479() Unknown
clrjit.dll!72caa00b() Unknown
clrjit.dll!72c99bf5() Unknown
clrjit.dll!72ca44cb() Unknown
clrjit.dll!72ca087b() Unknown
clrjit.dll!72ca08a0() Unknown
Urasandesu.Prig.dll!0ff3cecd() Unknown
Urasandesu.Prig.dll!0ff3e97a() Unknown
Urasandesu.Prig.dll!0ff3d34b() Unknown
[Managed to Native Transition]
UnitTestProject1.dll!UnitTestProject1.UnitTest1.TestMethod4() Line 46 C#

Problem signature:
Problem Event Name: APPCRASH
Application Name: vstest.executionengine.x86.exe
Application Version: 12.0.30501.0
Application Timestamp: 5361ed09
Fault Module Name: StackHash_3850
Fault Module Version: 6.1.7601.18247
Fault Module Timestamp: 521ea8e7
Exception Code: c0000374
Exception Offset: 000ce753
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1033
Additional Information 1: 3850
Additional Information 2: 38507ad4ca1a60c461749906b4a1931a
Additional Information 3: 379f
Additional Information 4: 379f2e6d04cbd4636ecb4e9076766b08

I should also mention with the new packages I get unable to connect to test process when I run x64 as the test platform not sure why this is.

This is when stubbing out the GetQuotes signature I emailed you.

from prig.

wegged avatar wegged commented on May 24, 2024

interestingly enough I readded the assemblies to the gac (and kept the assemblies local as well) and both issues (x64 and the issue with the stub are both resolved) 👯 !

from prig.

wegged avatar wegged commented on May 24, 2024

Spoke to soon problem came back. I cant resolve it the same way this time. Not sure what the issue is.

from prig.

wegged avatar wegged commented on May 24, 2024

These issues are all resolved btw everything is working now.

from prig.

urasandesu avatar urasandesu commented on May 24, 2024

Oh! That's great! Congratulation! 🎉

My understanding is that the remaining issue is to automate the manual installation steps.
It will be handled by Issue #33, so let me close this issue.

from prig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.