Uncaught exception on only one computer

Discussion in 'Mac Programming' started by davbeck, Oct 20, 2008.

  1. davbeck macrumors regular

    Joined:
    May 16, 2008
    Location:
    Reno, NV
    #1
    I have a program, that runs perfectly fine on my Intel laptop and my G4 iMac. However when I take it over to an Intel iMac, it gives me the following error.

    Code:
    [Session started at 2008-10-20 09:41:15 -0700.]
    2008-10-20 09:41:15.893 CSV to SHP[300:10b] An uncaught exception was raised
    2008-10-20 09:41:15.894 CSV to SHP[300:10b] *** -[NSCFArray objectAtIndex:]: index (0) beyond bounds (0)
    2008-10-20 09:41:15.895 CSV to SHP[300:10b] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSCFArray objectAtIndex:]: index (0) beyond bounds (0)'
    2008-10-20 09:41:15.895 CSV to SHP[300:10b] Stack: (
        2473353547,
        2483985979,
        2473353003,
        2473353066,
        2458917823,
        2458383688,
        9888,
        2473412949,
        2501085898,
        2501045494,
        2501043800,
        2501042843,
        2501042649,
        2501041800
    )
    
    The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).
    this happens weather I use the same compiled executable or try to rebuild it.
     
  2. Aranince macrumors 65816

    Joined:
    Apr 18, 2007
    Location:
    California
    #2
    I don't know why its happening on one machine but not the others, but what the error means is that a variable has no value, or you're trying to access apart of an array that does not exist. Example, array[0] and array[1] exist, but you are trying access array[2].
     
  3. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #3
    Can you post some code? It looks like you're not checking your array bounds properly.
     
  4. Sayer macrumors 6502a

    Sayer

    Joined:
    Jan 4, 2002
    Location:
    Austin, TX
    #4
    Sounds like my job every day; it works on one Mac, but not another because it is/is not PPC, Intel, 10.5, 10.4 or 10.3.9.

    I actually had a bug that only happened on Intel Macs, not PPC, even if they had the same version OS X.

    Do all of the Macs have the same version of Mac OS X installed? Maybe the root cause is you are using a function that is not available or behaves differently on the one iMac than the other two macs.
     
  5. davbeck thread starter macrumors regular

    Joined:
    May 16, 2008
    Location:
    Reno, NV
    #5
    Thanks for the quick reply.
    The reason it was only working on my two computers, is because I have been testing on those, and there were some settings already input. the other computers didn't have those settings and, when trying to access them, crashed the program.

    Thanks, Aranince, for pointing out the cause of the error.
     

Share This Page