BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How cna I debug this
Goto page 1, 2  Next
 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Non-Technical)
View previous topic :: View next topic  
Author Message
AlisdairM
Guest





PostPosted: Tue Jan 10, 2006 4:27 pm    Post subject: Re: How cna I debug this Reply with quote



Tim Frost wrote:

Quote:
So I'm thinking somethings come unravelled in CC3270MT.DLL, but how I
can work out what?

Any ideas?

Have you tried linking against the static runtime library?
Generally we found debugging problems with the dynamic RTL to awkward
with previous BCB, so insist on static linking all the time. It is not
always the answer (for bug hunting) but is helpful more often than not.

Also, previous BCB had bugs in the RTL that did not show up when static
linking - I am not sure that will be the case with BCB2006 though (no
test data either way, but many code-gen fixes in the compiler will no
longer need workarounds, so RTL should be better anyway!)

--
AlisdairM(TeamB)

Back to top
Tim Frost
Guest





PostPosted: Tue Jan 10, 2006 5:12 pm    Post subject: How cna I debug this Reply with quote



Hi,

I have compiled a BCB6 App with BS2006 and after a few minor tweaks it
compiled ok.

However when I run it, it crashes on loading, before any of my code
executes. (That is if I press F8 it never gets into the code.) The stack
looks like this when it goes down:

:7c81eb33 kernel32.RaiseException + 0x52
:3277872e CC3270MT.___raiseDebuggerException + 0x1a
:32778808 CC3270MT.___raiseDebuggerException + 0xf4
:7c9037bf ntdll.RtlConvertUlongToLargeInteger + 0x7a
:7c90378b ntdll.RtlConvertUlongToLargeInteger + 0x46
:7c90eafa ntdll.KiUserExceptionDispatcher + 0xe
:004577B8 _STCON0_()
:32799f25 ; C:WINDOWSsystem32CC3270MT.DLL
:3279a0fb CC3270MT.__startup + 0xeb

So I'm thinking somethings come unravelled in CC3270MT.DLL, but how I can
work out what?

I am able to compile and run simple projects.

The PC is a dual Xeon processor machine with a 3D Labs Wildcat Realizm 200
graphics card.

I have BCB6 installed on the machine and it appears on the path after
BS2006.

The app is fairly large and uses OpenGL.

Any ideas?

Tim


Back to top
Roddy Pratt
Guest





PostPosted: Tue Jan 10, 2006 5:52 pm    Post subject: Re: How cna I debug this Reply with quote



"Tim Frost" <Tim (AT) FrostNet (DOT) ltd.uk> wrote

Quote:
I have compiled a BCB6 App with BS2006 and after a few minor tweaks it
compiled ok.

However when I run it, it crashes on loading, before any of my code
executes. (That is if I press F8 it never gets into the code.) The stack
looks like this when it goes down:

Try running the application from OUTSIDE the IDE

Missing DLLs seem to cause incomprehensible debugger reports in the BDS2006
IDE, but get reported nicely 'outside'...

Let me know if that fixes it.

- Roddy



