Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3403278
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:14:29+00:00 2026-05-18T05:14:29+00:00

Im getting the following Access violation at address 00404340 in module ‘test.exe’. Read of

  • 0

Im getting the following

Access violation at address 00404340 in module 'test.exe'. Read of address FFFFFFD5

with the following code

var
 List: TStrings;

In the Create Section:
List:= TStringList.Create;

Adding to the list:
Result := List.AddObject('hi', aCreatedObject);
MessageDlg(FunctionHookList.Objects[Result].ClassName, mtInformation, [mbOK], 0);

The Message dialog shows the correct classname

But later when i do,

i := list.IndexOf('hi');
   if i >= 0 then
      if list.Objects[i] <> nil then
        if assigned(list.Objects[i]) then
          begin
           tmp := list.Objects[i];
           if tmp <> nil then
                MessageDlg(tmp.ClassName, mtInformation, [mbOK], 0); //*******
          end;  

i get the Access violation above at on the //******* line

I know there is a bit of duplicated code there, but i was trying to check ‘everything’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:14:30+00:00Added an answer on May 18, 2026 at 5:14 am

    Please note that Assigned doesn’t check anything, except for nil. If you put an object in the stringlist, free it, and then check the stringlist, it will tell you that there’s still an object. Check this example:

    var
      o: TObject;
    begin
      o := TObject(42 {just a random number});
      if Assigned(o) then
        ShowMessage(o.ClassName);
    end;
    

    So almost all your checks are valid, except the assigned. It only checks if the object contains any other value than nil, which it basically the same check you perform on the line above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting an unexpected Access Violation error in the following code: program Project65;
I am getting access violation error when I run the following code on Visual
I am getting the following error: Warning: fopen() [function.fopen]: Unable to access Archive-Report-Sat-Dec-2011 12-12-42.xls/var/www/vhosts/eample.com/httpdocs/_files/Archive-Report-Sat-Dec-2011
Hi I'm getting the following error: Access restriction: The type MainFrame is not accessible
I am getting the following error when I try to access bins private member
I keep getting a -> Program received signal: EXC_BAD_ACCESS. In the following code but
I am getting the following authentication error when trying to access Twitter using my
I'm getting the following error in an application where I need to access a
I seem to be getting the following error when I try to access a
Getting the following error message from https://mws.amazonservices.com/ : <Type>Sender</Type> <Code>SignatureDoesNotMatch</Code> − <Message> The request

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.