Solved

Strangest thing ???

Posted on 1998-03-25
20
219 Views
Last Modified: 2010-04-06
Hi, strangest thing is happenning. Last night I was doing some debugging on my Delphi v3 app. Everything was fine...shut things down and went to bed. Today, I get up to continue my debugging...nothing has really changed...except all of a sudden Delphi v3 does not recognize the breakpoints I set in debug mode...it just flies right past them and doesn't stop! What is happening here? I'm pulling my hair out trying to figure this out...

Regards,
   Shawn Halfpenny
   drumme59@sprint.ca
0
Comment
Question by:aztec
  • 7
  • 5
  • 5
  • +3
20 Comments
 
LVL 5

Expert Comment

by:inter
ID: 1360839
Hi friend,

The problem it weird actually. I have the following suggestions for quick recovery:

1 - Open one of your old projects. Set a break point and see if it works.
2 - IF 1 above works, create a new project over your project, include all the forms and try debuging again.
3 - ELSE notify please,

Regards,
Igor
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1360840
Mmmm, really spooky things ...
0
 
LVL 5

Expert Comment

by:inter
ID: 1360841
Hi Zif, (and are you there aztec?)

How is the grid going (you may not respond if you find it inconvinient in this problem)

Igor


0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1360842
Hi Igor & aztec (if I may say something about the grid), well I was working on it, but now i'm overloaded with work, again... I was making a pop-up for memo and bitmaps. Had a problem, but found a solution, so that's one we can add soon to our grid. How about you?
0
 
LVL 5

Expert Comment

by:inter
ID: 1360843
Hi there, you may assign a task to me about the grid(a dividable task such as design a for that shows the given bitmap in a blob, etc...). I was ill on all last 9 days so do nothing.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1360844
Hi Inter, you may choose a task that you like... Just, look at our CRS and do what you like or even find one out... PS. do you know how I can make a property editor for columns? Just a hint and I make one for different fonts, colors, lookings... I never made a property editor, so it would be great if I knew how to start...
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1360845
Inter, glad you're cured!
0
 
LVL 1

Expert Comment

by:Odie
ID: 1360846
aztec,

I sometimes have the same problem, it always seems that I just compiled the project as a release.  That is in the project options I somewhere put off the 'integrated debugging'-checkbox.  Don't know if that's the case here, but you can try.
Something else, try closing all files in the project, then reopen your file with the breakpoints and save that file - this sometimes solves this problem in c++builder.
0
 

Author Comment

by:aztec
ID: 1360847
Hi Igor...
   I tried debugging another one of my programs...it was fine. Something else strange happened: I compiled my app, then set a breakpoint on the first line of executable code in a BitBtnClick event...it flashed an error window saying that "Breakpoint cannot be set on tis line as there is no executable code on this...."...and so on. But it IS an excutable line of code! Also I notice in my main unit about half way down, it stops putting  those little blue dots in the grey area to left indicating the executable lines of code. The first half of my unit is OK, it has those little dots, then (curiously enough) in the portion I have been working on the last couple of days, the dots stop...and there are no dots from there to the end of the unit. Something weird is going on!

Cheers
   Shawn
0
 

Author Comment

by:aztec
ID: 1360848
Hi Igor...
   I tried debugging another one of my programs...it was fine. Something else strange happened: I compiled my app, then set a breakpoint on the first line of executable code in a BitBtnClick event...it flashed an error window saying that "Breakpoint cannot be set on tis line as there is no executable code on this...."...and so on. But it IS an excutable line of code! Also I notice in my main unit about half way down, it stops putting  those little blue dots in the grey area to left indicating the executable lines of code. The first half of my unit is OK, it has those little dots, then (curiously enough) in the portion I have been working on the last couple of days, the dots stop...and there are no dots from there to the end of the unit. Something weird is going on!
   Maybe my unit is too big? Or maybe using 128K as a buffer size in my Blockread statement made my data area too big and strange things are happening? I don't know...

Cheers
   Shawn
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:aztec
ID: 1360849
Hi Igor...
  I just tried your suggestion:

2 - IF 1 above works, create a new project over your project, include all the forms and try debuging again.

