View Issue Details

IDProjectCategoryView StatusLast Update
0028333Open CASCADEOCCT:DRAWpublic2017-09-29 16:24
ReportermsvAssigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.1.0 
Target Version7.2.0Fixed in Version7.2.0 
Summary0028333: Draw Harness - whatis command hangs when selection is activated with no opened view
DescriptionSome Draw commands allow selection of an object in the view by mouse click.
Example,
whatis .

This initiates wait of mouse click in a window of a view.
If no view is opened with a command "view ..." the user has no means to stop waiting, and Draw hangs forever.
It is needed to block waiting cycle and prevent hanging of Draw if no view is opened.
Steps To ReproduceNot needed.
TagsNo tags attached.
Test case numberNot needed

Activities

git

2017-01-09 10:11

administrator   ~0062405

Branch CR28333 has been created by msv.

SHA-1: 940f4604ba479c6c2ff4b8362cc5a3b0c691e3ca


Detailed log of new commits:

Author: msv
Date: Mon Jan 9 10:11:01 2017 +0300

    0028333: Draw hangs when selection is activated with no view is open
    
    The method Draw_Viewer::Select has been corrected so as not to enter the loop if no views are initialized.

git

2017-01-09 13:05

administrator   ~0062409

Branch CR28333 has been updated forcibly by msv.

SHA-1: 106ea342c27ebda4109662c4bf579689f58da724

msv

2017-01-09 13:07

developer   ~0062410

Dear Kirill, please review the fix.

kgv

2017-01-16 10:26

developer   ~0062605

Dear msv,

+#if defined(_WIN32) || defined(__WIN32__)
+        // check if the window exists; it can be closed without deleting
+        // corresponding Draw_View object
+        && IsWindow(myViews[i]->win)
+#endif

Could you please specify why this platform-specific check is needed here?
Is it required for the test case in the bug description or for some another one?

By the way, checking for __WIN32__ is redundant - _WIN32 is enough (__WIN32__ checks are removed step-by-step across OCCT).

git

2017-01-16 11:28

administrator   ~0062614

Branch CR28333 has been updated by msv.

SHA-1: e261c63212db5d01c2052a7eeb33858e30944cc8


Detailed log of new commits:

Author: msv
Date: Mon Jan 16 11:28:14 2017 +0300

    //Check for obsolete definition __win32__ has been removed.

msv

2017-01-16 11:35

developer   ~0062615

As I wrote in comments, this is a check for existence of window (alive handle of OS). Without this check, the following scenario leads to hanging:
1) Run draw.
2) Run axo command to open the view.
3) Close the view by clicking on the 'kill window' icon in the upper right corner.
4) Run the command 'whatis .'
=> app waits for user clicking in a view, but no view window exists.

I have removed __win32__ checks.

msv

2017-01-16 11:36

developer   ~0062616

BTW, I did not check this bug on Linux, may be it is needed also some processing on that platform.

kgv

2017-01-16 11:44

developer   ~0062617

> BTW, I did not check this bug on Linux, may be it is needed also some processing on that platform.
That was I actually worried about - will try to check issue on Linux.

git

2017-02-03 13:10

administrator   ~0063389

Branch CR28333 has been updated by kgv.

SHA-1: a797b0671df8884ea3532fd1f90b363eadc8aa6c


Detailed log of new commits:

Author: kgv
Date: Fri Feb 3 13:09:58 2017 +0300

    Added new method Draw_Window::IsMapped() for checked window state.
    Draw_Window using XLib now does not crash application on closing window.
    whatis command now checks window visibility.

git

2017-02-03 14:48

administrator   ~0063394

Branch CR28333 has been updated by kgv.

SHA-1: 0bd940464b4427fb6eef7c3eb4ce7f63b1bd506f


Detailed log of new commits:

Author: kgv
Date: Fri Feb 3 14:47:55 2017 +0300

    Drop IsWindow() check.

git

2017-02-03 14:53

administrator   ~0063396

Branch CR28333_1 has been created by kgv.

SHA-1: 586125f296ce05f07730ee6b3531993967c811e9


Detailed log of new commits:

Author: msv
Date: Mon Jan 9 10:11:01 2017 +0300

    0028333: Draw Harness - whatis command hangs when selection is activated with no opened view
    
    Added new method Draw_Window::IsMapped() for checked window state.
    Draw_Window using XLib now does not exit application on closing window.
    The method Draw_Viewer::Select() and whatis command has been corrected
    so as not to enter the loop if no views are initialized.

git

2017-02-03 14:53

administrator   ~0063397

Branch CR28333_1 has been updated forcibly by kgv.

SHA-1: 2a080cab840a46181b90d82ee8eaf869ba418a13

kgv

2017-02-03 14:54

developer   ~0063398

Patch is ready for testing.

git

2017-02-03 17:21

administrator   ~0063417

Branch CR28333_1 has been updated forcibly by kgv.

