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

  • Home
  • SEARCH
  • 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 6079485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:57:06+00:00 2026-05-23T10:57:06+00:00

I am using .NET Framework 2.0 to program a 2d platformer. I am using

  • 0

I am using .NET Framework 2.0 to program a 2d platformer. I am using SFML .NET as it is Cross-Platform and supported by MONO and has a mature API. My problem is that although my program compiles properly and runs properly, I get an error while closing it.

The instruction at “0x5ed0530e” referenced memory at “0x0000051c”. The memory could not be “read”

After careful debugging I have noticed that the problem occurs after I initialize the SFML String2d Class.

What is wrong; why does this error occur when closing the program? And even if nothing is wrong is there anyway to stop receiving the error so that the users of my program don’t get annoyed by it?

using System;
using SFML.Graphics;
using SFML.Window;

namespace ProGUI
{
    class TextBox : Sprite
    {
        private String2D Text;
        public TextBox(RenderWindow App)
        {
            Image = new Image(App.Width, App.Height / 4, new Color(0, 0, 0));
            Position = new Vector2(0, App.Height - App.Height / 4);
        }

        public void SetText(string text)
        {
            Text = new String2D(text);
            Text.Font = new Font("Greyscale_Basic_Bold.ttf");
            Text.Position = new Vector2(Position.X + 5, Position.Y + 5);
            Text.Size = 12;
        }

        public string GetText()
        {
            return Text.Text;
        }

        public void Render(RenderWindow App)
        {
            App.Draw(this);
            App.Draw(Text);
        }

        public void MainLoop(RenderWindow App, Color clr)
        {
            while (App.IsOpened())
            {
                App.Clear(clr);

                App.DispatchEvents();

                App.Draw(this);
                App.Draw(Text);

                App.Display();
            }
        }
    }
}

As you can see there is no dodgy code. Absolutely clean and simple.

  • 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-23T10:57:07+00:00Added an answer on May 23, 2026 at 10:57 am

    Does the SFML String2d class implement IDisposable? Do you dispose all instances correctly?

    It might be that the finalizer thread is disposing them when they are in an invalid state.

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

Sidebar

Related Questions

I have a .NET compact framework program that has my CE device open a
I am using .Net framework 2.0 / jQuery to make an Ajax call to
What is difference in developing applications using .Net Framework, Asp.net and developing application in
I am trying to leverage ORM given the following requirements: 1) Using .NET Framework
I wonder if is possible to use FTS with LINQ using .NET Framework 3.5.
We have an application written in C#, using .NET Framework 3.0 or 3.5 or
I am developing a Database File System . I am using - .Net framework
Using the .net framework you have the option to create temporary files with Path.GetTempFileName();
Using the .NET framework, I'm trying to replace double slash characters in a string
Using the .Net Framework 1.1, what options are available for monitoring threads from other

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.