No line number at top level of Stack trace

  • Thread starter Thread starter Phil Jollans
  • Start date Start date
P

Phil Jollans

Hi,

I have an error dialog which shows the stack trace, usually without line
numbers in the release version. To try to diagnose a particular problem, I
have provided a user with a debug version of my program, and now line
numbers do appear.

However, there is no line number at the top level in the stack, as shown
below:

System.IO.FileNotFoundException
at MultiLang.modResXUtil.ExportToResx_AllStr_SelLang(ICollection
SelectedLanguages)
at MultiLang.ctlToolWindow.ContextMenuExportResources() in
D:\MultiLang.NET\MultiLangVS2003\MultiLang\Controls\ctlToolWindow.vb:line
9452
at MultiLang.ctlToolWindow.ContextMenuResource(Object sender,
EventArgs e) in
D:\MultiLang.NET\MultiLangVS2003\MultiLang\Controls\ctlToolWindow.vb:line
9578

After adding debug messages, I am coming to the conclusion, that the program
may not even be entering the function shown at the top level.

What does it indicate, that there is no line number at the top level?

Could it mean that an error occured in the Just-In-Time compiler, so that
the function could not be called.

Thanks in advance for any quick help.

Apologies for posting to more than one newsgroup, but I am anxious to get
quick help on this problem.

Phil
 
Hi Phil,

could it be, that there are two or more project involved?
If the modResXUtil class is in another project than ctlToolWindow and the
former project was not in debugmode, than all your symptoms are expactable.
If you use Debug class for creating debug mesaages, they will only be
written if that code is compiled in debug mode.

Christof
 
No, the whole project is in VB.NET and modResXUtil is in the same
project.

I have now noticed, that the function at the top of the stack not only
does not have a line number, it also does not indicate the file name.

Again, this suggests to me, that the program hasn't really entered this
function, and that it may be a failure of JIT compiler.

Would separate modules be JIT compiled separately?

Is it possible that JIT compilation fails (at this time), because a
referenced component is missing?

To be honest, this seems unlikely to me. I would guess that it checks
the presence of all required components before loading the assembly.

Phil
 
Inline

Christof

Phil Jollans said:
No, the whole project is in VB.NET and modResXUtil is in the same
project.

I have now noticed, that the function at the top of the stack not only
does not have a line number, it also does not indicate the file name.

Again, this suggests to me, that the program hasn't really entered this
function, and that it may be a failure of JIT compiler.

Would separate modules be JIT compiled separately?

iirc every method is JIT compiled seperatly.
Is it possible that JIT compilation fails (at this time), because a
referenced component is missing?

I suppose yes.
To be honest, this seems unlikely to me. I would guess that it checks
the presence of all required components before loading the assembly.
obviously no.
 
Hi,

I have finally sorted out this problem. My product is an Add-In for Visual
Studio, which means that most of the components that it uses are always
installed on the target machine, because obviously Visual Studio must be
installed.

I had made a mistake with System.CF.Design.dll, which is specific to the
Compact Framework. While this is usually installed, in this specific case it
was not.

The effect was that an exception was thrown on calling the function which
refered to this component. I hadn't bargained with this and couldn't make
any sense of the FileNotFoundException at that particular place in the code.

With regard to the stack trace, we may be able to conclude that if there is
no line number at the top level (and no filename), then it may mean that the
function has not actually been entered at all, and that the error is caused
by the JIT compiler.

Phil
 
Back
Top