Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MFC app only works on one system... I need ideas...

MFC app only works on one system... I need ideas...

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestiondiscussionannouncement
21 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C charlieg

    I have an app that has worked for YEARS. Flawlessly. It does a lot of file processing. On my laptop, it fails to open certain files. I catch the exception, and the reason is 0 (no error). My laptop - W7 Pro. My laptop Xp Pro VM: fail. On the "golden" laptop, it works fine. Xp Pro. Assorted other machines - fail. I copied the source from the golden machine, built it, FAIL. Copied the binary off the golden machine to mine: FAIL. ----- The only wildcard I can think of is that some update has broken something, but that is surely digging deep. ------ Any wild ass ideas or random thoughts?

    Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #3

    charlieg wrote:

    fail

    doesn't mean anything except to you that can see the system, code and the error messages.

    Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

    C 1 Reply Last reply
    0
    • C charlieg

      I have an app that has worked for YEARS. Flawlessly. It does a lot of file processing. On my laptop, it fails to open certain files. I catch the exception, and the reason is 0 (no error). My laptop - W7 Pro. My laptop Xp Pro VM: fail. On the "golden" laptop, it works fine. Xp Pro. Assorted other machines - fail. I copied the source from the golden machine, built it, FAIL. Copied the binary off the golden machine to mine: FAIL. ----- The only wildcard I can think of is that some update has broken something, but that is surely digging deep. ------ Any wild ass ideas or random thoughts?

      Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #4

      are those files in restricted areas? does your account have access to them?

      image processing toolkits | batch image processing

      C 1 Reply Last reply
      0
      • L Lost User

        charlieg wrote:

        Any wild ass ideas or random thoughts?

        Yes, something is going wrong somewhere. You really need to do some debugging and provide some more specific technical information for anyone to be able offer any suggestions.

        One of these days I'm going to think of a really clever signature.

        C Offline
        C Offline
        charlieg
        wrote on last edited by
        #5

        Understood.

        Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

        1 Reply Last reply
        0
        • C charlieg

          I have an app that has worked for YEARS. Flawlessly. It does a lot of file processing. On my laptop, it fails to open certain files. I catch the exception, and the reason is 0 (no error). My laptop - W7 Pro. My laptop Xp Pro VM: fail. On the "golden" laptop, it works fine. Xp Pro. Assorted other machines - fail. I copied the source from the golden machine, built it, FAIL. Copied the binary off the golden machine to mine: FAIL. ----- The only wildcard I can think of is that some update has broken something, but that is surely digging deep. ------ Any wild ass ideas or random thoughts?

          Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

          C Offline
          C Offline
          charlieg
          wrote on last edited by
          #6

          File access is the first thing I checked. The app uses CFile, and I catch the exception when the open fails - the error code is a 0 (no problems). An article I read suggested that MFC was doing something deep down inside and resetting the error code before the exception processing (also within mfc) could grab it. So, I stepped through mfc, caught the file open failure - status is 0. It's just not making any sense. As far as providing more information, that's the hard part - I'm not getting anything back from the OS (W7 or Xp). Since the application used to work flawlessly, I'm wondering if some Windows update nuked something. But I have a hard time going there. Has anyone had that happen to them - an update killing an application?

          Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

          enhzflepE Richard Andrew x64R 2 Replies Last reply
          0
          • L Lost User

            charlieg wrote:

            fail

            doesn't mean anything except to you that can see the system, code and the error messages.

            Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

            C Offline
            C Offline
            charlieg
            wrote on last edited by
            #7

            Wes - sorry, the context of the "fail" is simply opening a new file. The open fails, but no error data is returned.

            Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

            L 1 Reply Last reply
            0
            • C charlieg

              File access is the first thing I checked. The app uses CFile, and I catch the exception when the open fails - the error code is a 0 (no problems). An article I read suggested that MFC was doing something deep down inside and resetting the error code before the exception processing (also within mfc) could grab it. So, I stepped through mfc, caught the file open failure - status is 0. It's just not making any sense. As far as providing more information, that's the hard part - I'm not getting anything back from the OS (W7 or Xp). Since the application used to work flawlessly, I'm wondering if some Windows update nuked something. But I have a hard time going there. Has anyone had that happen to them - an update killing an application?

              Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

              enhzflepE Offline
              enhzflepE Offline
              enhzflep
              wrote on last edited by
              #8

              charlieg wrote:

              Has anyone had that happen to them - an update killing an application?

              Yes! MS update nuked the synaptics touchpad driver for the missus' netbook. Was working just fine. Went to sleep, woke up to discover an update had been applied and the machine had been reset to complete installation. After that, the touchpad was non-responsive. (win XP) Hmm, must fix that - thanks for the reminder.

              C 1 Reply Last reply
              0
              • C charlieg

                Wes - sorry, the context of the "fail" is simply opening a new file. The open fails, but no error data is returned.

                Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #9

                Does GetLastError return anything?

                Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                C 1 Reply Last reply
                0
                • L Lost User

                  Does GetLastError return anything?

                  Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012

                  C Offline
                  C Offline
                  charlieg
                  wrote on last edited by
                  #10

                  Yep. 0 (or no problem). Real bizarre.

                  Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                  1 Reply Last reply
                  0
                  • C Chris Losinger

                    are those files in restricted areas? does your account have access to them?

                    image processing toolkits | batch image processing

                    C Offline
                    C Offline
                    charlieg
                    wrote on last edited by
                    #11

                    The files are in an area that I'll call the release area - the same place they have been for 5+ years. It's a specific folder in our development tree on my C drive.

                    Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                    1 Reply Last reply
                    0
                    • enhzflepE enhzflep

                      charlieg wrote:

                      Has anyone had that happen to them - an update killing an application?

                      Yes! MS update nuked the synaptics touchpad driver for the missus' netbook. Was working just fine. Went to sleep, woke up to discover an update had been applied and the machine had been reset to complete installation. After that, the touchpad was non-responsive. (win XP) Hmm, must fix that - thanks for the reminder.

                      C Offline
                      C Offline
                      charlieg
                      wrote on last edited by
                      #12

                      lol, glad I could help :)

                      Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                      1 Reply Last reply
                      0
                      • C charlieg

                        File access is the first thing I checked. The app uses CFile, and I catch the exception when the open fails - the error code is a 0 (no problems). An article I read suggested that MFC was doing something deep down inside and resetting the error code before the exception processing (also within mfc) could grab it. So, I stepped through mfc, caught the file open failure - status is 0. It's just not making any sense. As far as providing more information, that's the hard part - I'm not getting anything back from the OS (W7 or Xp). Since the application used to work flawlessly, I'm wondering if some Windows update nuked something. But I have a hard time going there. Has anyone had that happen to them - an update killing an application?

                        Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                        Richard Andrew x64R Online
                        Richard Andrew x64R Online
                        Richard Andrew x64
                        wrote on last edited by
                        #13

                        Is the program trying to create a new file, or open an existing file? Did you try running the program "as administrator?"

                        The difficult we do right away... ...the impossible takes slightly longer.

                        C 1 Reply Last reply
                        0
                        • Richard Andrew x64R Richard Andrew x64

                          Is the program trying to create a new file, or open an existing file? Did you try running the program "as administrator?"

                          The difficult we do right away... ...the impossible takes slightly longer.

                          C Offline
                          C Offline
                          charlieg
                          wrote on last edited by
                          #14

                          Open a new file. And I am god on my laptop, so I don't think it's that. But, I've always used the properties option on the fileview to override the base settings. Made sure I was running as admin, run it in Xp mode, etc. No joy, same error. The weird thing, again, is that the source code has not changed in over two years. A few weeks back, the app just came off the rails and started having these issues.

                          Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                          Richard Andrew x64R 2 Replies Last reply
                          0
                          • C charlieg

                            Open a new file. And I am god on my laptop, so I don't think it's that. But, I've always used the properties option on the fileview to override the base settings. Made sure I was running as admin, run it in Xp mode, etc. No joy, same error. The weird thing, again, is that the source code has not changed in over two years. A few weeks back, the app just came off the rails and started having these issues.

                            Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                            Richard Andrew x64R Online
                            Richard Andrew x64R Online
                            Richard Andrew x64
                            wrote on last edited by
                            #15

                            charlieg wrote:

                            A few weeks back, the app just came off the rails and started having these issues.

                            What's not clear is whether you have been running it on Win 7 for a long time before the issue appeared, or if the issue has always existed on Win 7.

                            The difficult we do right away... ...the impossible takes slightly longer.

                            C 1 Reply Last reply
                            0
                            • C charlieg

                              Open a new file. And I am god on my laptop, so I don't think it's that. But, I've always used the properties option on the fileview to override the base settings. Made sure I was running as admin, run it in Xp mode, etc. No joy, same error. The weird thing, again, is that the source code has not changed in over two years. A few weeks back, the app just came off the rails and started having these issues.

                              Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                              Richard Andrew x64R Online
                              Richard Andrew x64R Online
                              Richard Andrew x64
                              wrote on last edited by
                              #16

                              Does the issue appear only when trying to create the file in your special location, or in any location? Have you tried creating a new file in the same location by other means, such as with Windows Explorer, or any other application? Why not write a small test program in MFC that does nothing but try to open a file in that location?

                              The difficult we do right away... ...the impossible takes slightly longer.

                              C 1 Reply Last reply
                              0
                              • C charlieg

                                I have an app that has worked for YEARS. Flawlessly. It does a lot of file processing. On my laptop, it fails to open certain files. I catch the exception, and the reason is 0 (no error). My laptop - W7 Pro. My laptop Xp Pro VM: fail. On the "golden" laptop, it works fine. Xp Pro. Assorted other machines - fail. I copied the source from the golden machine, built it, FAIL. Copied the binary off the golden machine to mine: FAIL. ----- The only wildcard I can think of is that some update has broken something, but that is surely digging deep. ------ Any wild ass ideas or random thoughts?

                                Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                                C Offline
                                C Offline
                                Chuck OToole
                                wrote on last edited by
                                #17

                                After reading all the replies to this, the one thing that's clear is that you've never told anyone exactly where you are creating the file. All we know is that it's someplace on your C drive. Well, newer versions of windows (beyone XP) place restrictions on where you can create files on the system disk ( C: ) so we'll keep going in circles until you provide details beyond "fail" and "hidden place" and other obscure bits of information.

                                1 Reply Last reply
                                0
                                • Richard Andrew x64R Richard Andrew x64

                                  charlieg wrote:

                                  A few weeks back, the app just came off the rails and started having these issues.

                                  What's not clear is whether you have been running it on Win 7 for a long time before the issue appeared, or if the issue has always existed on Win 7.

                                  The difficult we do right away... ...the impossible takes slightly longer.

                                  C Offline
                                  C Offline
                                  charlieg
                                  wrote on last edited by
                                  #18

                                  Origin of this program has been Xp Pro. Up until a few weeks ago, it ran fine on W7; however, we pretty much use it on xp. When it started misbehaving on Xp, we tried it on W7, and on multiple machines of various OS flavors - same basic error. Good point.

                                  Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                                  1 Reply Last reply
                                  0
                                  • Richard Andrew x64R Richard Andrew x64

                                    Does the issue appear only when trying to create the file in your special location, or in any location? Have you tried creating a new file in the same location by other means, such as with Windows Explorer, or any other application? Why not write a small test program in MFC that does nothing but try to open a file in that location?

                                    The difficult we do right away... ...the impossible takes slightly longer.

                                    C Offline
                                    C Offline
                                    charlieg
                                    wrote on last edited by
                                    #19

                                    Well, I can craft up a small mfc app to do the same basic thing - that's a good idea, and it may show the problem, I'll give it a shot. Doing so will exercise the same basic code flow as the base application. As far as other tools, yes, we work in this basic area on a day to day basis.

                                    Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                                    1 Reply Last reply
                                    0
                                    • C charlieg

                                      I have an app that has worked for YEARS. Flawlessly. It does a lot of file processing. On my laptop, it fails to open certain files. I catch the exception, and the reason is 0 (no error). My laptop - W7 Pro. My laptop Xp Pro VM: fail. On the "golden" laptop, it works fine. Xp Pro. Assorted other machines - fail. I copied the source from the golden machine, built it, FAIL. Copied the binary off the golden machine to mine: FAIL. ----- The only wildcard I can think of is that some update has broken something, but that is surely digging deep. ------ Any wild ass ideas or random thoughts?

                                      Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                                      C Offline
                                      C Offline
                                      charlieg
                                      wrote on last edited by
                                      #20

                                      Per Chuck's comments, let me elaborate on the directory structure of where this app works. He has a point, given the W7 restrictions on random file locations. The application in question works with a specific directory tree which we will call our release tree. The basic structure: c:\release folder A folder B etc. It does not matter to the application where the release folder's root is. I could put it anywhere. Normally it lives on the C drive at the basic level, as it has for some time. Note even though the application runs both in W7 and Xp, I'm mainly worried about Xp. We've never had any issues with permissions, so don't let W7 distract you. The application allows the user to specify the root folder, so he selects C:\release. When the app runs, it's crunching files in the c:\release tree. Sometimes, it needs to create working files - in c:\release. Sometimes it can, and sometimes it cannot... it is very random. It I go to that folder, I can create files to my heart's content, so I don't think it is a permissions issue. What else am I being ambiguous about.?

                                      Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                                      1 Reply Last reply
                                      0
                                      • C charlieg

                                        I have an app that has worked for YEARS. Flawlessly. It does a lot of file processing. On my laptop, it fails to open certain files. I catch the exception, and the reason is 0 (no error). My laptop - W7 Pro. My laptop Xp Pro VM: fail. On the "golden" laptop, it works fine. Xp Pro. Assorted other machines - fail. I copied the source from the golden machine, built it, FAIL. Copied the binary off the golden machine to mine: FAIL. ----- The only wildcard I can think of is that some update has broken something, but that is surely digging deep. ------ Any wild ass ideas or random thoughts?

                                        Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759

                                        D Offline
                                        D Offline
                                        David Crow
                                        wrote on last edited by
                                        #21

                                        I would attempt to create a separate application that does nothing but open the file in question. Build upon that until the problem re-appears.

                                        "One man's wage rise is another man's price increase." - Harold Wilson

                                        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                                        "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                                        1 Reply Last reply
                                        0
                                        Reply
                                        • Reply as topic
                                        Log in to reply
                                        • Oldest to Newest
                                        • Newest to Oldest
                                        • Most Votes


                                        • Login

                                        • Don't have an account? Register

                                        • Login or register to search.
                                        • First post
                                          Last post
                                        0
                                        • Categories
                                        • Recent
                                        • Tags
                                        • Popular
                                        • World
                                        • Users
                                        • Groups