Editing text causes unity to crash - unity3d-gui

What happened
When trying to change the text of a button or text, unity editor crashes.
How we can reproduce it using the example you attached
Create a new project.
Add Text (GameObject->UI->Text)
Crash occurs when you click to change the default "New Text" to something else.
Same happens with a button.
Unity Version is 5.1.1f1_2046fc06d4d8
I also tried it on another PC that had no Unity installed before: same result.
What am I doing wrong?
This is the Editor.log stacktrace:
========== OUTPUTING STACK TRACE ==================
000007FEEE95AF7E (mono) fmod
ERROR: SymGetSymFromAddr64, GetLastError: 'Kan opgegeven module niet vinden.' (Address: 000000000A98224A)
ERROR: SymGetModuleInfo64, GetLastError: 'Een initialisatieroutine van de dynamic link library (DLL-bestand) is mislukt.' (Address: 000000000A98224A)
000000000A98224A ((<unknown>))
0000000011C0D1FF (Mono JIT Code) [C:\buildslave\unity\build\artifacts\generated\common\runtime\GUIStyleBindings.gen.cs:781] UnityEngine.GUIStyle:DrawWithTextSelection (UnityEngine.Rect,UnityEngine.GUIContent,int,int,int,bool)
0000000011C0CED6 (Mono JIT Code) [C:\buildslave\unity\build\artifacts\generated\common\runtime\GUIStyleBindings.gen.cs:804] UnityEngine.GUIStyle:DrawWithTextSelection (UnityEngine.Rect,UnityEngine.GUIContent,int,int,int)
0000000011C0C702 (Mono JIT Code) [C:\buildslave\unity\build\Runtime\Export\TextEditor.cs:985] UnityEngine.TextEditor:DrawCursor (string)
000000001ADC1010 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\EditorGUI.cs:903] UnityEditor.EditorGUI:DoTextField (UnityEditor.EditorGUI/RecycledTextEditor,int,UnityEngine.Rect,string,UnityEngine.GUIStyle,string,bool&,bool,bool,bool)
0000000011BE54A2 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\EditorGUI.cs:1379] UnityEditor.EditorGUI:ScrollableTextAreaInternal (UnityEngine.Rect,string,UnityEngine.Vector2&,UnityEngine.GUIStyle)
0000000011BE4175 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\ScriptAttributeGUI\Implementations\PropertyDrawers.cs:76] UnityEditor.TextAreaDrawer:OnGUI (UnityEngine.Rect,UnityEditor.SerializedProperty,UnityEngine.GUIContent)
0000000011BE3D14 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\ScriptAttributeGUI\PropertyDrawer.cs:23] UnityEditor.PropertyDrawer:OnGUISafe (UnityEngine.Rect,UnityEditor.SerializedProperty,UnityEngine.GUIContent)
0000000011BA350D (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\ScriptAttributeGUI\PropertyHandler.cs:134] UnityEditor.PropertyHandler:OnGUI (UnityEngine.Rect,UnityEditor.SerializedProperty,UnityEngine.GUIContent,bool)
0000000011BE29ED (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\ScriptAttributeGUI\PropertyHandler.cs:195] UnityEditor.PropertyHandler:OnGUILayout (UnityEditor.SerializedProperty,UnityEngine.GUIContent,bool,UnityEngine.GUILayoutOption[])
0000000011BDCBEB (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\EditorGUI.cs:6811] UnityEditor.EditorGUILayout:PropertyField (UnityEditor.SerializedProperty,UnityEngine.GUIContent,bool,UnityEngine.GUILayoutOption[])
0000000011BDCB1A (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\EditorGUI.cs:6793] UnityEditor.EditorGUILayout:PropertyField (UnityEditor.SerializedProperty,UnityEngine.GUILayoutOption[])
0000000011BDC984 (Mono JIT Code) [C:\buildslave\unity\build\Extensions\guisystem\UnityEditor.UI\UI\TextEditor.cs:33] UnityEditor.UI.TextEditor:OnInspectorGUI ()
0000000011B97ECC (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:1162] UnityEditor.InspectorWindow:DrawEditor (UnityEditor.Editor,int,bool,bool&,UnityEngine.Rect&,bool)
000000001AE4A704 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:969] UnityEditor.InspectorWindow:DrawEditors (UnityEditor.Editor[])
000000001AE485D9 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\Inspector\InspectorWindow.cs:350] UnityEditor.InspectorWindow:OnGUI ()
00000000176D68E2 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
000007FEEE914053 (mono) [c:\buildslave\mono-runtime-and-classlibs\build\mono\mini\mini.c:4914] mono_jit_runtime_invoke
000007FEEE868389 (mono) [c:\buildslave\mono-runtime-and-classlibs\build\mono\metadata\object.c:2623] mono_runtime_invoke
000007FEEE86E783 (mono) [c:\buildslave\mono-runtime-and-classlibs\build\mono\metadata\object.c:3827] mono_runtime_invoke_array
000007FEEE82CECB (mono) [c:\buildslave\mono-runtime-and-classlibs\build\mono\metadata\icall.c:2857] ves_icall_InternalInvoke
00000000176A0217 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
000000001769E372 (Mono JIT Code) [/Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222] System.Reflection.MonoMethod:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
0000000019EFC1DF (Mono JIT Code) [/Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115] System.Reflection.MethodBase:Invoke (object,object[])
0000000019F66E46 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\HostView.cs:185] UnityEditor.HostView:Invoke (string,object)
0000000019F66D30 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\HostView.cs:178] UnityEditor.HostView:Invoke (string)
000000001ADABF22 (Mono JIT Code) [C:\buildslave\unity\build\Editor\Mono\GUI\DockArea.cs:334] UnityEditor.DockArea:OnGUI ()
00000000176D68E2 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
000007FEEE914053 (mono) [c:\buildslave\mono-runtime-and-classlibs\build\mono\mini\mini.c:4914] mono_jit_runtime_invoke
000007FEEE868389 (mono) [c:\buildslave\mono-runtime-and-classlibs\build\mono\metadata\object.c:2623] mono_runtime_invoke
000000014039A04F (Unity) scripting_method_invoke
00000001405596DF (Unity) ScriptingInvocationNoArgs::Invoke
000000014037A5BD (Unity) MonoBehaviour::DoGUI
0000000140E2568D (Unity) GUIView::OnInputEvent
0000000140E26A82 (Unity) GUIView::DoPaint
0000000140E26E40 (Unity) GUIView::RepaintAll
0000000140D2FA11 (Unity) Application::TickTimer
0000000140E41AF4 (Unity) RelaunchUnity
0000000140E430EB (Unity) WinMain
00000001414D2420 (Unity) strerror_s
0000000077535A4D (kernel32) BaseThreadInitThunk
000000007766B831 (ntdll) RtlUserThreadStart
========== END OF STACKTRACE ===========
translation :
'Kan opgegeven module niet vinden.' = 'Cannot find specified module'
'Een initialisatieroutine van de dynamic link library (DLL-bestand) is mislukt.' = 'A dynamic link library (DLL) initialization routine failed.'
So I think it wants a DLL file, but it can't find it.
Maybe it is because my windows is installed in dutch? Or maybe I need some .net frameworks? I really don't know..

