WPF, debugging databinding - wpf

I'm trying to understand the following part of an error message:
Additional information: 'Provide value on 'System.Windows.DynamicResourceExtension' threw an exception.' Line number '118' and line position '56'.
, what lines are the error referring to? No source files are mentioned..

Usually if you double click on the errors you will be taken to them. What compiler are you using? If its MSVS then it usually takes you right to the error. IF you dont have lines numbers on then its through the tools/options/text editor/all languages/*then check the box that says line numbers. If this doesnt help please provide more information.

Related

Could not find file 'C:\Users\crims\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\...\MonitoringSystemDatabase.mdb'

I have a Menu Form and it has 7 UserControls every time I execute my program I keep seeing this error.
I have no idea what error is this. I tried searching but there are no error close related to mine. Then I compare my error with this Project Assemblies error
Can anyone help me with this? I have no idea what causes this error.
The error is caused by your code looking for the MS Access database file called:
MonitoringSystemDatabase.mdb
...is located at path:
C:\Users\crims\AppData\Local\Microsoft\VisualStudio\10.0\ProjectAssemblies\cjz5kapb01\
...but it is not.
Locate file MonitoringSystemDatabase.mdb (perhaps with +E to Search), note the actual path of the file, and correct the path in MainMenu.vb.
The error message is very clear, so why all the searching?
Either the file isn't there, or the application can't see it where it expects to find it.
Try moving the file to:
C:\Users\Public\Documents\MonitoringSystemDatabase.mdb
and adjust you project accordingly.

How to make FlashDevelop show line error and where it happened with Haxe?

I've been using Haxe for a while and I'm debuging with the Windows target (OpenFL).
When I put a try/catch somewhere it just says for example "Null object reference" - it doesn't say the line number and the class, so I have to keep putting traces to find in which line it has thrown the error.
Can someone help me?
You might need to enable stack traces by adding the following define to your project.xml file if you're compiling in release mode:
<haxedef name="HXCPP_STACK_LINE" />
Also, you won't be able to catch null reference exceptions or get stack traces for them unless the following is defined (for performance reasons):
<haxedef name="HXCPP_CHECK_POINTER" />
With these two, you should see a stack trace in FlashDevelop's Output panel.
You can find some good info on these flags and hxcpp debugging in general here. You might also want to check out the crashdumper library.

Eclipse CDT: Mapping console output to source file and line

While debugging code it helps to have source filename and line number on console output. I already use FILE and LINE macros. But it would be great if double clicking a line in the console output would take me to the exact source line which was responsible for outputting that line of log. Can eclipse parse console output and do something like this? It need not work all the time, only when the log line is in a specific format and the source filename and line number are valid.
It's possible to use a workaround if you add the pydev plugin and a few lines of python to call your main function. You can find the needed code here: https://github.com/oct15demo/python_calls_cpp
As noted there, I posted a query on the Eclipse forum to find out the status of any ongoing effort or obstacles to implement within Eclipse.
I could not find out any further information on the feature, if it's there, it's well hidden.
Update March 17, 2022, I shall be working on the feature for Eclipse, don't have an estimate of time yet.

Setting a windows icon that is located in a different assembly from XAML

From XAML, I am attempting to set the icon from the Window control.
The .ico file is located in a different assembly (no subfolders). I can get this to work when I just add the file to this assembly, but my goal is to make this work with having only the original .ico file, and having it stay where it is.
I have tried:
Icon="pack://application:,,,/ReferencedAssembly;component/IconFile.ico" as well as Icon="/ReferencedAssembly;component/IconFile.ico"
Even without the nasty blue squiggles, when I try to run I get errors of:
'Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' with an InnerException of "Could not load file or assembly..... The System cannot find the file specified."
Win7, .NET 4
This seems like it should be simple enough, yet I am stumped. Thanks ahead of time.
Thanks to srsyogesh for helping get some additional error info.
I noticed it was failing to download the assembly initially, and that was a silly error on my part from failing to notice that that reference was completely missing.
With that fixed, it was followed by a "ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.", with an inner exception of "An attempt was made to load a program with an incorrect format". That was apparently caused by a conflict of "x86" vs "Any CPU" Platform Target in the build settings. Changed the one that said "Any CPU" to "x86", and voila.

C Error - What does the number stand for?

I couldn't find anything on this, but probably its just because I don't know how to search, because i don't know how to call it.
I tried to compile some C-Code and got the following error:
/path/to/file.h:55:32: error: path/to/include.h: No such file or directory
I know the error and i know that the problem is in file.h at line 55 - where's an include, which doesn't exist.
But what does the 32 stand for?
Marty
It's the number of the character within line 55.
This might also be referred to as "column number" (see comment) but I find that slightly misleading, as e.g. a tab character will generally take up more than one column in your editor, but still count as only one character for the compiler.

Resources