{"action":"opened","issue":{"url":"https://api.github.com/repos/mshabunin/test2/issues/626","labels_url":"https://api.github.com/repos/mshabunin/test2/issues/626/labels{/name}","comments_url":"https://api.github.com/repos/mshabunin/test2/issues/626/comments","events_url":"https://api.github.com/repos/mshabunin/test2/issues/626/events","html_url":"https://github.com/mshabunin/test2/issues/626","id":95201277,"number":626,"title":"Segmentation Fault in cv::minMaxLoc with NaN matrix","user":{"login":"mshabunin","id":3304494,"avatar_url":"https://avatars.githubusercontent.com/u/3304494?v=3","gravatar_id":"","url":"https://api.github.com/users/mshabunin","html_url":"https://github.com/mshabunin","followers_url":"https://api.github.com/users/mshabunin/followers","following_url":"https://api.github.com/users/mshabunin/following{/other_user}","gists_url":"https://api.github.com/users/mshabunin/gists{/gist_id}","starred_url":"https://api.github.com/users/mshabunin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshabunin/subscriptions","organizations_url":"https://api.github.com/users/mshabunin/orgs","repos_url":"https://api.github.com/users/mshabunin/repos","events_url":"https://api.github.com/users/mshabunin/events{/privacy}","received_events_url":"https://api.github.com/users/mshabunin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mshabunin/test2/labels/affected:%20master","name":"affected: master","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/auto-transferred","name":"auto-transferred","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/category:%20core","name":"category: core","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/priority:%20normal","name":"priority: normal","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/status:%20new","name":"status: new","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/target:%20-","name":"target: -","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-15T14:01:53Z","updated_at":"2015-07-15T14:01:53Z","closed_at":null,"body":"Converted from http://code.opencv.org/issues/4251\r\n```\n|| by Oliver Lomp on 2015-03-25 04:41\n|| Status: New\n|| Priority: Normal\n|| Affected: branch 'master' (3.0-dev)\n|| Target: -\n|| Category: core\n|| Tracker: bug\n```\n\nSegmentation Fault in cv::minMaxLoc with NaN matrix\n-----------\n```\nUsing cv::minMaxLoc with matrices containing NaNs seems to lead to a\ncrash.\n\nI'm using the opencv 3.0 beta, the following code leads to a\nsegmentation fault:\n\n      cv::Mat one_mat(2, 2, CV_32F, cv::Scalar(1));\n      cv::minMaxLoc(one_mat, NULL, NULL, NULL, NULL);\n      // the following is printed to cout successfully\n      std::cout << \"passed normal minMaxLoc\" << std::endl;\n\n      cv::Mat nan_mat(2, 2, CV_32F, cv::Scalar(NAN));\n      // the following crashes\n      cv::minMaxLoc(nan_mat, NULL, NULL, NULL, NULL);\n      std::cout << \"passed NaN minMaxLoc\" << std::endl;\n\nStack trace from gdb:  \n\n    #0  0x00007fffeed817ea in icv_y8_ownMinMaxIndx_32f_C1R_U8_2 ()\n       from /.../opencv-3.0.0-beta/build/lib/libopencv_core.so.3.0\n    #1  0x0000000000803fa0 in ?? ()\n    #2  0x0000000000000008 in ?? ()\n    #3  0x0000000000000002 in ?? ()\n    #4  0x0000000000000002 in ?? ()\n    #5  0x00007fffffffdaa4 in ?? ()\n    #6  0x00007fffffffdaa0 in ?? ()\n    #7  0x00007fffffffdc30 in ?? ()\n    #8  0x00007fffffffdc20 in ?? ()\n    #9  0x00007fffffffdc10 in ?? ()\n    #10 0x0000000000803fa0 in ?? ()\n    #11 0x00007fffffffda94 in ?? ()\n    #12 0x0000000000000002 in ?? ()\n    #13 0x00007fffeed8386e in icv_y8_ownMinMaxIndx_32f_C1R_2 ()\n       from /.../opencv-3.0.0-beta/build/lib/libopencv_core.so.3.0\n    #14 0x00007fffeec2d1f7 in icv_y8_ippiMinMaxIndx_32f_C1R ()\n       from /.../opencv-3.0.0-beta/build/lib/libopencv_core.so.3.0\n    #15 0x00007fffee7941a9 in cv::minMaxIdx(cv::_InputArray const&, double*, double*, int*, int*, cv::_InputArray const&) ()\n       from /.../opencv-3.0.0-beta/build/lib/libopencv_core.so.3.0\n    #16 0x00007fffee7945e8 in cv::minMaxLoc(cv::_InputArray const&, double*, double*, cv::Point_<int>*, cv::Point_<int>*, cv::_InputArray const&) ()\n       from /.../opencv-3.0.0-beta/build/lib/libopencv_core.so.3.0\n    #17 0x0000000000401ace in main ()\n        at /.../mini_tests/opencv3-minmaxlocnancrash/test/main.cpp:11\n\nSince I'm guessing this may be related to the specific processor, here's\none of the processors listed in /proc/cpuinfo:  \n\n    processor    : 0\n    vendor_id    : GenuineIntel\n    cpu family    : 6\n    model        : 42\n    model name    : Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz\n    stepping    : 7\n    microcode    : 0x14\n    cpu MHz        : 1600.000\n    cache size    : 8192 KB\n    physical id    : 0\n    siblings    : 8\n    core id        : 0\n    cpu cores    : 4\n    apicid        : 0\n    initial apicid    : 0\n    fpu        : yes\n    fpu_exception    : yes\n    cpuid level    : 13\n    wp        : yes\n    flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid\n    bogomips    : 6784.31\n    clflush size    : 64\n    cache_alignment    : 64\n    address sizes    : 36 bits physical, 48 bits virtual\n    power management:\n\nI'll gladly provide more info as needed :)\n```\n\nHistory\n-------\n##### by Vadim Pisarevsky on 2015-04-27 11:23\n```\n-   Category set to core\n```\n##### by Vadim Pisarevsky on 2015-04-28 11:08\n```\n-   Assignee set to Vadim Pisarevsky\n```"}}