Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ERROR: "Read of Address FFFFFFFF"

Status
Not open for further replies.

onrdbandit

Programmer
Mar 12, 2003
145
US
Howdy,

I have a text encryption app coming together, and it uses a TRichEdit to hold the text. All of a sudden I started getting "Read of Address FFFFFFFF" errors. The code errors when this line runs:

Code:
Form1->RichEdit1->Lines->Clear();

I check to make sure that the Lines object isn't empty, but for some reason it errors anyway.

NOTE: I have tried deleting object files and rebuilding the project, but this did not help either.

Thanks for any help you can give,
onrdbandit
 
I had a similar problem. I deleted all but the *.cpp and the *.bpr files in my project. If you have any *.bmp or *.ico files you can keep them. I think it has something in the *.res or *.tds files is messed up but I also delete all *.~* files just to be safe.

The next time you start this project, BCB will complain about not having a resource file and ask to recreate it. Click OK and if you have been VERY good, the computer muse [elf] will let the program run.

Failing that, you may have to recreate the project from scratch [cry].

James P. Cottingham

When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity.
[tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
 
Forgot to mention, make sure you have a good copy of all project files before deleting anything.


James P. Cottingham

When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity.
[tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
 
Form1->RichEdit1->Clear();

I would suspect that the clear method for the richedit has some error checkin of its own. I have never used the method you use and would be very interested in why you use

Form1->RichEdit1->Lines->Clear();

instead of

Form1->RichEdit1->Clear();

tomcruz.net
 
Hi,

another workaround could be setting the text:

Form1->RichEdit1->Text = "";

Have fun and a lot of success!

Michael
 
Howdy,

Thanks for the suggestions, as an answer to why I use:
Code:
Form1->RichEdit1->Lines->Clear();
rather than the other options is simple.... ignorance. I was unaware the RichEdit Object had a clear function, and have always used the function in the lines object. That was how I first saw it done, and never searched for an easier method.

Maybe one of those solutions will work...

Thanks.
onrdbandit
 
Hi Guys,

let me tell You how I by a wonder stumbled into a similar error AFTER I read this thread...

I had a temporarily created Memo and wanted to set the text. That worked fine on the machine I was programming on. Running the program on another machine (but still with MS-W98 running) let the memo stay clear...

What I did after I read this thing with ...->Lines->Clear() and ...->Clear() only, I decided to go through
my code and find ALL objects where there were TStrings involved (such as Memos, RichEdits and StringLists). Here I changed the Lines->Clear() methods into the owning object's Clear() method. And, here I was with a smoother running program (after a rebuild of course)!!
I hope this helps, maybe someone suggests this as a FAQ, if You would tell me that it works ok in Your applications?


Have fun and all the best

Michael


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top