We help IT Professionals succeed at work.

Help : Cannot understand error mesg.

jmahtani asked
Last Modified: 2010-04-15
      I have written a C program to build the tables
that an assembler usually does. After compiling and trying
to run the program, an error message is displayed :

General Protection Exception
SYS1A(1) 0x58DF:0X0D12 Processor Fault

I would really appreciate it if someone could tell me
whats going on ? What kind of error message is this and
where do I need to look ? The message gives me no idea of
where do I start looking for a problem.
I will summarize.

Waiting for a response.
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)


     Thanks for replying. I believe the error is being caused due to an array that is of 68 by 48. When I cut the array size from 68 by 48 to 37 by 48( and commented the rest), I did not get the error. Then I decided to cut the 68 by 48 array to two arrays - 37 by 48 and 31 by 48, but then the error message came back. Do you have any idea of whats going wrong ?
( Note : In one of the initialisations of my array, I have one of the          rows as
         "         DC    C'BANANA    ,           ,KIWI   '",
  Can this be causing the problem.        

  If its not a problem to you, should I email my program to you,   so that it will give you a better idea of how the array is   being  initialised.
Waiting for your response.

You should post the part causing problem as it could be different reason like you access a memory allocation where you shouldn't or you try to free a pointer which point anywhere....

You can e-mail me : sigmafei@ms1.hinet.net

But I think your better way is to post up some parts of your
initializations here. Maybe other friends also feel interested
for your coding problems.


     I really appreciate your help. The following is the declaration of the array that I believe is causing the problem,since when I reduced the size of the array from 68 rows to 37, the error disappeared. When I split the 68 rows array into 2 arrays of 37 and 31 rows, the error came back. If its not a problem,, can someone please examine it and let me know of what could be causing the problem.
Waiting for your response.
char code[68][48]=
 {"DIFF     CSECT                             ",
  "         STM   14,12,12(13)                       ",
  "         BALR  12,0                               ",
  "         USING *,12                               ",
  "         ST    13,MAINSAV+4                  ",
  "         LA    13,MAINSAV                       ",
  "         LA    2,TABLE1                       ",
  "         LA    3,TABLE2                         ",
  "         LA    4,0                                  ",
  "NEXT     CLI   0(2),C' '                         ",
  "         BC    B'1000',GETNEXT                     ",
  "         CLC   0(10,2),=CL10'NOMORE'               ",
  "         BC    B'1000',NOMORE                   ",
  "         MVC   0(10,3),0(2)                          ",
  "         LA    4,1(4)                             ",
  "         LA    3,10(3)                           ",
  "GETNEXT  LA    2,10(2)                          ",
  "         BC    B'1111',NEXT                     ",
  "NOMORE   ST    4,COUNT                          ",
  "         LA    1,=A(PARMLT)                     ",
  "         LA    15,SORT                          ",
  "         BALR  14,15                               ",
  "         L     13,MAINSAVE+4                       ",
  "         LM    14,12,12(13)                         ",
  "         R     14                                   ",
  "         LTORG                                  ",
  "PARMLT   DC    A(TABLE2)                          ",
  "         DC    X'80',AL3(COUNT)                   ",
  "MAINSAVE DS    18F                                ",
  "COUNT    DS    F                                ",
  "TABLE1   DC    C'APPLE   ,PEAR       ,         '",
  "         DC    C'BANANA  ,           ,KIWI     '",
  "         DC    C'        ,RAMBUTAN   ,DATE     '",
  "         DC    C'GRAPE   ,BERRY      ,DURIAN   '",
  "         DC    C'KUMQUAT ,POMEGRANIT ,PAPAYA   '",
  "         DC    C'QUINCE  ,           ,NOMORE   '",
  "TABLE2   DS    15CL10                           ",
  "SORT     CSECT                           ",
  "          STM   14,12,12(13)                     ",
  "         BALR  12,0                           ",
  "         USING *,12                             ",
  "         ST    13,SORTSAVE+4                        ",
  "          LA    13,SORTSAVE                     ",
  "           L     2,4(1)                     ",
  "              L     2,0(2)                     ",
  "         L     5,0(2)                     ",
  "         BCTR  2,0                           ",
  "DO10     EQU   *                           ",
  "          LR    3,2                           ",
  "         SR    4,4                           ",
  "DO20     EQU   *                           ",
  "          L     6,0(4,5)                     ",
  "IF30     C     6,10(6)                     ",
  "         BNH   FI30                           ",
  "         MVC   TEMP(10),10(6)                     ",
  "         MVC   10(10,6),0(6)                     ",
  "         MVC   0(10,6),TEMP                     ",
  "FI30     EQU   *                           ",
  "         LA    4,10(4)                     ",
  "         BCT   3,DO20                     ",
  "0D20     EQU   *                           ",
  "         BCT   2,DO10                            ",
  "0D10     EQU   *                                ",
  "         L     13,SORTSAVE+4                     ",
  "         LM    14,12,12,(13)                     ",
  "         BR    14                               ",
  "TEMP     DS    CL10                             ",
  "         END   DIFF                           "};

Make sure that you are not trying to access code[68] anywhere in your program. Since 'C' language is zero based valid values are code[0] to code[67].

for(i=0; i<=68; i++) is wrong; it should be for(i=0; i<68; i++)


I am not trying to access row 68 anywhere in my program. The error seems to be associated with the declaration of the array since when I reduced the array size from 68 rows to 37 rows, I did not get the error message. So I decided to split the original array of 68 rows into two arrays of 37 rows and 31 rows, but then  the error message came back, which is surprising.
Waiting for a response.

I felt strange in your dim declaration : char code[68][48]= ...
Your data type is only 68 "pointers", so you need to define : char *code[68]=...

Could you show us how do you accessing code[n]?


Dear Jackie and everyone who helped,
Thank you very much.
 char *code[68]=.... solved the problem.
Though the problem has been solved, can someone please
explain why char code[68][48] did not work, but
 char *code[68]=.. worked. I was under the impression
 that since my array consists of 68 rows and each row
consists of 48 columns, shouldn't char code[68][48]=...
work ??
*a = "1", a is a pointer. ( maybe 4 byte )
a = '1', a is a character buffer. ( 1 byte )

If you want to define code[68][48], you should use :
code[68][48] =
{ {'D','I','F','F',...}

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.