Back to top
Sebastian Ledesma [Solidy
Guest





PostPosted: Tue Jan 10, 2006 6:12 pm    Post subject: Re: How cna I debug this Reply with quote

Hello:

As I know, the new memory manager it's less permisive with reusing memory
deleted/freed (since it allows to
optimize cache usage). Probably it's bug in a third party control.
You can check this two articles, they are pretty usefull

The New Memory manager in BDS2006:
http://bdn.borland.com/article/0,1410,33416,00.html
Using the old Memory manager (Delphi 7) in BDS2006:
http://cc.borland.com/Item.aspx?id=23580

Saludos
Sebastian

"Tim Frost" <Tim (AT) FrostNet (DOT) ltd.uk> escribió en el mensaje
news:43c3ea88 (AT) newsgroups (DOT) borland.com...
Quote:
Hi,

I have compiled a BCB6 App with BS2006 and after a few minor tweaks it
compiled ok.
.....

Any ideas?

Tim




Back to top
Nathan Anderson
Guest





PostPosted: Tue Jan 10, 2006 11:34 pm    Post subject: Re: How cna I debug this Reply with quote

Tim Frost wrote:
Quote:
Hi,

I have compiled a BCB6 App with BS2006 and after a few minor tweaks it
compiled ok.

Tim,

Create a new project, and re-add all your source. I ran into this issue when converting one of my apps.

Nathan.


Back to top
Tim Frost
Guest





PostPosted: Wed Jan 11, 2006 4:07 pm    Post subject: Re: How cna I debug this Reply with quote

Hi,

Yes I have tried that - the program still generates the error before
anything is debuggable.

Tim

"AlisdairM" <alisdair.meredith (AT) uk (DOT) renaultf1.com> wrote

Quote:
Tim Frost wrote:

So I'm thinking somethings come unravelled in CC3270MT.DLL, but how I
can work out what?

Any ideas?

Have you tried linking against the static runtime library?
Generally we found debugging problems with the dynamic RTL to awkward
with previous BCB, so insist on static linking all the time. It is not
always the answer (for bug hunting) but is helpful more often than not.

Also, previous BCB had bugs in the RTL that did not show up when static
linking - I am not sure that will be the case with BCB2006 though (no
test data either way, but many code-gen fixes in the compiler will no
longer need workarounds, so RTL should be better anyway!)

--
AlisdairM(TeamB)



Back to top
Tim Frost
Guest





PostPosted: Wed Jan 11, 2006 4:09 pm    Post subject: Re: How cna I debug this Reply with quote

Hi,

I tried this, but it just crashed.

I have done a bit of looking at _SCON0_, which seems to be related to memory
allocation - so it is probably not a DLL problem in this case.

Tim

"Roddy Pratt" <roddy at spam fritter dot com> wrote

Quote:
"Tim Frost" <Tim (AT) FrostNet (DOT) ltd.uk> wrote in message
news:43c3ea88 (AT) newsgroups (DOT) borland.com...
I have compiled a BCB6 App with BS2006 and after a few minor tweaks it
compiled ok.

However when I run it, it crashes on loading, before any of my code
executes. (That is if I press F8 it never gets into the code.) The
stack looks like this when it goes down:

Try running the application from OUTSIDE the IDE

Missing DLLs seem to cause incomprehensible debugger reports in the
BDS2006 IDE, but get reported nicely 'outside'...

Let me know if that fixes it.

- Roddy




Back to top
Tim Frost
Guest





PostPosted: Wed Jan 11, 2006 4:10 pm    Post subject: Re: How cna I debug this Reply with quote

Nathan,

Yes I've tried this, it didn't help - unfortunately.

Tim

"Nathan Anderson" <nathan (AT) no_spam-andersonsplace (DOT) net> wrote

Quote:
Tim Frost wrote:
Hi,

I have compiled a BCB6 App with BS2006 and after a few minor tweaks it
compiled ok.

Tim,

Create a new project, and re-add all your source. I ran into this
issue when converting one of my apps.

Nathan.




Back to top
Hendrik Schober
Guest





PostPosted: Wed Jan 11, 2006 4:29 pm    Post subject: Re: How cna I debug this Reply with quote

Tim Frost <Tim (AT) FrostNet (DOT) ltd.uk> wrote:
Quote:
Hi,

I have compiled a BCB6 App with BS2006 and after a few minor tweaks it
compiled ok.

However when I run it, it crashes on loading, before any of my code
executes. (That is if I press F8 it never gets into the code.) [...]
Any ideas?

Do you have any global/static objects with user-defined
constructors? Those objects will get initialized before
'main()' is entered and if something goes wrong during
this, you'll never reach 'main()'. Whenever I have seen
such problems, it was some ctor throwing or otherwise
blowing up.
Oh, and only now I see that you're compiling a BCB6 app
with BSD2006. You did create the project from scratch,
or did you?

Quote:
Tim


Schobi

--
[email]SpamTrap (AT) gmx (DOT) de[/email] is never read
I'm Schobi at suespammers dot org

"The sarcasm is mightier than the sword."
Eric Jarvis



Back to top
Bob Gonder
Guest





PostPosted: Wed Jan 11, 2006 4:53 pm    Post subject: Re: How cna I debug this Reply with quote

Tim Frost wrote:

Quote:
I have done a bit of looking at _SCON0_, which seems to be related to memory
allocation - so it is probably not a DLL problem in this case.

Do your app settings ask for a small stack or heap value?
Maybe the new startup code is using just enough more to blow them?



Back to top
AlisdairM
Guest





PostPosted: Thu Jan 12, 2006 4:41 pm    Post subject: Re: How cna I debug this Reply with quote

Tim Frost wrote:

Quote:
I have now fixed this. Many thank to all the suggestions from
various people - however it turned out to be something different.

Glad you got there in the end <g>

Quote:
How did I find it?

Well having run out of ideas I turned on all the CodeGuard features,
ran it outside the IDE (thanks for that one Roddy) and looked at the
cgl file. It showed a memory leak in GLFrame.obj, which was odd as I
didn't think it was in the project. I then did a 'find in files' on
GLFrame and bingo.

That's exactly why we have batch files set up to 'clean' our build
system of any residue of the compiler - precompiled headers, objs,
libs, exes and even ~ files. If anything strange is happenning our
first action is to try a 'clean' build, to be sure we know what we are
looking at before starting to debug. This solves around 90% of those
'wierd' problems, without even thinking about them.

Suffice to say, we designed our project directory structure to make
writing those batch files easy ;?)

