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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:48:31+00:00 2026-06-13T07:48:31+00:00

I keep getting this error trying to run the debugger: Program received signal EXC_BAD_ACCESS,

  • 0

I keep getting this error trying to run the debugger:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x00007fff8c2414f0 in strlen ()

Here is my code:

#include <stdio.h>
#include <cs50.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
    char s2[25];
    strcpy(s2, argv[1]);
    int keyLen = strlen(s2);
    printf("Please enter a string of text to be encrypted!\n");
    string p = GetString();
    for (int i = 0, n = strlen(p); i < n; i++)
    {
        if (isupper(p[i])){
        int sum = (p[i] - 'A') + (s2[i % keyLen] - 'A');
        char c = 'A' + sum%26;
        printf("%c", c);
        }
    }
    printf("\n");
    printf("%d\n", keyLen);

}

I can compile the code with no errors and it works like it should. I am running the debugger to step into the for loop and look at what the math is doing to better understand 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-06-13T07:48:32+00:00Added an answer on June 13, 2026 at 7:48 am

    I finally got it thanks to hmjd I was running it incorrectly I would start the program

    gdb vignere HHHHH
    

    Which is incorrect I ran it

    gdb vignere
    run HHHHHH
    

    and it worked perfect!

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

Sidebar

Related Questions

Im trying to use Date Formatters (NSDateFormatter), but I keep getting this error: Program
I'm trying to run the code below and I keep getting this error back:
I'm trying to run a very simple integration test and keep getting this error:
Hi i'm trying to run Nant but keep getting this error when i tried
I am trying to run the debugger in Rubymine and I keep getting this
I keep getting this error when trying to run the code: (let ((exp lambda
This is really frustrating. I keep getting this error when trying to run a
I'm trying to run a PHP script, but I keep getting this error whenever
I keep getting this error while trying to modify some tables. Here's my code:
Keep getting this error after inserting a subdatasheet into a query and trying to

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.