I have been having constant struggle with Visual Studio debugger and finally got fed up and seeking help. There are some issues constantly causing trouble. If you have any solutions I will be grateful
Trying to watch a function that has const and non-const versions results in ambiguous symbol error (CXX0039)
Trying to get value of a function in a template class randomly gives member function is not defined error (CXX0052)
Casting a template type variable results in bad type cast, even to its own type (CXX0019)
I have visual studio 2010 Professional with SP1
EDIT
In #2, I am sure that inlining is off.
Thanks in advance,
Cem
I've just experienced the same problem...
Found the answer after some searching on MSDN.
Visual Studio 2005 C++ CXX0052: member function not present!
Basically what you need to do is to store the result in a temp variable, and view this temp variable in the Watch or Locals window.
Far from an ideal solution I guess, but it works ( on VS2010 SP1 ).
I have found out that the best option is to modify autoexp.dat and show transformed variables. At start its a bit hard but when you are done its even better than getting these problems fixed.
Related
I used to develop code injection programs with Visual Studio 2010 (maybe 5 years ago?).
Now I need it again and I developed it pretty much the same as before (with Visual Studio 2015).
However, I have confirmed that the codes I have not seen before are generated.
The first thing I found is the above problem.
It seems that the program's entry point, the address of the function, uses the table without pointing directly to the contents.
The problem is that I can not find the address and size of the injected code.
Is there a way to disable it?
The second problem is that weird functions are added.
My injection code is code that calls CreateProcess, ExitProcess.
However, each address is called immediately after each function is called.
This is the part of 0x013A14CE : CALL test.013A1DA0 above.
The contents of the function are as above.
This problem causes a crash after injecting the code.
I do not know what this is doing, but I think it's code for security.
I found several compile options, but I could not solve the problem.
I tried to compile with Visual Studio 2010, but the result was the same.
Inline assembly seems to be able to solve this problem, but it seems hard to solve it every time there is a fix.
please answer my question
I am working on a large TypeScript application in VS 2013. I have ReSharper and WebEssentials installed.
Time to time when I have an exported module level function, "something" underlines it and hints that "Class emulation may be converted to class". What does this mean, and from which tool it comes from?
Did anyone see this before? Surprisingly there are no Google results for this sentence in quotes.
It must look like an emulated class... ReSharper may be guessing you hard coded your own class in Typescript, rather than defining it and letting the compiler create the JS.
Adding a return type of void removes the warning...
I experience a strange behaviour in Visual Studio 2010 when creating Windows Phone 7 apps. After some time VS starts to complain about Invalid XAML although there is no problem and the app compiles and runs just fine.
It bugges me because I cannot use the visual desingner saying "Exception was thrown on "DataTemplate": Invalid XML" and there is a DataTemplate higlighted in the code. The data template is always ok, VS does not complain about it when copy-pasted to another project.
I found out that problematic are usually the DataTemplates with custom converters or when usin g classes like PhonePerformance.
Sometimes the error is "Exception thrown was due to document error: Invalid XML" and nothing is even highlighted in the XAML file.
I tried reinstalling .NET. Visual Studio etc. and the problem occurs on two separated machines so I do not think it is specific to my configuration. It may be specific to my code.
Anyone experienced similar behaviour?
When using XAML, if you reference a library that needs to be evaluated but can't be at design time you get this kind of error. You can turn off the visual editor and just work in XAML - that will stop the error (and save you time).
You reinstalled .NET and VisualStudio??? You should have just spun up a second instance, opened the solution in both, then attached the debugger from one to the second and opened up the visual editor. It would have told you exactly what in your code was causing the problem. Also DesignerProperties.IsInDesignMode in your converters. Jeez. You wasted so much time :(
As for design time data, that's tricky. Either you have DesignTimeDataWithDesignTimeCreatableTypes that aren't or DesignData that can't create proxies for your real types (for whatever reason, had this issue many times deep in the past).
The only way to figure this out is to debug one instance from another. Its actually not that hard. I do it alot (debugging WF4 ActivityDesigners).
A friend has found a solution and you would not believe where the problem is. This happens if you have a space in the name of your assembly. I found out that I really have a space in assembly name in all the problematic projects, renamed the assemblies and the designer works again.
The solution is also mentioned here http://forums.silverlight.net/t/115011.aspx/1
I am currently trying to calculate rigid transformation between two point sets so I tried to use the code given by the tutorial on pointclouds.org:
http://www.pointclouds.org/documentation/tutorials/iterative_closest_point.php#iterative-closest-point
For my case I only changed the part where the data is randomly generated to something that loads the point data I want to analyze. Everything else is exactly like in the tutorial...
(I also tried testing exactly the tutorial code with the random data, in case I had somethign wrong with reading my input data)
Since I work with Qt I integrated the PCL library, Eigen library and FLANN library to my project. It finds all headers and successfully compiles with MSVC 2008...
Unfortunately I always get a runtime error at
icp.setInputTarget(cloud_out);
saying:
Debug Assertion failed! Program:
...MSVC2008_Qt_SDK_Release\release\Project.exe File: c:\Program
Files\Microsoft VIsual Studio 10.0\CV\include\vector Line: 1200
Expression: vector erase iterator outside range
[..] ... check documentation ... [..]
Does anybody know what that means? The input clouds both have the same size and have filled values.
I would be thankful for any help!
UPDATE 1:
The error message shows some file path for MSVC 2010 (10.0) ... So I tried to uninstall Visual Studio 2010 since I don't really need it. But still, if I compile in Debug mode, it shows me an error message, but with Expression: vector iterators incompatible instead... If I now run it in Release mode, it just crashes at runtime (at the same line), but doesn't show that error message.
This seems so be a problem with the library you use. Assuming you have done a clean build, checked your PATH variable and everything and that Visual Studio 2010 is removed, this might be a problem with the library itself. Are you you using the right one?
The current Qt SDK has MSVC2008 in it, so I guess it takes everything from where it needs. But either the compiler in Qt or one of the libraries you use that might want the 2010 version...
Hope it helps!
Is there a way to get visual studio to warn that a private member does not have any references within the class? How about internal members that have no references within the package / module?
I have been re-factoring my code and I don't want to keep [right-click] --> Find All References for each member in my code base to ensure I have removed all cruft. There has to be a better way...
Have you tried turning on FxCop performance rules? They will detect unused members with internal or private access.
As far as I know, Visual Studio does give warnings for unused variables. Doesn't that cover it? They are not errors, just warnings.
NDepend is perfect for this sort of thing.
ReSharper does something similar with its Solution-Wide Inspections.