473,386 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

No line number at top level of Stack trace

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\Control s\ctlToolWindow.vb:line
9452
at MultiLang.ctlToolWindow.ContextMenuResource(Object sender,
EventArgs e) in
D:\MultiLang.NET\MultiLangVS2003\MultiLang\Control s\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

Nov 17 '05 #1
6 2791
Are you mixing C# and VB? Your code indicates VB.

Johann Blake

Nov 17 '05 #2
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

"Phil Jollans" <no****@jollans.com> schrieb im Newsbeitrag
news:db*************@news.t-online.com...
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\Control s\ctlToolWindow.vb:line
9452
at MultiLang.ctlToolWindow.ContextMenuResource(Object sender,
EventArgs e) in
D:\MultiLang.NET\MultiLangVS2003\MultiLang\Control s\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

Nov 17 '05 #3
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

Nov 17 '05 #4
Inline

Christof

"Phil Jollans" <ph**********@messring.de> schrieb im Newsbeitrag
news:11**********************@z14g2000cwz.googlegr oups.com...
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.
Phil

Nov 17 '05 #5
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

Nov 17 '05 #6
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

Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hugh Macdonald | last post by:
I'm writing a tool at the moment that reads in an external file (which can use any Python syntax) At the moment, I'm reading the file in using: scriptLines = open(baseRippleScript).read()...
11
by: Ken Varn | last post by:
I want to be able to determine my current line, file, and function in my C# application. I know that C++ has the __LINE__, __FUNCTION__, and __FILE___ macros for getting this, but I cannot find a...
2
by: Verane | last post by:
Hi all, I am writing code in C# using visual studio .NET 2003. I use System.Diagnostics.Trace.Assert, and when I get an assertion at run time, I can see the call stack. But for each line of the...
5
by: Phil Jollans | last post by:
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...
0
by: Me | last post by:
I am writing a web application and I want to catch and rethrow every unhandled exception to the Application_Error. However, the line number indicated in the stack trace is from the Throw line,...
2
by: pavel.orehov | last post by:
Hi, I am using Environment.StackTrace to print the stack trace to the log when I have any exceptions in my application. When I work in development environment I see the line numbers in the...
2
by: John | last post by:
Hi For error logging purpose, is it possible to get from the vb system feature the SUB name and the line number? Thanks Regards
4
by: Jeff Jarrell | last post by:
I have a block of code that during development is prone to casting errors. It is mostly a DataReader type thing. It looks something like this. _prtPNID = myDLReader.GetString("prtPNID")...
5
by: IdleBrain | last post by:
I am trying to log the Application name, Method name, line number and column number whenever an exception is generated in an C# 2005 application using the following code. Problem is that the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.