473,738 Members | 11,192 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.FileN otFoundExceptio n
at MultiLang.modRe sXUtil.ExportTo Resx_AllStr_Sel Lang(ICollectio n
SelectedLanguag es)
at MultiLang.ctlTo olWindow.Contex tMenuExportReso urces() in
D:\MultiLang.NE T\MultiLangVS20 03\MultiLang\Co ntrols\ctlToolW indow.vb:line
9452
at MultiLang.ctlTo olWindow.Contex tMenuResource(O bject sender,
EventArgs e) in
D:\MultiLang.NE T\MultiLangVS20 03\MultiLang\Co ntrols\ctlToolW indow.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 2805
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.FileN otFoundExceptio n
at MultiLang.modRe sXUtil.ExportTo Resx_AllStr_Sel Lang(ICollectio n
SelectedLanguag es)
at MultiLang.ctlTo olWindow.Contex tMenuExportReso urces() in
D:\MultiLang.NE T\MultiLangVS20 03\MultiLang\Co ntrols\ctlToolW indow.vb:line
9452
at MultiLang.ctlTo olWindow.Contex tMenuResource(O bject sender,
EventArgs e) in
D:\MultiLang.NE T\MultiLangVS20 03\MultiLang\Co ntrols\ctlToolW indow.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**********@m essring.de> schrieb im Newsbeitrag
news:11******** **************@ z14g2000cwz.goo glegroups.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.Desig n.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 FileNotFoundExc eption 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.Desig n.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 FileNotFoundExc eption 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
2123
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() exec scriptLines However, if I raise an exception in my main code, in a function that is called from the external script, the stack trace just has:
11
21929
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 C# equivalent. Any ideas? -- ----------------------------------- Ken Varn Senior Software Engineer Diebold Inc. varnk@diebold.com
2
2529
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 call stack I don't see the line number, except for the last line of the stack (which corresponds to the Application.run in fact). one precision : my application contains several assemblies, and the
5
1487
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 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:
0
1441
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, rather than the line where the error actually occurred. This seems counter intuitive. Try Throw New IndexOutOfRangeException Catch ex As Exception 'At this point, the stack trace has the correct line number Throw 'but in the Application_Error...
2
3480
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 trace without any problems. However when an application runs at the production PC deployed with VS2005 setup I don't see line numbers in the stack trace.
2
1440
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
3004
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") _prtSKU = myDLReader.GetString("prtSKU") _prtPic = myDLReader.GetString("prtPic") _prtRsvQty = myDLReader.GetInteger("prtRsvQty")
5
4489
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 line number that is being obtained by stackFrame.GetFileLineNumber() represents AnotherForm.LogMessage function's line number. I am trying to write the line number of the statement which is causing an exception and not the LogMessage function's line...
0
8969
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.