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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:29:42+00:00 2026-05-23T14:29:42+00:00

I made a C program to get an image offline and save it in

  • 0

I made a C program to get an image offline and save it in a file using fopen/fread/fwrite and libcurl. Everything compiles perfectly fine and I can run it perfectly fine by double clicking the program. But, when I try and set a task on my computer using task scheduler to run it every 10 minutes, the program opens and when it tries to save the file I get the error:

exception::handle: Exception: STATUS_ACCESS_VIOLATION
open_stackdumpfile: Dumping stack trace to garden.exe.stackdump

I am running Windows Vista, and attempting to use the native Windows Scheduled Tasks feature. I have checked the box marked “Run with highest privileges” in the task properties.

  • 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-23T14:29:43+00:00Added an answer on May 23, 2026 at 2:29 pm

    My guess is that whatever is running your program is doing so from a directory to which you don’t have write permissions. The fact that there is no “garden.exe.stackdump” file gives that as a clue.

    When you save it to a file, are you saving it as fopen("myfile","w") or are you using a fully qualified name? For example, let’s say that the file you want to save is called “foobar.png” and you want to save it to the directory you named below, you’d have something like:

        char fname[256] = "foobar.png";
        char directory[256] = "C:/Users/Joel/Desktop/garden/snaps";
        char path[256];
    
        memset(path, 0, sizeof(path));
        strcpy(path, directory);
        strcat(path, "/");
        strcat(path, fname);
    
        if ((fp = fopen(path, "w")) == NULL) {
            fprintf(stderr, "Failed to open %s: %s\n", path, strerror(errno));
            exit(1);
        }
    
        fwrite(yourdata, yourdata_size, 1, fp);
    

    Since your program also seems to dump errors to a file as well, you might do well to chdir("/home/myname") at the start of your program so that any “.stackdump” files get placed where you have access.

    The other thing you might want to take into account is that your task scheduler may be running your script as nobody or some other permissions-deprived account. If that’s the case, you’ll want to use a full path in fopen and chdir to a globally writable area (such as /tmp) or a working directory with open permissions. For example:

    mkdir /home/myname/scratch
    chmod a+rwx /home/myname/scratch
    chmod a+x   /home/myname
    

    (You set the execute bit on your home directory so that the permission-less program can get access to its subdirectory even though it can’t read anything in it.)

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

Sidebar

Related Questions

I made a program. I also made my own file type, which the program
I have made my own file type (.ddd) and I made a simple program
I made a program to mute microphone using WinAPI and it seems to work
I made a program that extracts the text from a HTML file. It recurses
I have made a program on eclipse. But how can I get the program
I made a program for RDF by using jena in java... I have to
In a simple program I made, I wanted to get a list from another
I made simple python program to generate big text file: import sys import random
I made a program using Eclipse, but I want to learn to compile it
I made small program to divide large pictures and take part of them. When

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.