Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Application runs fine from the IDE but when run from the exe, the app crashes

  1. #11
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: Application runs fine from the IDE but when run from the exe, the app crashes

    Sometimes errors are subtle. Are you using absolute file names to locate the config file(s) or are you doing something trying to figure out the proper location from argv[0]?
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  2. #12
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Application runs fine from the IDE but when run from the exe, the app crashes

    Depends on what it will be running on.

    It still really sounds to me that something is causing the code to run out of bounds of an array. Do you have a test harness built so that you can vary inputs and test boundary conditions and such?

    What was your testing methodology? Did you "see if it works" or "try to break it"?

    Edit -- lisati caught something I missed and I had to read back through the thread. Depending on where and how to are catching exceptions, that error may be a red herring. Make sure you have the path right. If it is not running on ANY other machine, that may be it.
    Last edited by QIII; June 12th, 2013 at 04:19 AM.
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  3. #13
    Join Date
    Sep 2011
    Beans
    18

    Re: Application runs fine from the IDE but when run from the exe, the app crashes

    I have absolute file names but here is an interesting part..on some machines I have to have the complete filename with extension such as MyParameters.txt. The Window pops up from the exe. on other machines, I have had to cut out the extension .txt to have the exe pop up window, otherwise there is no response.

  4. #14
    Join Date
    Sep 2011
    Beans
    18

    Re: Application runs fine from the IDE but when run from the exe, the app crashes

    Apologies for a duplicate reply. My path is the folder I am running the exe from.

  5. #15
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Application runs fine from the IDE but when run from the exe, the app crashes

    So, is that behavior consistent between OSes?

    I.e.: On Ubuntu you have to have it one way and Fedora the other?


    (BTW: Are you checking for the existence of the file before you try to read from it and handling a "file not found" exception gracefully?)
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  6. #16
    Join Date
    Sep 2011
    Beans
    18

    Re: Application runs fine from the IDE but when run from the exe, the app crashes

    I have only used Ubuntu..that is the target OS.

  7. #17
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Application runs fine from the IDE but when run from the exe, the app crashes

    In general, C++ doesn't give a hoot about file extensions. It should be able to find foo as easily as bar.txt. Of course foo is not the same ast foo.txt.

    I don't believe I have ever run across something like this.
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •