Issue 254: 2 problems: haxe.CallStack.exceptionStack returning incorrect stack or (mostly) just empty.
Status:  New
Owner: ----
Reported by srikanth...@gmail.com, Sep 20, 2013
What steps will reproduce the problem?

1. Create a temporary directory
2. Download the attached files into that temporary directory
3. Change your present working directory to that temporary directory
4. Compile the source using: nme build simple.nmml linux -debug -v
5. Run the produced binary: bin/linux/cpp/bin/SimpleTest

What is the expected output? What do you see instead?

Output I expect to see is in attached file: ExpectedOutput.txt
Output that I am seeing is in attached file: CurrentOutput.txt

What version of the product are you using? On what operating system?

Haxe Compiler 3.1.0 - (C)2005-2013 Haxe Foundation
NME Command-Line Tools (3.5.6)
CentOS release 6.2 (Final)

Please provide any additional information below.

Problem # 1: Incorrect Exception Stack Trace
If you look at the attached CurrentOutput.txt on line 40, it shows that func30 is called from func20! That's bad. Seems like earlier stack trace is creeping-in, probably because same buffer is used and not properly cleaned-up!

Problem # 2: Exception Stack Trace is empty, most of the time.
e.g. try replacing as per comment in line 33 and compile/run the program.
     do few runs!

I used attached SimpleMain.hx to validate whether this problem is stemming from one of the layers of libraries/our-code or hxcpp. Looking at the output (unless I'm doing something grossly wrong), my impression is that: 
problem seems to be in hxcpp.

-Srikanth Ganapavarapu
Sr. Software Engr.
TiVo, Inc.
ganapavarapu ate tivo dought com
srikanth dought ganapavarapu ate gmail dought com
CurrentOutput.txt
1.8 KB   View   Download
ExpectedOutput.txt
2.4 KB   View   Download
SimpleMain.hx
2.6 KB   View   Download
simple.nmml
426 bytes   Download
Sep 21, 2013
Project Member #1 gameh...@gmail.com
Hi,
Are you using the latest version of HXCPP?  I am not getting problem #1 on my machine, and  issue #2  seems pretty solid.
I did a fix for this August 17, https://code.google.com/p/hxcpp/source/detail?r=748

Hugh
Sep 23, 2013
#2 Gana.Sri...@gmail.com

Hi Hugh, 

Thanks for quick response. No, we haven't been using latest HXCPP. 
We shall take the change # r748 and verify the fix you mentioned.

Thanks, 
Srikanth