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 504453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:29:54+00:00 2026-05-13T06:29:54+00:00

Platform : Win32 Language : C++ I get an error if I leave the

  • 0
  • Platform : Win32
  • Language : C++

I get an error if I leave the program running for a while (~10 min).

Unhandled exception at 0x10003fe2 in ImportTest.exe: 0xC0000005: Access violation reading location 0x003b1000.

I think it could be a memory leak but I don’t know how to find that out.

Im also unable to ‘free()‘ memory because it always causes (maybe i shouldn’t be using free() on variables) :

Unhandled exception at 0x76e81f70 in ImportTest.exe: 0xC0000005: Access violation reading location 0x0fffffff.

at that stage the program isn’t doing anything and it is just waiting for user input

dllHandle = LoadLibrary(L"miniFMOD.dll");

playSongPtr = (playSongT)GetProcAddress(dllHandle,"SongPlay");
loadSongPtr = (loadSongT)GetProcAddress(dllHandle,"SongLoadFromFile");

int songHandle = loadSongPtr("FILE_PATH");

// ... {just output , couldn't cause errors}

playSongPtr(songHandle);
getch(); // that is where it causes an error if i leave it running for a while

Edit 2:

playSongPtr();

causes the problem. but i don’t know how to fix it

  • 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-13T06:29:55+00:00Added an answer on May 13, 2026 at 6:29 am

    I think it’s pretty clear that your program has a bug. If you don’t know where to start looking, a useful technique is “divide and conquer”.

    Start with your program in a state where you can cause the exception to happen. Eliminate half your code, and try again. If the exception still happens, then you’ve got half as much code to look through. If the exception doesn’t happen, then it might have been related to the code you just removed.

    Repeat the above until you isolate the problem.

    Update: You say “at that stage the program isn’t doing anything” but clearly it is doing something (otherwise it wouldn’t crash). Is your program a console mode program? If so, what function are you using to wait for user input? If not, then is it a GUI mode program? Have you opened a dialog box and are waiting for something to happen? Have you got any Windows timers running? Any threads?

    Update 2: In light of the small snippet of code you posted, I’m pretty sure that if you try to remove the call to the playSongPtr(songHandle) function, then your problem is likely to go away. You will have to investigate what the requirements are for “miniFMOD.dll”. For example, that DLL might assume that it’s running in a GUI environment instead of a console program, and may do things that don’t necessarily work in console mode. Also, in order to do anything in the background (including playing a song), that DLL probably needs to create a thread to periodically load the next bit of the song and queue it in the play buffer. You can check the number of threads being created by your program in Task Manager (or better, Process Explorer). If it’s more than one, then there are other things going on that you aren’t directly controlling.

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

Sidebar

Ask A Question

Stats

  • Questions 241k
  • Answers 241k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If you revert to using Win32 API calls, you can… May 13, 2026 at 7:28 am
  • Editorial Team
    Editorial Team added an answer I think you are in a GPL-bind there and have… May 13, 2026 at 7:28 am
  • Editorial Team
    Editorial Team added an answer It looks like the formfield method is called by the… May 13, 2026 at 7:28 am

Related Questions

I'm trying to find a programming language I feel really comfortable learning and using
I've spent today looking into lockless queues. I have a multiple producer, multiple consumer
I want to automate several tasks (eg. simulate eclipse style ctrl - shift -
On a cross-platform project, I want to #include a header file whose name contains
I have a char array in a C application that I have to split

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.