Comments (7)
Hi,
I'm sorry you have this bug but unfortunately, without the dump file, I can't reproduce it.
I've loaded some of my dump files and had no issue.
I understand why you can't send yours.
Do you run Memoscope with the compiled binaries or with the source code/Visual Studio ?
If you can run it in debug mode, could you put a conditional breakpoint here:
then send me the value of "Type" variable ?
I'd like to see why this type is seen as an array type in the 'Lone target' analysis but has no component type.
from memoscope.net.
Originally I started it via binaries.
Now I started it via Visual Studio and used QuickWatch for "Type" and "Type.GetType()" (see attached files).
Also later there is a follow up NullRef:
Exception thrown: 'System.NullReferenceException' in MemoScope.exe
loneTargetInformations was null.
from memoscope.net.
Thanks for the feedback and details.
It's really weird because it looks like the delegate's invocation list (_invocationList field) is a simple System.Object instead of the expected array System.Object[].
So of course the ComponentType is null and then you get a NullRef exception.
Well, I'm debugging and I see that it happens only when the _invocationCount is 0 so the program doesn't loop on the expected array's items.
When _invocationCount == 1, there is no _invocationList because the handler is in _target and there is no need for an array.
Could you debug and break like you did and give me details from the previous call in the stack ?
Something like this :
I'm sorry to bother you but it's not easy to debug when you can reproduce the issue on your computer...
from memoscope.net.
I noticed that there is a property "IsNull" which is "true".
from memoscope.net.
You're right.
The adress is 0 so the invocList is null and empty of course.
invocList can be null if you remove all handlers from a delegate but in this case invocCountValue == 0 .
I wonder why you have invocList == null and invocCountValue != 0...
Sometimes strange things happens if the dump is taken while GC is working, maybe it's the reason of this ?
Any way, I will add a check to avoid the exception and a warning too maybe.
internal static IEnumerable<ClrObject> EnumerateHandlers(ClrObject clrObject)
{
ClrObject target = clrObject[TargetFieldName];
ulong targetAddress = target.Address;
if (targetAddress != clrObject.Address)
{
yield return clrObject;
}
else
{
var invocCount = clrObject[InvocationCountFieldName];
var v = invocCount.SimpleValue;
var invocCountValue = (long)v;
var invocList = clrObject[InvocationListFieldName];
// Check invocList is not null
if (! invocList.IsNull)
{
for (int i = 0; i < invocCountValue; i++)
{
var targetObject = invocList[i];
yield return targetObject;
}
}
}
}
from memoscope.net.
I locally added your fix and it worked. I could analyze my dump file. Thank you.
from memoscope.net.
You're welcome.
Thank you for your time and help to improve Memoscope.
from memoscope.net.
Related Issues (20)
- RoothPath command HOT 4
- Object must be a root directory ("C:\") or a drive letter ("C"). HOT 4
- Question: Viewing a breakdown of the types that allocated the instances of a certain type HOT 6
- ClrRoot: display static variable's name HOT 2
- Automatic deadlocks detection HOT 4
- Cannot dump memory on a vmware virtual machine? HOT 4
- [Feature Request] also display total size in string analysis HOT 2
- x32 image, dumped with x64 task manager loading error HOT 2
- just wanted to say thank you HOT 1
- Download links are broken HOT 2
- "Unable to find dac file" error when trying to load dump from another machine HOT 10
- an example to get DLL from dump HOT 7
- I guess there no Mono or Unity3d support? HOT 1
- Download links for binaries are not available anymore HOT 4
- Can you advise how to extract .dll files from dmp HOT 1
- NullReferenceException when trying to init strings module HOT 3
- [FeatureIdea] Export instance to Json... HOT 1
- Failed to init module - Exception: Specified cast is not valid. HOT 1
- Failed to initRuntime - Exception: Failure loading DAC: Create DAC instance failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memoscope.net.