none
[UWP][C++] A SERIOUS BUG: all C++/AMP code crashes on W10 10240/10586 RRS feed

All replies

  • Hello,

    For this issue, I am trying to invoke someone experienced to help check it.

    Regards.


    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.

    Monday, November 30, 2015 8:55 AM
  • Noticed a similar issue has been filed as bug, but not sure if you are running into same issue. So please help to provide the following info for further troubleshooting. Thanks for your cooperation.

    Can you please share a repro project?

    Did you encounter the issue during debugging(F5)? Or also happens when run without debugger(ctrl+F5)?


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Thursday, December 3, 2015 2:56 AM
  • Noticed a similar issue has been filed as bug, but not sure if you are running into same issue. So please help to provide the following info for further troubleshooting. Thanks for your cooperation.

    Can you please share a repro project?

    Did you encounter the issue during debugging(F5)? Or also happens when run without debugger(ctrl+F5)?


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    1. Create a blank Win10 UWP App.

    2. Insert the following code anywhere.

    #include <amp.h>

    Concurrency::accelerator();

    3. F5 or Ctrl+F5.

    Thursday, December 3, 2015 11:48 AM
  • 1. Create a blank Win10 UWP App.

    2. Insert the following code anywhere.

    #include <amp.h>
    Concurrency::accelerator();

    3. Crash when debug (F5 or Ctrl+F5). vcamp140d.dll Access violation reading location 0xCDCDCDCD.

    Monday, December 7, 2015 10:01 AM
  • 1. Create a blank Win10 UWP App.
    2. Insert the following code anywhere.

    #include <amp.h>
    Concurrency::accelerator();

    1. Doesn't build for me. I get: error C2059: syntax error: ')'

    Changing it to be:

    #include <amp.h>
    Concurrency::accelerator;

    Compiles, but doesn't cause a problem when run under the debugger.
    I'm using VS2015 update 1.

    Dave

    Monday, December 7, 2015 3:03 PM
  • BTW, this code, Concurrency::accelerator(), just for reproduce this bug. Actually every C++ AMP features cannot be used. Concurrency::array, Concurrency::array_view, ......

    Monday, December 7, 2015 4:36 PM
  • I cannot reproduce the issue.

    Could you please make sure if you have the latest VS updated installed? That may help you to avoid some known issues and it's also an opportunity for you to repair the VS/SDK.

    If the issue persists after you apply the update, share a sample project onto online storage service like OneDrive to us will make sure we are on same page.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, December 9, 2015 11:54 PM
  • I cannot reproduce the issue.

    Could you please make sure if you have the latest VS updated installed? That may help you to avoid some known issues and it's also an opportunity for you to repair the VS/SDK.

    If the issue persists after you apply the update, share a sample project onto online storage service like OneDrive to us will make sure we are on same page.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    Alan Yao
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    I reinstall windows10 and vs2015, and new NVIDIA driver, and still have this problem.

    1. Clear new install Windows10 Pro 10.0.10586, no change any settings;

    2. Install NVIDIA driver 359.06-desktop-win10-64bit-international-whql.exe;

    3. Clear new install Visual Studio Community 2015 Update1 14.0.24720.0 D14REL, no change any settings;

    4. Create a blank UWP C++ App, select Debug X86;

    5. Insert the following code in MainPage.xaml.cpp;

    #include "pch.h"
    #include "MainPage.xaml.h"
    #include <amp.h>
    
    using namespace App1;
    
    using namespace Platform;
    using namespace Windows::Foundation;
    using namespace Windows::Foundation::Collections;
    using namespace Windows::UI::Xaml;
    using namespace Windows::UI::Xaml::Controls;
    using namespace Windows::UI::Xaml::Controls::Primitives;
    using namespace Windows::UI::Xaml::Data;
    using namespace Windows::UI::Xaml::Input;
    using namespace Windows::UI::Xaml::Media;
    using namespace Windows::UI::Xaml::Navigation;
    
    MainPage::MainPage()
    {
    	InitializeComponent();
    	Concurrency::accelerator();
    }

    6. Debug F5;

    7. Crash.

    Exception thrown at 0x61427553 (vcamp140d_app.dll) in App11.exe: 0xC0000005: Access violation reading location 0xCDCDCDCD.

    Exception thrown at 0x753DD8A8 in App1.exe: Microsoft C++ exception: _com_error at memory location 0x02B5DBC8.

    Thursday, December 10, 2015 10:31 PM
  • BTW, My PC has two graphics card, NVIDIA discrete graphics, support DirectX 11, Intel integrated graphics, only support DirectX 10. And, if I create a Windows8.1 C++ app (vcamp120) in the same computer and use the same code, no problem, it's worked, but in Windows10 UWP C++ app (vcamp140), app will crash.
    • Edited by [-] Friday, December 11, 2015 5:59 AM
    Friday, December 11, 2015 5:59 AM
  • Bug Report:

    https://connect.microsoft.com/VisualStudio/feedback/details/2090395

    Because of this bug, I cannot continue my project, please fix it quickly.

    Friday, December 11, 2015 9:18 AM
  • Hi,

    I see the same issue with the C++ code mentioned in the SO post. This is a lab of machines which all have Visual Studio Professional 2015 - Version 14.0.23107.0 D14REL. With a Release build, it runs fine; and the problem is basically the same for both x86 and x64.

    CTRL+F5

    ConsoleApplication1.exe has stopped working

    F5

    Unhandled exception at 0x0fc6c933 in ConsoleApplication1.exe: 0xC0000005: Access violation reading location 0xcdcdcdcd.

    explicit accelerator(const std::wstring &_Device_path) : _M_impl(NULL)
        {
            _Init(_Device_path.c_str());
        }

    Regards,

    Paul

    Monday, April 18, 2016 9:57 PM
  • I'm also seeing this with Visual Studio 2015 in Debug mode (both on Win7 x64 and Win10 x64).  Crashes exactly where PaulKe shows.  Switching to the Visual Studio 2013 toolset (and hence vcamp120d.dll) is a workaround for now, but this definitely should be fixed ASAP, since C++AMP development with the latest tools is impossible.
    #include <iostream> 
    #include <amp.h> 
    using namespace concurrency;
    int main()
    {
    	int v[11] = { 'G', 'd', 'k', 'k', 'n', 31, 'v', 'n', 'q', 'k', 'c' };
    
    	array_view<int> av(11, v);
    	parallel_for_each(av.extent, [=](index<1> idx) restrict(amp)
    	{
    		av[idx] += 1;
    	});
    
    	for (unsigned int i = 0; i < 11; i++)
    		std::cout << static_cast<char>(av[i]);
    }

    Monday, July 4, 2016 1:56 AM
  • We had the same issue (Application crashes with Windows 10).

    Do you have an

    concurrency::amp_uninitialize();

    call in your code?

    That did the trick for us.

    • Proposed as answer by clonedchocobo Thursday, September 27, 2018 2:22 AM
    Friday, September 16, 2016 2:24 PM
  • VS17 bug still exists  windows 1709 16299.371

    Sunday, April 22, 2018 8:34 AM