unkwon exception throwing

Discussion in 'C++' started by Philipp Kraus, May 3, 2011.

  1. Hello,

    I have written a numerical algorithm for optimizing and on large input
    data size an exception with "program fault" is thrown, but I don't have
    written this exception, so I would like to understand, how can I solve
    the error(s). What's the meaning of this exception (max stack / heap
    size is reached)? I know the method, which is throw the exception, but
    I don't know why the exception is created

    Thanks a lot

    Phil
     
    Philipp Kraus, May 3, 2011
    #1
    1. Advertising

  2. Philipp Kraus

    gwowen Guest

    On May 3, 11:40 am, Philipp Kraus <> wrote:
    > Hello,
    >
    > I have written a numerical algorithm for optimizing and on large input
    > data size an exception with "program fault" is thrown, but I don't have
    > written this exception, so I would like to understand, how can I solve


    Without any information on your platform, and compiler (at the very
    least) no-one will be able to help, I'm afraid.
     
    gwowen, May 3, 2011
    #2
    1. Advertising

  3. On 2011-05-03 14:08:59 +0200, gwowen said:

    > On May 3, 11:40 am, Philipp Kraus <> wrote:
    >> Hello,
    >>
    >> I have written a numerical algorithm for optimizing and on large input
    >> data size an exception with "program fault" is thrown, but I don't have
    >> written this exception, so I would like to understand, how can I solve

    >
    > Without any information on your platform, and compiler (at the very
    > least) no-one will be able to help, I'm afraid.


    Compiler is g++ under OSX 10.5 & 10.6
     
    Philipp Kraus, May 3, 2011
    #3
  4. Philipp Kraus

    Fred Zwarts Guest

    "Philipp Kraus" <> wrote in message
    news:ipom39$juf$...
    > Hello,
    >
    > I have written a numerical algorithm for optimizing and on large input
    > data size an exception with "program fault" is thrown, but I don't have
    > written this exception, so I would like to understand, how can I solve the
    > error(s). What's the meaning of this exception (max stack / heap size is
    > reached)? I know the method, which is throw the exception, but I don't
    > know why the exception is created


    What exactly do you mean with an 'exception with "program fault"'?
    Is it an exception of type string with value "program fault" that is thrown?
    Probably, no one, except the author of this exception, knows what it means.

    If you know the method in which the exception is thrown
    and you can show us the code, maybe someone does understand
    under which conditions the exception is thrown.
     
    Fred Zwarts, May 3, 2011
    #4
  5. On 2011-05-03 14:41:19 +0200, Fred Zwarts said:

    >
    > "Philipp Kraus" <> wrote in message
    > news:ipom39$juf$...
    >> Hello,
    >>
    >> I have written a numerical algorithm for optimizing and on large input
    >> data size an exception with "program fault" is thrown, but I don't have
    >> > written this exception, so I would like to understand, how can I

    >> solve the > error(s). What's the meaning of this exception (max stack /
    >> heap size is > reached)? I know the method, which is throw the
    >> exception, but I don't know why the exception is created

    >
    > What exactly do you mean with an 'exception with "program fault"'?
    > Is it an exception of type string with value "program fault" that is thrown?
    > Probably, no one, except the author of this exception, knows what it means.
    >
    > If you know the method in which the exception is thrown
    > and you can show us the code, maybe someone does understand
    > under which conditions the exception is thrown.


    I've found the exception, it comes from an external component (but it
    was not documentated)
     
    Philipp Kraus, May 3, 2011
    #5
  6. Philipp Kraus

    Öö Tiib Guest

    On May 3, 3:27 pm, Philipp Kraus <> wrote:
    > On 2011-05-03 14:08:59 +0200, gwowen said:
    >
    > > On May 3, 11:40 am, Philipp Kraus <> wrote:
    > >> Hello,

    >
    > >> I have written a numerical algorithm for optimizing and on large input
    > >> data size an exception with "program fault" is thrown, but I don't have
    > >> written this exception, so I would like to understand, how can I solve


    Try to describe your problem exactly and write down the messages
    letter-by-letter since
    1) you are software developer not aunt Annie and
    2) most of us can not read minds.

    > > Without any information on your platform, and compiler (at the very
    > > least) no-one will be able to help, I'm afraid.

    >
    > Compiler is g++ under OSX 10.5 & 10.6


    You tried it on two Macs? This is about 99.9% not OSX or compiler
    problem but defect in your source code.

    It feels that your running software is trying to tell you that it
    throws unhandled exceptions and so it has to close. The message (that
    you fail to reproduce here) likely tells that it is program's (as
    opposed to its user's) fault that it closes.

    You have to debug your program (run it in debugger or use post-mortem
    debugger) to see what exception and from where has been actually
    thrown. Otherwise we can't help.
     
    Öö Tiib, May 3, 2011
    #6
  7. Philipp Kraus <> wrote:
    > Compiler is g++ under OSX 10.5 & 10.6


    Compile the program with the -g compiler option and then run the
    program with gdb (iow. "gdb ./yourprogram" and then "run"), and if/when
    it crashes it should show the line where it does. (If the line is
    nondescriptive eg. because it's in some system library, write "bt"
    to get a backtrace. The first line in the backtrace which is in your
    own code is usually a good indicative.)
     
    Juha Nieminen, May 3, 2011
    #7
  8. Philipp Kraus

    James Kanze Guest

    On May 3, 3:29 pm, Juha Nieminen <> wrote:
    > Philipp Kraus <> wrote:
    > > Compiler is g++ under OSX 10.5 & 10.6


    > Compile the program with the -g compiler option and then run the
    > program with gdb (iow. "gdb ./yourprogram" and then "run"), and if/when
    > it crashes it should show the line where it does. (If the line is
    > nondescriptive eg. because it's in some system library, write "bt"
    > to get a backtrace. The first line in the backtrace which is in your
    > own code is usually a good indicative.)


    Except when it's not:). Corrupting the free space arena is a
    frequent cause of such problems, and of course, the "crash"
    occurs in an allocation totally unrelated to where the error
    was.

    (Such problems are really fun to debug:). To top it off, the
    last time I had to attack one, 1) I'd just entered a new
    company, and had never seen the half a million lines of code
    before I was asked to debug it, and 2) the actual problem was
    due to the compiler generating wrong code in a tight loop. Both
    very exceptional cases, which multiply the difficulty by several
    orders of magnitude. On the other hand, without such difficult
    problems, I'd be hard pressed to justify how much I'm paid, so I
    won't complain too much.)

    --
    James Kanze
     
    James Kanze, May 3, 2011
    #8
  9. James Kanze <> wrote:
    > Except when it's not:). Corrupting the free space arena is a
    > frequent cause of such problems, and of course, the "crash"
    > occurs in an allocation totally unrelated to where the error
    > was.


    valgrind is a good tool to find such problems. I don't know if it's
    available for Mac, though.
     
    Juha Nieminen, May 4, 2011
    #9
  10. Philipp Kraus

    Marc Guest

    Juha Nieminen wrote:

    > valgrind is a good tool to find such problems. I don't know if it's
    > available for Mac, though.


    It is, but the port isn't as mature as the linux one.
     
    Marc, May 4, 2011
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. KJ
    Replies:
    5
    Views:
    384
    John Saunders
    Jul 25, 2003
  2. VincentWong
    Replies:
    1
    Views:
    569
    VincentWong
    Dec 29, 2003
  3. =?Utf-8?B?VGVycnk=?=
    Replies:
    4
    Views:
    6,023
    =?Utf-8?B?VGVycnk=?=
    Jan 13, 2005
  4. =?Utf-8?B?R2xlbm4gVmVuemtl?=

    System.IO.Directoryinfo throwing exception

    =?Utf-8?B?R2xlbm4gVmVuemtl?=, Jul 25, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,716
    John Timney \(ASP.NET MVP\)
    Jul 25, 2005
  5. =?Utf-8?B?RXVzdGljZSBTY3J1YmI=?=

    Insert.aspx throwing exception

    =?Utf-8?B?RXVzdGljZSBTY3J1YmI=?=, Sep 23, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    581
    =?Utf-8?B?RXVzdGljZSBTY3J1YmI=?=
    Sep 23, 2005
Loading...

Share This Page