{"action":"created","issue":{"url":"https://api.github.com/repos/YosysHQ/nextpnr/issues/5","repository_url":"https://api.github.com/repos/YosysHQ/nextpnr","labels_url":"https://api.github.com/repos/YosysHQ/nextpnr/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/YosysHQ/nextpnr/issues/5/comments","events_url":"https://api.github.com/repos/YosysHQ/nextpnr/issues/5/events","html_url":"https://github.com/YosysHQ/nextpnr/issues/5","id":346659538,"node_id":"MDU6SXNzdWUzNDY2NTk1Mzg=","number":5,"title":"CTRL+C Exit Causes Display Driver Reset on Windows","user":{"login":"cr1901","id":6418027,"node_id":"MDQ6VXNlcjY0MTgwMjc=","avatar_url":"https://avatars3.githubusercontent.com/u/6418027?v=4","gravatar_id":"","url":"https://api.github.com/users/cr1901","html_url":"https://github.com/cr1901","followers_url":"https://api.github.com/users/cr1901/followers","following_url":"https://api.github.com/users/cr1901/following{/other_user}","gists_url":"https://api.github.com/users/cr1901/gists{/gist_id}","starred_url":"https://api.github.com/users/cr1901/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cr1901/subscriptions","organizations_url":"https://api.github.com/users/cr1901/orgs","repos_url":"https://api.github.com/users/cr1901/repos","events_url":"https://api.github.com/users/cr1901/events{/privacy}","received_events_url":"https://api.github.com/users/cr1901/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-01T15:51:42Z","updated_at":"2018-08-02T07:59:14Z","closed_at":null,"author_association":"NONE","body":"## Environment\r\n\r\nLenovo Thinkpad W520. _Optimus is Enabled._ I have a dual-monitor setup. Thanks to how the buses are laid out, Intel GFX _or_ NVIDIA can use the built-in first monitor, but only NVIDIA is capable of using an external second monitor.\r\n\r\n### Programs\r\n```\r\n$ g++ -v\r\nUsing built-in specs.\r\nCOLLECT_GCC=C:\\msys64\\mingw64\\bin\\g++.exe\r\nCOLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/lto-wrapper.exe\r\nTarget: x86_64-w64-mingw32\r\nConfigured with: ../gcc-7.3.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev2, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld\r\nThread model: posix\r\ngcc version 7.3.0 (Rev2, Built by MSYS2 project)\r\n\r\n$ nextpnr-ice40 -V\r\nnextpnr-ice40 -- Next Generation Place and Route (git sha1 2743d0f)\r\n```\r\n\r\n### NVIDIA Graphics\r\n[System Information](https://github.com/YosysHQ/nextpnr/files/2250262/NVIDIA.System.Information.08-01-2018.12-17-15.txt) \r\n\r\nNVIDIA claims system information is a text file, but it's really binary. So I uploaded an image as well:\r\n![image](https://user-images.githubusercontent.com/6418027/43534664-f333b186-9585-11e8-868f-8cc5a50241e1.png)\r\n\r\n\r\n### Intel Graphics\r\n```\r\nIntel(R) HD Graphics 3000\r\n\r\n\r\n\r\n\r\nReport Date:\t\t\t8/1/2018\r\nReport Time[hh:mm:ss]:\t\t12:18:51\r\nDriver Version:\t\t\t9.17.10.3347\r\nOperating System:\t\tMicrosoft Windows 7 Professional (6.1.7601)\r\nDefault Language:\t\tEnglish (United States)\r\nDirectX* Version:\t\t11.0\r\nPhysical Memory:\t\t8075 MB\r\nProcessor:\t\t\tIntel(R) Core(TM) i7-2720QM CPU @ 2.20GHz\r\nProcessor Speed:\t\t2192 MHz\r\nVendor ID:\t\t\t8086\r\nDevice ID:\t\t\t0126\r\nDevice Revision:\t\t09\r\n\r\n\r\n\r\n\r\n*   Processor Graphics Information   *\r\n\r\n\r\nProcessor Graphics in Use:\t\tIntel(R) HD Graphics 3000\r\nVideo BIOS:\t\t\t2089.1\r\nCurrent Graphics Mode:\t\t1600 by 900\r\n\r\n\r\n\r\n\r\n*   Devices Connected to the Graphics Accelerator   *\r\n\r\n\r\nActive Notebook Displays: 1\r\n\t*\tBuilt-in Display\t*\r\n\r\n\r\nMonitor Name:\t\t\tThinkPad Display 1600x900\r\nDisplay Type:\t\t\tDigital\r\nGamma Value:\t\t\t2.2\r\nDDC2 Protocol:\t\t\tSupported\r\n\r\n\r\nMaximum Image Size:\r\nHorizontal:\t\t\t13.39 inches\r\nVertical:\t\t\t07.48 inches\r\n\r\n\r\nMonitor Supported Modes:\r\n1600 by 900 (50 Hz)\r\n1600 by 900 (60 Hz)\r\n\r\n\r\n\r\nDisplay Power Management Support:\r\nStandby Mode:\t\t\tSupported\r\nSuspend Mode:\t\t\tSupported\r\nActive Off Mode:\t\tSupported\r\n\r\n\r\nRaw EDID:\r\n00 FF FF FF FF FF FF 00 30 AE B1 40 00 00 00 00 \r\n00 14 01 03 80 22 13 78 EA C8 95 9E 57 54 92 26 \r\n0F 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 \r\n01 01 01 01 01 01 9F 25 40 7E 60 84 1E 30 30 20 \r\n25 00 58 C2 10 00 00 19 7F 1F 40 86 60 84 1E 30 \r\n30 20 25 00 58 C2 10 00 00 19 00 00 00 0F 00 A9 \r\n09 32 A9 09 32 16 09 00 4C A3 4B 54 00 00 00 FE \r\n00 4C 54 4E 31 35 36 4B 54 30 32 34 30 31 00 8B \r\n\r\n\r\n* Other names and brands are the property of their respective owners. *\r\n```\r\n\r\n\r\n## Steps to Duplicate\r\n1. Run `nextpnr-ice40 --gui` from MSYS2/MinGW64 `bash`. \r\n2. _Drag and move the window slightly while keeping it on the second monitor._ This is the _most consistent_ way to reproduce the reset. See Other Information.\r\n2. Send CTRL+C to `bash`\r\n\r\n## Expected Behavior\r\nCTRL+C exit would exit cleanly just like when closing the window manually by clicking \"X\". (Note: _Clicking the \"X\" works fine_.)\r\n\r\n## Actual Behavior\r\n![image](https://user-images.githubusercontent.com/6418027/43533504-f15aa8ae-9582-11e8-9522-d016681ee163.png)\r\n\r\nUnfortunately, I was unable to get a backtrace from this...\r\n\r\n## Other Information\r\nIt is slightly inconsistent when I am able to get a driver reset:\r\n* Not dragging the window on the second monitor before sending CTRL+C seems to result in a clean exit. _At least, I don't remember triggering any crashes during testing._\r\n* Rarely, I will get a driver reset if I CTRL+C while `nextpnr` is on my first monitor. I'm unsure how to consistently duplicate this.\r\n* If I _do not_ get a driver reset if I CTRL+C while `nextpnr` is on my first monitor, the next invocation of `nextpnr` where I drag the window and then CTRL+C while `nextpnr` is on the second monitor will _not_ cause a driver reset. This is weird for me, considering NVIDIA GFX card must be using the second monitor on the Thinkpad W520."},"comment":{"url":"https://api.github.com/repos/YosysHQ/nextpnr/issues/comments/409840859","html_url":"https://github.com/YosysHQ/nextpnr/issues/5#issuecomment-409840859","issue_url":"https://api.github.com/repos/YosysHQ/nextpnr/issues/5","id":409840859,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTg0MDg1OQ==","user":{"login":"mmicko","id":3623496,"node_id":"MDQ6VXNlcjM2MjM0OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/3623496?v=4","gravatar_id":"","url":"https://api.github.com/users/mmicko","html_url":"https://github.com/mmicko","followers_url":"https://api.github.com/users/mmicko/followers","following_url":"https://api.github.com/users/mmicko/following{/other_user}","gists_url":"https://api.github.com/users/mmicko/gists{/gist_id}","starred_url":"https://api.github.com/users/mmicko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmicko/subscriptions","organizations_url":"https://api.github.com/users/mmicko/orgs","repos_url":"https://api.github.com/users/mmicko/repos","events_url":"https://api.github.com/users/mmicko/events{/privacy}","received_events_url":"https://api.github.com/users/mmicko/received_events","type":"User","site_admin":false},"created_at":"2018-08-02T07:59:14Z","updated_at":"2018-08-02T07:59:14Z","author_association":"COLLABORATOR","body":"Now there is a proper handling of Ctrl-C for windows. Managed to get it crash (not OpenGL related crash on my side) in debug MSVC build on each CTRL-C. With handler now it sends proper application close.\r\nPlease check if https://github.com/YosysHQ/nextpnr/pull/13 helps in your case as well"}}
{"actor":{"display_login":"mmicko"}}