Run as Administrator
..
I cannot believe I didn't try that.
Thanks to everyone who helped solve this!

Related

CUDA Separable Compilation with CMake, invalid device function

I am developing a C++ application with cmake as the build system. Each component in the application builds into a static library, which the executable links to.
I am trying to link in some cuda code that is built as a separate static library, also with cmake. When I attempt to invoke the global function entry point in the cuda static library from the main application, everything seems to work fine - the cudaDeviceSynchronize that follows my global function invocation returns 0. However, the output of the kernel is not set and the call returns immediately.
I ran cuda-gdb. Despite the code being compiled with -g and -G, I was not able to break within the device function called by the kernel. So, I ran cuda-memcheck. When the kernel is launched, this message appears:
========= Program hit cudaErrorInvalidDeviceFunction (error 8) due to "invalid device function" on CUDA API call to cudaLaunchKernel.
I looked this up, and the NVIDIA docs/forum posts I read suggested this is usually due to compiling for the wrong compute capability. However, I'm running Titan V's, and the CC is correctly set to 7.0 when compiling.
I have set CUDA_SEPARABLE_COMPILATION on both the cuda library and the component in the main application that the cuda code links to per https://devblogs.nvidia.com/building-cuda-applications-cmake/. I've also tried setting CUDA_RESOLVE_DEVICE_SYMBOLS.
Here is the relevant portion of the cmake for the main application:
(kronmult_cuda is the component in the main application that links to the cuda library ${KRONLIB}. another component, kronmult, links to kronmult_cuda. Eventually, something that links to kronmult is linked to the main application).
find_package(CUDA 9.0 REQUIRED)
include_directories(${CUDA_INCLUDE_DIRS})
enable_language(CUDA)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -arch sm_70 -g --ptxas-options=-O3")
set_source_files_properties( src/kronmult_cuda.cpp PROPERTIES LANGUAGE CUDA ) # no .cu extension
...
target_include_directories(kronmult_cuda PRIVATE ${KRON_PATH})
target_link_libraries(kronmult_cuda PRIVATE OpenMP::OpenMP_CXX PUBLIC ${KRON_LIB})
if (ASGARD_USE_CUDA)
set_target_properties(kronmult_cuda
PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
endif()
if(APPLE AND ASGARD_USE_GPU)
set_target_properties(kronmult_cuda
PROPERTIES
BUILD_RPATH ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES})
endif ()
target_link_libraries(kronmult PRIVATE kronmult_cuda)
...
Full CMakeLists: https://github.com/bmcdanie/ASGarD/blob/feature/kronmult/CMakeLists.txt.
relevant CMakeLists portion for cuda library:
project(kronmult LANGUAGES CXX CUDA)
set(KRONSRC
[list of all sources]
)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -arch sm_70 -g --ptxas-options=-O3")
set_source_files_properties( ${KRONSRC} PROPERTIES LANGUAGE CUDA )
add_library(kron STATIC ${KRONSRC})
target_compile_features(kron PUBLIC cxx_std_11)
set_target_properties( kron
PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
Full CmakeLists: https://github.com/project-asgard/kronmult/blob/master/CMakeLists.txt.
What am I missing here?
EDIT:
Output of cuda-gdb when I attempt to call kernel:
Thread 1 "asgard" hit Breakpoint 1, kronmult2_xbatched<double> (n=2, Aarray_=0x15551fa24800, lda=8, pX_=0x15551fa23c00, pY_=0x15551fa24400, pW_=0x15551fa24000, batchCount=128)
at /home/3bm/asgard/contrib/kronmult/src/kronmult-ext/kronmult2_xbatched.hpp:36
36 {
(cuda-gdb) step
__wrapper__device_stub_kronmult2_xbatched<double> (__cuda_0=#0x7fffffff9e1c: 2, __cuda_1=0x15551fa24800, __cuda_2=#0x7fffffff9e18: 8, __cuda_3=0x15551fa23c00,
__cuda_4=0x15551fa24400, __cuda_5=0x15551fa24000, __cuda_6=#0x7fffffff9e30: 128) at /tmp/tmpxft_0000ac33_00000000-5_kronmult_cuda.cudafe1.stub.c:40
40 /tmp/tmpxft_0000ac33_00000000-5_kronmult_cuda.cudafe1.stub.c: No such file or directory.
(cuda-gdb) step
__device_stub__Z18kronmult2_xbatchedIdEviPKPKT_iPPS0_S6_S6_i (__par0=2, __par1=0x15551fa24800, __par2=8, __par3=0x15551fa23c00, __par4=0x15551fa24400, __par5=0x15551fa24000,
__par6=128) at /tmp/tmpxft_0000ac33_00000000-5_kronmult_cuda.cudafe1.stub.c:39
39 in /tmp/tmpxft_0000ac33_00000000-5_kronmult_cuda.cudafe1.stub.c
(cuda-gdb) step
dim3::dim3 (this=0x7fffffff9d28, vx=1, vy=1, vz=1)
at /home/dg6/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/cuda-10.0.130-s6ervywpchxmerrju62il7xkeeamlfcv/include/vector_types.h:420
420 __host__ __device__ dim3(unsigned int vx = 1, unsigned int vy = 1, unsigned int vz = 1) : x(vx), y(vy), z(vz) {}
(cuda-gdb) step
dim3::dim3 (this=0x7fffffff9d34, vx=1, vy=1, vz=1)
at /home/dg6/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/cuda-10.0.130-s6ervywpchxmerrju62il7xkeeamlfcv/include/vector_types.h:420
420 __host__ __device__ dim3(unsigned int vx = 1, unsigned int vy = 1, unsigned int vz = 1) : x(vx), y(vy), z(vz) {}
(cuda-gdb) step
cudaLaunchKernel<char> (
func=0x5555555f94c0 <kronmult2_xbatched<double>(int, double const* const*, int, double**, double**, double**, int)> "UH\211\345H\203\354\060\211}\374H\211u\360\211U\370H\211M\350L\211E\340L\211M\330L\213E\330H\213}\340H\213M\350H\215U\370H\213u\360H\215E\374H\203\354\bL\215M\020AQM\211\301I\211\370H\211\307\350\355\343\377\377H\203\304\020\220\311\303UH\211\345H\203\354\060\211}\374H\211u\360\211U\370H\211M\350L\211E\340L\211M\330L\213E\330H\213}\340H\213M\350H\215U\370H\213u\360H\215E\374H\203\354\bL\215M\020AQM\211\301I\211\370H\211\307\350\267\345\377\377H\203\304\020\220\311\303UH\211\345H\203\354\060\211}\374H\211u\360\211U\370H\211M\350L\211E\340L\211", <incomplete sequence \330>..., gridDim=..., blockDim=...,
args=0x7fffffff9d40, sharedMem=0, stream=0x0)
at /home/dg6/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.3.0/cuda-10.0.130-s6ervywpchxmerrju62il7xkeeamlfcv/bin/..//include/cuda_runtime.h:202
202 return ::cudaLaunchKernel((const void *)func, gridDim, blockDim, args, sharedMem, stream);
(cuda-gdb) step
warning: Cuda API error detected: cudaLaunchKernel returned (0x8)
After the helpful hint from #talonmies, I suspected this was a device linking problem. I simplified my build process, included all CUDA files in one translation unit, and turned off SEPARABLE COMPILATION.
Still, I did not see a cmake_device_link.o in either my main application binary or the component that called into my cuda library. And, still had the same error. Tried setting CUDA_RESOLVE_DEVICE_SYMBOLS to no effect.
Finally, I tried building the component that calls into my cuda library as SHARED. I saw the device linking step when building the .so in my cmake output, and the program runs fine. I do not know why building SHARED fixes what I suspect was a device linking problem - will accept any answer that deciphers that?

NServiceBus - Scanning all assemblies

NServiceBus.dll - Version 5.2.9 & NServiceBus.Host - Version 6.0.0
I am developing a workflow application with pluggable addins.
In my solution I have a NServiceBus host assembly which I host using the NServiceBus.Host.exe. To prevent scanning I have defined the EndpointConfigurationType in the NServiceBus.Host.exe.config.
<appSettings>
<add key="EndpointConfigurationType" value="Libra.Workflow.Host.EndpointConfig, Libra.Workflow.Host" />
</appSettings>
I have verified that this config is being used because if I put some unknown type I get an error and also because me EndpointConfig class is instantiated before any scanning happens.
In the Customize method of this class I have added
public void Customize(BusConfiguration cfg)
{
cfg.AssembliesToScan(AllAssemblies.Matching("Libra.Workflow.Messages.dll"));
...
}
Now when I run this project I get an error because NServiceBus is scanning all assemblies and do to the nature of System.AddIn some assemblies cannot be scanned!
This scanning happens right after Libra.Workflow.Host has been instantiated but before the Customize method is called. Here is the call stack for this scan:
at NServiceBus.Hosting.Helpers.AssemblyScanner.ScanAssembly(String assemblyPath, AssemblyScannerResults results) in C:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus.Core\Hosting\Helpers\AssemblyScanner.cs:line 153
at NServiceBus.Hosting.Helpers.AssemblyScanner.GetScannableAssemblies() in C:\BuildAgent\work\3206e2123f54fce4\src\NServiceBus.Core\Hosting\Helpers\AssemblyScanner.cs:line 63
at NServiceBus.GenericHost..ctor(IConfigureThisEndpoint specifier, String[] args, List`1 defaultProfiles, String endpointName, IEnumerable`1 scannableAssembliesFullName) in c:\BuildAgent\work\a3de8759ee491634\src\NServiceBus.Hosting.Windows\GenericHost.cs:line 33
at NServiceBus.Hosting.Windows.WindowsHost..ctor(Type endpointType, String[] args, String endpointName, IEnumerable`1 scannableAssembliesFullName) in c:\BuildAgent\work\a3de8759ee491634\src\NServiceBus.Hosting.Windows\WindowsHost.cs:line 21
at NServiceBus.Hosting.Windows.HostServiceLocator.DoGetInstance(Type serviceType, String key) in c:\BuildAgent\work\a3de8759ee491634\src\NServiceBus.Hosting.Windows\HostServiceLocator.cs:line 31
at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) in c:\Home\Chris\Projects\CommonServiceLocator\main\Microsoft.Practices.ServiceLocation\ServiceLocatorImplBase.cs:line 49
The error message I get is:
Could not enumerate all types for
'C:\msc\Trunk\Libra.Workflow\Build\Libra.Workflow.Host\AddIns\Libra.Workflow\Libra.Workflow.Processors.dll'
Why is NServiceBus scanning this DLL and how can I prevent it?
Note: Since this is an AddIn DLL, there isn't even a reference to it in the Libra.Workflow.Host nor any other related assemblies so there should be absolutely no reason for NServiceBus to have to touch it.
One way of limiting assembly scanning done by NServiceBus.Host is to use the /scannedAssemblies switch. One caveat is to pass NServiceBus.Core and NServiceBus.Host assemblies explicitly:
NServiceBus.Host.exe /scannedAssemblies:"NServiceBus.Core, Version=5.0.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c" /scannedAssemblies:"NServiceBus.Host, Version=6.0.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c"
This command will scan those NServiceBus assemblies and the assembly specified via EndpointConfigurationType app setting. If you want to specify additional assemblies (like your Libra.Workflow.Messages) you may add additional /scannedAssemblies switch.
Please see this documentation page for details: http://docs.particular.net/nservicebus/hosting/nservicebus-host/#configuring-the-endpoint-controlling-assembly-scanning-using-the-command-line.

Debugging System.TypeLoadException

I'm trying to compile Boo on the mono-4.0 Nant profile and am getting the following error, which I'm having trouble debugging.
booi:
Invalid type Boo.Lang.Compiler.CompilerParameters for instance field Boo.Lang.Compiler.CompilerContext:_parameters
Missing method .ctor in assembly /Users/tristanz/Projects/boo/build/Boo.Lang.Compiler.dll, type System.Security.SecurityRulesAttribute
Can't find custom attr constructor image: /Users/tristanz/Projects/boo/build/Boo.Lang.Compiler.dll mtoken: 0x0a00097b
BUILD FAILED - 0 non-fatal error(s), 2 warning(s)
INTERNAL ERROR
System.TypeLoadException: Could not load type 'System.Security.SecurityRulesAttribute' from assembly 'Boo.Lang.Compiler'.
at Boo.NAnt.BooTask.ExecuteTask () [0x00000] in <filename unknown>:0
at NAnt.Core.Task.Execute () [0x00000] in <filename unknown>:0
Any thoughts would be greatly appreciated.
The problem is that NAnt itself must run under 4. for the BooTask to correctly work, so mono --runtime=v4.0 is the fix.

windbg - module not loading "dll not found in the image list"

I am trying to get a proper callstack for an unhandled exception in my VS2010 .net4 application using windbg.
The main program is a console application. This dll loads with it's symbols properly.
In the same directory, I have a dll+matching pdb which won't load.
I am running the app on a windows server 2008 R2, 64 bit (no VS installed). But the app was compiled on 32bit. I am using the winX86 debugger to attach to the process.
I have downloaded sosex that supports .net 4 from
http://www.stevestechspot.com/ (the 32 bit version)
the sos.dll (from "C:\Program Files (x86)\Debugging Tools for Windows (x86)\clr10\sos.dll") version is 6.12.2.633.
Issued the following commands:
sympath+ "...folder of exe and dll"
.loadby sos clr
.load sosex.dll
When running !mk I get the following:
Thread 0:
ESP EIP
00:U 0016ec6c 5f636578 0x5f636578
01:U 0016ec70 05f1380f SN!SN_MedistoreEngine::FetchNotes+0x13f [v:\mp\mp\src\sn\sn_medistoreengine.cpp # 59]
02:M 0016edbc 07dd0db1 SN_Bridge.SNB_bridge.fetch_notes(IOD_Msg*, System.String, System.String, Boolean)(+0x4a IL)(+0x131 Native) [v:\mp\portal\commonutils\src\snb\snb_bridge.cpp, # 142,0]
03:M 0016ef24 055bfde5 SN_Bridge.SNB_bridge.FetchNotesByStudyUId(System.String, System.String, System.Collections.Generic.List`1<SN_Bridge.SNB_StickyNote>)(+0x25 IL)(+0x55 Native) [v:\mp\portal\commonutils\src\snb\snb_bridge.cpp, # 296,0]
04:M 0016efb0 055bfd22
"xxx.Services.StickyNotes.dll" was not found in the image list.
Debugger will attempt to load "xxx.Services.StickyNotes.dll" at given base 00000000.
Please provide the full image name, including the extension (i.e. kernel32.dll)
for more reliable results.Base address and size overrides can be given as
.reload <image.ext>=<base>,<size>.
Unable to add module at 00000000
"xxx.ni.Services.StickyNotes.dll" was not found in the image list.
Debugger will attempt to load "xxx.ni.Services.StickyNotes.dll" at given base 00000000.
Please provide the full image name, including the extension (i.e. kernel32.dll)
for more reliable results.Base address and size overrides can be given as
.reload <image.ext>=<base>,<size>.
Unable to add module at 00000000
xxx.Services.StickyNotes.StickyNotesLogic.StickyNotesByStudyID(System.String, System.String, System.String)(+0x1d IL)(+0x52 Native)
05:M 0016efcc 055ba0ab SNConsole.Program.Main(System.String[])(+0x101 IL)(+0x24b Native) [D:\Documents and Settings\tamar\My Documents\Visual Studio 2010\Projects\SNConsole\Program.cs, # 48,17]
06:U 0016f02c 72da21db clr+0x21db
07:U 0016f034 72dae021 clr!DllUnregisterServerInternal+0x8025
08:U 0016f090 72dbc58d clr!DllUnregisterServerInternal+0x16591
When running !clrstack I get the following:
PDB symbol for clr.dll not loaded
OS Thread Id: 0x2984 (0)
Child SP IP Call Site
0016edc8 5f636578 [InlinedCallFrame: 0016edc8]
0016edc4 07dd0db1 SN_Bridge.SNB_bridge.fetch_notes(IOD_Msg*, System.String, System.String, Boolean) [v:\mp\portal\commonutils\src\snb\snb_bridge.cpp # 142]
0016ef30 055bfde5 SN_Bridge.SNB_bridge.FetchNotesByStudyUId(System.String, System.String, System.Collections.Generic.List`1<SN_Bridge.SNB_StickyNote>) [v:\mp\portal\commonutils\src\snb\snb_bridge.cpp # 296]
0016efb0 055bfd22 xxx.Services.StickyNotes.StickyNotesLogic.StickyNotesByStudyID(System.String, System.String, System.String)
0016efcc 055ba0ab SNConsole.Program.Main(System.String[]) [D:\Documents and Settings\tamar\My Documents\Visual Studio 2010\Projects\SNConsole\Program.cs # 48]
0016f25c 72da21db [GCFrame: 0016f25c]
As you can see, in both cases I get the file name + row number in the stack, except for the xxx.Services.StickyNotes.dll line.
I've tried:
.realod /f ""c:...\xxx.Services.StickyNotes.dll" - same errors
and
ld "c:...\xxx.Services.StickyNotes.dll" which resulted in
No modules matched
'c:...\Bin\xxx.Services.StickyNotes.dll'
using !sym noisy didn't help, I think it doesn't even try to load the pdb since the module itself isn't loaded.
I can't figure out why this specific dll won't load. SN_Console.exe and SNB_Bridge.dll load without a problem from the same directory.
(I am not concerned with the exception itself, I planted the code that creates is. The issue is about setting up a good debugging environment).
Thanks in advance,
Tamar
I happened to answer this question in person, but here's the documented story in case anyone else stumbles upon it: http://blogs.microsoft.co.il/blogs/sasha/archive/2011/01/16/clr-4-does-not-use-loadlibrary-to-load-assemblies.aspx
The big picture is that CLR 4 doesn't use LoadLibrary to load assemblies, so the debugger can't pick up the DLL and therefore its symbols.
You can hint the debugger the location of the DLL in its address space using:
.reload /f "c:...\xxx.Services.StickyNotes.dll=image_base_address"
image_base_address is the start of the address range which this DLL is mapped in the process. You can find this value in the DLL Pane of Process Explorer.
I wrote about it with a little more detail here.

Raven.Server.exe exception

I've never used RavenDb it looks interesting but I'm falling at the first hurdle.
I've downloaded, unzipped and I run C:\RavenDB\Server\Raven.Server.exe
and it flashes up and disappears.
I tried running from a dos prompt and I got this exception:
C:\RavenDB\Server>Raven.Server.exe
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the
requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog
()
at System.ComponentModel.Composition.Hosting.AssemblyCatalog.GetExports(Impor
tDefinition definition)
at System.ComponentModel.Composition.Hosting.AggregateCatalog.GetExports(Impo
rtDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExports
Core(ImportDefinition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(Import
Definition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExpor
tsCore(ImportDefinition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore
(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1
& exports)
at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsC
ore(ImportDefinition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(Import
Definition definition, AtomicComposition atomicComposition)
at System.ComponentModel.Composition.Hosting.ImportEngine.TryGetExports(Expor
tProvider provider, ComposablePart part, ImportDefinition definition, AtomicComp
osition atomicComposition)
at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportSub
set(PartManager partManager, IEnumerable`1 imports, AtomicComposition atomicComp
osition)
at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImportsSt
ateMachine(PartManager partManager, ComposablePart part)
at System.ComponentModel.Composition.Hosting.ImportEngine.TrySatisfyImports(P
artManager partManager, ComposablePart part, Boolean shouldTrackImports)
at System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImportsOnce(
ComposablePart part)
at System.ComponentModel.Composition.AttributedModelServices.SatisfyImportsOn
ce(ICompositionService compositionService, Object attributedPart)
at Raven.Database.DocumentDatabase..ctor(InMemoryRavenConfiguration configura
tion)
at Raven.Server.RavenDbServer..ctor(RavenConfiguration settings)
at Raven.Server.Program.RunServer(RavenConfiguration ravenConfiguration)
at Raven.Server.Program.RunInDebugMode(Nullable`1 anonymousUserAccessMode, Ra
venConfiguration ravenConfiguration)
at Raven.Server.Program.InteractiveRun(String[] args)
at Raven.Server.Program.Main(String[] args)
- - - -
System.TypeLoadException: Method 'WriteJson' in type 'JsonToJsonConverter' from
assembly 'Raven.Http, Version=1.0.0.0, Culture=neutral, PublicKeyToken=37f41c7f9
9471593' does not have an implementation.
C:\RavenDB\Server>
I'm a total nub when it comes to this software.
Any ideas ?
Thanks
It seems to be an issue with version 206 I've gone back to 193 and it works fine.