locked
Program runs on Win 7 but not 8.1 RRS feed

  • Question

  • I've raised this issue twice in the last 2 - 3 weeks without a solution. I'm developing a desktop application using VS 2013, MFC & native C/C++. I can build a simple skeleton program with just the xxxApp, MainFrame and ChildView that runs just fine on W7 & 8.1.  This is an X86 application using the Static MFC library. 

    But when I build the application, it will not run on W 8.1 though it runs just fine on W7. I've run Code Analysis and fixed all reported problems.  The application will not even start on W 8.1. 

    I need help or guidance.

    Bobn


    Bob Nichols

    Wednesday, February 4, 2015 5:21 AM

All replies

  • Hi Bob,

    Can you please check the windows event log under "Application" node and see if you have an error event logged for your app?

    Please let us know the details of the same. You may also get pointers on how to resolve if you get an error in the event log.

    (Please mark as answer if this resolves your query. Please upvote if this post is helpful.)

    Regards,

    Rajesh

    Wednesday, February 4, 2015 6:56 AM
  • I've raised this issue twice in the last 2 - 3 weeks without a solution. I'm developing a desktop application using VS 2013, MFC & native C/C++. I can build a simple skeleton program with just the xxxApp, MainFrame and ChildView that runs just fine on W7 & 8.1.  This is an X86 application using the Static MFC library. 

    But when I build the application, it will not run on W 8.1 though it runs just fine on W7. I've run Code Analysis and fixed all reported problems.  The application will not even start on W 8.1. 

    I need help or guidance.

    Bobn


    Bob Nichols

    You didn't answer if you have Visual C++ Redistributable Packages for Visual Studio 2013 installed in that W8.1. computer. It's easy to try by installing.

    Is there some security option enabled on W8.1 which prevents execution of the app?


    • Edited by jiiteepee Wednesday, February 4, 2015 8:23 AM
    Wednesday, February 4, 2015 8:22 AM
  • When you said application didn't even get started ,what does that mean what kind of application you have how did you creatred it . Are you getting any error. Same time you can use dependency walker to see if it's one of dll dependencies issue.

    Thanks


    Rupesh Shukla

    Wednesday, February 4, 2015 3:15 PM
  • Rajesh - I see some Error entries in the Windows Logs -> Application that seem related to my attempts to run my application but nothing specific or helpful.

    Thanks for your help.

    Bob N


    Bob Nichols

    Wednesday, February 4, 2015 7:04 PM
  • Rupesh - I believe the problem description explains how the application was built and the type of program. 

    There is no error message.  What is "dependency walker"?

    Thanks,

    Bob N

     

    Bob Nichols

    Wednesday, February 4, 2015 7:16 PM
  • I have installed the Visual C++ Redistributable Packages for VS 2013.  This did not help.  I don't know what security option might apply.  I was able to successfully test a similar program built with VS 2012 on this W 8.1 PC but the same program built with VS2013 will not run.  I can not figure out the difference in the build setup.


    Bob Nichols

    Wednesday, February 4, 2015 10:54 PM
  • I've downloaded and run Dependency Walker which reported errors that I do not understand.  I've some lines from the report below.  Do you have an email address that I can send it to?

    Thanks for your help.

    Bob N

    From USER32.DLL

    [ ? ] API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL

    [ ? ] API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL

    [D? ] API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL


    Bob Nichols

    Thursday, February 5, 2015 1:10 AM
  • If the W8.1 is 64-bit (and your software is 32-bit) then did you install both x86/x64 versions of Visual C++ Redistributable Packages for VS 2013 ?

    Regarding those errors listed above - http://stackoverflow.com/questions/24335787/c-cli-dll-fails-under-win-8-1/24335968#24335968


    • Edited by jiiteepee Thursday, February 5, 2015 7:46 PM clarification
    Thursday, February 5, 2015 6:58 AM
  • If it is a SDI/MDI application, run the application from VS IDE, keep some break points in lines of InitInstance() function and see until where it goes. (This function looks like this: BOOL YouApp::InitInstance())

    Also you can try to start your program by just pressing F10(step over) and see where it stops.

    Also you can include AfxMessageBox() between lines of code in the InitInstance() or lines of code in a suspected function which could cause problem and check the code before the message which did not show up.

    Using debugging commands in VS:

    Debugging in Visual Studio


    Thanks & Regards

    Thursday, February 5, 2015 12:33 PM
  • jiiteepee - I reviewed the comments in 'stackoverflow.com.  It has been my experience over many years until now that code developed on one OS would always work on OS+1.  I'm almost ready to go back to VC 6 which other apps that I've developed work on Win 8.1

    To answer your question, I did install both version of the VS2013 Redistributable Packages.

    Thanks for your help.

    Bob Nichols


    Bob Nichols

    Friday, February 6, 2015 12:58 AM
  • Except for the AfxMessageBox suggestion, this means that I would have to install VS2013 on my Surface Pro 2 (not at all appealing) or procure a new PC w Win 8.1.

    Thanks for your help.

    Bob Nichols


    Bob Nichols

    Friday, February 6, 2015 1:00 AM
  • Except for the AfxMessageBox suggestion, this means that I would have to install VS2013 on my Surface Pro 2 (not at all appealing) or procure a new PC w Win 8.1.

    Thanks for your help.

    Bob Nichols


    Bob Nichols

    May not be necessary to buy new hardware, also try if you could get the problematic part of code by commenting out the function or block of code one by one and see after commenting which block the application launches. Then you can analyze why that part of code fails.


    Thanks & Regards

    Friday, February 6, 2015 7:24 AM
  • I suggest you build your application using the /MT compiler switch, and try again.
    Friday, February 6, 2015 10:02 PM
  • Brian - That is how I've built this application from the start.

    Thanks.

    Bob N


    Bob Nichols

    Friday, February 6, 2015 10:35 PM
  • I highly suggest creating a virtual machine to re-compile you MFC application in windows 8.1 OS.

    The reason please see this thread:

    http://stackoverflow.com/questions/9305552/use-mfc-in-static-library


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 17, 2015 2:59 AM
  • Shu Hu, I don't think the thread reference you submitted is going to help Bob. Yes, there may be a security vulnerability down the road, but this doesn't solve Bob's current dilemma.

    Bob, in broad terms what does your application actually do? Are there any third party DLL's involved? What system resources does it use (e.g. sockets, database, files, etc.).

    I'm still suspicious that in spite of the /MT switch there is still some kind of DLL dependency that doesn't exist on the target machine.

    Tuesday, February 17, 2015 3:48 AM
  • I've downloaded and run Dependency Walker which reported errors that I do not understand.  I've some lines from the report below.  Do you have an email address that I can send it to?

    Thanks for your help.

    Bob N

    From USER32.DLL

    [ ? ] API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL

    [ ? ] API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL

    [D? ] API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL


    Bob Nichols

    Couple of additional point make sure that you are running dependency walker on Window 8 machine not on the window 7 .Second is there anyway you can share the log here so everyone can see it. In last putting a message Box is not going to help anyway in case your app is not running at all . And to run an app on a device you don't have to install entire VS on the machine just install your exe and satisfy your exe requirement.

    Thanks


    Rupesh Shukla

    Tuesday, February 17, 2015 5:46 AM
  • Rupesh - I may have found the bug but have not had time to fix and check.  It will be a few more days but will share what I've found.

    Thank you for following up.

    Bob Nichols

     

    Bob Nichols

    Tuesday, February 17, 2015 4:44 PM
  • Shu Hu - At this stage of development, there is no 3rd party code involved.  Just an MFC application with CMainFrame, ChildView, multiple CWnds & bit maps.

     I may have found the bug but have not had time to fix and check.  It will be a few more days but will share what I've found.

    Thank you for following up.

    Bob Nichols


    Bob Nichols

    Tuesday, February 17, 2015 4:47 PM
  • This problem is still not solved. 

    When running on WIN 7 under VS2013 debugger, I see an Access Violation Error "First-chance exception at 0x00C11638 in BmateSatCMMS.exe: 0xC0000005: Access violation reading location 0xBAADF079" I CMainFrame when (if (!m_wndView.Create ... os executed.  When running on WIN 8.2, only the Windows Explored flashes when starting the program.

    Bob Nichols


    Bob Nichols

    Thursday, February 26, 2015 4:07 AM
  • This problem is still not solved. 

    When running on WIN 7 under VS2013 debugger, I see an Access Violation Error "First-chance exception at 0x00C11638 in BmateSatCMMS.exe: 0xC0000005: Access violation reading location 0xBAADF079" I CMainFrame when (if (!m_wndView.Create ... os executed.  When running on WIN 8.2, only the Windows Explored flashes when starting the program.

    Bob Nichols


    Bob Nichols

    How about if you add some crash dump code in your app to know the exact reason of your issue and then use some dump utility for example windlg etc to analyze it.

    Thanks


    Rupesh Shukla

    Monday, March 2, 2015 4:54 PM
  • This problem is still not solved. 

    When running on WIN 7 under VS2013 debugger, I see an Access Violation Error "First-chance exception at 0x00C11638 in BmateSatCMMS.exe: 0xC0000005: Access violation reading location 0xBAADF079" I CMainFrame when (if (!m_wndView.Create ... os executed.  When running on WIN 8.2, only the Windows Explored flashes when starting the program.


    Your program has a bug. This is typically due to some type of memory corruption. Until you eradicate it, there is no point trying to migrate it to newer Windows. Most likely, if you fix the bug, it will run correctly on Windows 8.1.
    Monday, March 2, 2015 9:12 PM
  • What's your VS 2013 solution .Net Framework version(the .Net framework version that you use to build your solution in Visual Studio)? maybe you have installed that .Net Framework version, that your application need in Windows 7 and not in Windows 8.

    Check your .Net Framework versions...

    Best regards.

    Monday, March 2, 2015 10:01 PM
  • Brian - This application does not run under NET.  The problem has just been solved.  Thanks anyway.  Bob Nichols


    Bob Nichols

    Tuesday, March 3, 2015 12:39 AM
  • Brian - This application does not run under NET.  The problem has just been solved.  Thanks anyway.  Bob Nichols


    Bob Nichols

    It would be nice if you posted the solution since this is a thread with a question and others searching for an answer may want to know what the problem was.

    And maybe even advise what you mean by "This application does not run under Net". Is it machine language? I'm not certain a program written in visual studio can not run under Net meaning .Net unless perhaps it is a phone application for Android IOS possibly.


    La vida loca

    Tuesday, March 3, 2015 12:48 AM