SHA-1: 6d4c8bacffedb16ef313d6ef64eb5701adaf31d8

git

2017-02-03 17:21

administrator   ~0063418

Branch CR28333_1 has been updated forcibly by apv.

SHA-1: 0c0f346b98db6b8f4739ed67cf5bd9791e216a47

apv

2017-02-03 17:22

tester   ~0063419

Branch CR28333_1 has been rebased on the current master

apv

2017-02-06 16:47

tester   ~0063465

Dear BugMaster,

Branch CR28333_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 0c0f346b98db6b8f4739ed67cf5bd9791e216a47

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1189

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 91382814 / 91289299 [+0.10%]
Total CPU difference: 19586.240000000224 / 19662.400000000325 [-0.39%]

Testing on Windows:
Total MEMORY difference: 57124410 / 57124391 [+0.00%]
Total CPU difference: 18246.95336689862 / 18512.045866198645 [-1.43%]

git

2017-03-20 14:35

administrator   ~0064505

Branch CR28333_1 has been deleted by inv.

SHA-1: 0c0f346b98db6b8f4739ed67cf5bd9791e216a47

git

2017-03-20 14:36

administrator   ~0064507

Branch CR28333 has been deleted by inv.

SHA-1: 0bd940464b4427fb6eef7c3eb4ce7f63b1bd506f

Related Changesets

occt: master 7c441da0

2017-01-09 07:11:01

msv


Committer: apn Details Diff
0028333: Draw Harness - whatis command hangs when selection is activated with no opened view

Added new method Draw_Window::IsMapped() for checked window state.
Draw_Window using XLib now does not exit application on closing window.
The method Draw_Viewer::Select() (called by whatis command)
has been corrected so as not to enter the loop if no views are initialized.
Affected Issues
0028333
mod - src/Draw/Draw_Viewer.cxx Diff File
mod - src/Draw/Draw_Window.cxx Diff File
mod - src/Draw/Draw_Window.hxx Diff File
mod - src/Draw/Draw_Window_1.mm Diff File

Issue History

Date Modified Username Field Change
2017-01-09 10:05 msv New Issue
2017-01-09 10:05 msv Assigned To => apn
2017-01-09 10:06 msv Assigned To apn => msv
2017-01-09 10:06 msv Status new => assigned
2017-01-09 10:11 git Note Added: 0062405
2017-01-09 13:05 git Note Added: 0062409
2017-01-09 13:07 msv Note Added: 0062410
2017-01-09 13:07 msv Assigned To msv => kgv
2017-01-09 13:07 msv Status assigned => resolved
2017-01-09 13:07 msv Steps to Reproduce Updated
2017-01-16 10:26 kgv Note Added: 0062605
2017-01-16 10:26 kgv Assigned To kgv => msv
2017-01-16 10:26 kgv Status resolved => feedback
2017-01-16 11:28 git Note Added: 0062614
2017-01-16 11:35 msv Note Added: 0062615
2017-01-16 11:35 msv Assigned To msv => kgv
2017-01-16 11:35 msv Status feedback => resolved
2017-01-16 11:36 msv Note Added: 0062616
2017-01-16 11:44 kgv Note Added: 0062617
2017-02-03 13:10 git Note Added: 0063389
2017-02-03 14:48 git Note Added: 0063394
2017-02-03 14:50 kgv Severity crash => minor
2017-02-03 14:50 kgv Summary Draw hangs when selection is activated with no view is open => Draw Harness - whatis command hangs when selection is activated with no opened view
2017-02-03 14:53 git Note Added: 0063396
2017-02-03 14:53 git Note Added: 0063397
2017-02-03 14:54 kgv Note Added: 0063398
2017-02-03 14:54 kgv Assigned To kgv => bugmaster
2017-02-03 14:54 kgv Status resolved => reviewed
2017-02-03 14:54 kgv Target Version 7.3.0 => 7.2.0
2017-02-03 15:19 apv Assigned To bugmaster => apv
2017-02-03 17:21 git Note Added: 0063417
2017-02-03 17:21 git Note Added: 0063418
2017-02-03 17:22 apv Note Added: 0063419
2017-02-03 17:23 apv Test case number => Not needed
2017-02-06 16:47 apv Note Added: 0063465
2017-02-06 16:47 apv Assigned To apv => bugmaster
2017-02-06 16:47 apv Status reviewed => tested
2017-02-10 14:33 apn Changeset attached => occt master 7c441da0
2017-02-10 14:33 apn Assigned To bugmaster => apn
2017-02-10 14:33 apn Status tested => verified
2017-02-10 14:33 apn Resolution open => fixed
2017-03-20 14:35 git Note Added: 0064505
2017-03-20 14:36 git Note Added: 0064507
2017-09-29 16:20 aiv Fixed in Version => 7.2.0
2017-09-29 16:24 aiv Status verified => closed