..It gave the same problems...there are no little dots to the left of the portion of code I have been working on lately..all the way down to the end of the unit. It will not recognize a breakpoint anywhere in that area.

Regards,
   Shawn
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 1360850
I constantly have the same problem with D3.  I'll be happly working along, go home, come back the next day and I wont be able to set break points anywhere.  Even copying the project onto my other machine will not allow the set breakpoints to work.

If anyone has any ideas on this, I too would be interested to find an answer!!

Cheers!

Stu
0
 
LVL 5

Expert Comment

by:inter
ID: 1360851
Hi friends,

I am using Delphi 2.0 and do not know about your dots and such things. But if Delphi insist that there is no code generated for THAT line, it may not. Try BUILD ALL, clear all DCU and symbol staff and Compile etc. If I have delphi 3.0 I want to see your project. I am almost sure that this is caused by IDE settings and such staff saved when a delphi project is loaded. Sorry, I can not suggest further because do not have clue for the Delphi 3.0

Sincerely,
Igor
0
 

Author Comment

by:aztec
ID: 1360852
Hi Igor and Stuart...
  Well, I called Borland Tech Support ($2.95/minute..ouch) and told them of this problem. The guy I spoke with asked his colleagues and none of them had heard of this error before. he suggested deleting the DCU files and rebuiling. i did that...no good. I even re-installed Delphi 3 from scratch...still no good. The tech guy was no help...I told him to put it down as a bug in Delphi...I don't know if he will or not.
  Anyway, this thing is really screwing me up...I can't get in and do any debugging on a major chunk of my code...this really sets me back. Is there anyone else there that you can bounce this problem off of?
  Stuart, since you are experiencing the same thing,  maybe you could demonstrate the problem to your experts-exchange colleagues? We have to get to the bottom of this!

Cheers!
   Shawn Halfpenny
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1360853
Hi all,
When you reinstalled D3, had you also cleared the registry entries of D3? If like you say reïnstalling doesn't help, then it has something to do with registry entries which aren't properly cleared when uninstalling D3. I once had such a problem with a component. I also lost of hair with it. Even uninstalling and reinstalling the component didn't help. Until I searched the registry for all the entries of that component, there I found an entry which could be the problem. I changed it and viola everything was solved. I hope you have something on this information.
Regards, ZiF.
0
 

Author Comment

by:aztec
ID: 1360854
Hi Zifnab...
   Well, I did the uninstall as the Borland documentation specifies: To go into control panel, then Add/Remove programs and choose Delphi 3. Does this remove the registry entries? I don't know. If it doesn't, how does one remove them?

Regards,
   Shawn
0
 

Author Comment

by:aztec
ID: 1360855
FOUND THE PROBLEM!! It's a memory-related issue. I had one procedure where I was using a Blockread statement. I had declared a local buffer variable of array[0..131071] of char (128K). It seems that big buffer blew the debugging all the hell. Once I lowered that down to about 48K (49152 bytes), the debugging worked fine!

   Igor, give me an 'A' for this one!  :-)


Cheers!
   Shawn Halfpenny
0
 
LVL 5

Expert Comment

by:inter
ID: 1360856
Hi friend,

I am happy that you got it. Take these AAAAAAAAAAAAAAAAAAAAAAAA's and thanks for all experts. So we have a rule of thumb:

USE DYNAMIC ALOCATION FOR ARRAYS LARGER THAN 32k(TO BE SAFE) IN LOCAL PROCEDURES TO PRESERVE STACK AS FOLLOWS:

var
  BufPtr : Pointer; // or PChar;
begin
  GetMem(BufPtr, 128*1024);
  // open file here
  ....
  try
    BlockRead(BufPtr^,.....);
  finally
     FreeMem(BufPtr, 128*1024);
  end;
end;

Congratulations Again,
Igor
0
 
LVL 1

Accepted Solution

by:
dvaline earned 50 total points
ID: 1360857
If you haven't upgrade to Dlelphi 3.01 do so.  Delphi 3 clears the breakpoints when you close the IDE down.  Then when you open your project up there exists none of the breakpoints you set in your last debugging session.
0
 

Author Comment

by:aztec
ID: 1360858
Give the A grade to Inter...I already have v3.02, dvaline, and it did not help.

Regards,
   Shawn
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now