AlisdairM(TeamB)

Back to top
Rudy Velthuis [TeamB]
Guest





PostPosted: Thu Jan 12, 2006 4:52 pm    Post subject: Re: How cna I debug this Reply with quote

ExoSet wrote:

Quote:
AlisdairM are you member of Borland's teamB ????

http://info.borland.com/newsgroups/teamb/teambbyproduct.html

8-)))

Yes, he is. But that page has obviously not been updated yet.
--
Rudy Velthuis [TeamB] http://velthuis.homepage.t-online.de

"There is more stupidity than hydrogen in the universe, and it has a
longer shelf life."
- Frank Zappa

Back to top
Tim Frost
Guest





PostPosted: Thu Jan 12, 2006 5:02 pm    Post subject: Re: How cna I debug this Reply with quote

Hi,

I have now fixed this. Many thank to all the suggestions from various
people - however it turned out to be something different.

In the original project I had used the Frame component in the IDE. Later I
had removed this. However the IDE had added the line:

#pragma link "GLFrame"

Now I had removed GLFrame.cpp from the project, but not from the folder.
(Yes it's abit sloppy, but it happens.) (I bet you can tell where this is
leading now...)

So the new compiler was linking in the old compiled version of the module,
which is what caused the problem.

How did I find it?

Well having run out of ideas I turned on all the CodeGuard features, ran it
outside the IDE (thanks for that one Roddy) and looked at the cgl file. It
showed a memory leak in GLFrame.obj, which was odd as I didn't think it was
in the project. I then did a 'find in files' on GLFrame and bingo.

Thanks for all the help.

Tim

"Tim Frost" <Tim (AT) FrostNet (DOT) ltd.uk> wrote

Quote:
Hi,

I have compiled a BCB6 App with BS2006 and after a few minor tweaks it
compiled ok.

However when I run it, it crashes on loading, before any of my code
executes. (That is if I press F8 it never gets into the code.) The stack
looks like this when it goes down:

:7c81eb33 kernel32.RaiseException + 0x52
:3277872e CC3270MT.___raiseDebuggerException + 0x1a
:32778808 CC3270MT.___raiseDebuggerException + 0xf4
:7c9037bf ntdll.RtlConvertUlongToLargeInteger + 0x7a
:7c90378b ntdll.RtlConvertUlongToLargeInteger + 0x46
:7c90eafa ntdll.KiUserExceptionDispatcher + 0xe
:004577B8 _STCON0_()
:32799f25 ; C:WINDOWSsystem32CC3270MT.DLL
:3279a0fb CC3270MT.__startup + 0xeb

So I'm thinking somethings come unravelled in CC3270MT.DLL, but how I can
work out what?

I am able to compile and run simple projects.

The PC is a dual Xeon processor machine with a 3D Labs Wildcat Realizm 200
graphics card.

I have BCB6 installed on the machine and it appears on the path after
BS2006.

The app is fairly large and uses OpenGL.

Any ideas?

Tim




Back to top
ExoSet
Guest





PostPosted: Thu Jan 12, 2006 5:50 pm    Post subject: Re: How cna I debug this Reply with quote

AlisdairM are you member of Borland's teamB ????

http://info.borland.com/newsgroups/teamb/teambbyproduct.html

8-)))

Ï "AlisdairM" <alisdair.meredith (AT) uk (DOT) renaultf1.com> Ýãñáøå óôï ìÞíõìá
news:43c3ee77$1 (AT) newsgroups (DOT) borland.com...
Quote:
Tim Frost wrote:

--
AlisdairM(TeamB)



Back to top
ExoSet
Guest





PostPosted: Thu Jan 12, 2006 6:47 pm    Post subject: Re: How cna I debug this Reply with quote

"All , we belong to the same universe and we get the same hydrogen and
everything else has this nice world....."
Exosetappa

Quote:
Yes, he is. But that page has obviously not been updated yet.
--
Rudy Velthuis [TeamB] http://velthuis.homepage.t-online.de

"There is more stupidity than hydrogen in the universe, and it has a
longer shelf life."
- Frank Zappa



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Non-Technical) All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.