Can not scroll
Moderator: Joel Billings
Can not scroll
Sometimes scroll with mouse wheel stops working, as a result it is impossible to change zoom on map with it any more so i have to use "+" or "-"
But most importantly - i can not scroll reserve TBs.
So i have to save and load a game.
Its pretty annoying.
I have no steps to reproduce, unfortunately.
But most importantly - i can not scroll reserve TBs.
So i have to save and load a game.
Its pretty annoying.
I have no steps to reproduce, unfortunately.
Re: Can not scroll
The keyboard arrow keys always work, temp work around until you fix your mouse.

Beta Tester for: War in the East 1 & 2, WarPlan & WarPlan Pacific, Valor & Victory, Flashpoint Campaigns: Sudden Storm, Computer War In Europe 2
SPWW2 & SPMBT scenario creator
Tester for WDS games
Re: Can not scroll
I have had this problem (wheel map zoom in/out) since release.
Changing the mouse does not fix the problem. tried several. This problem does not happen with WITW and WITE.
It is as though there is a memory leak and cannot "buffer" the change
Any thoughts............
Changing the mouse does not fix the problem. tried several. This problem does not happen with WITW and WITE.
It is as though there is a memory leak and cannot "buffer" the change
Any thoughts............
Re: Can not scroll
It is not my mouse. When i save & load game - it works again for some time.Zovs wrote: Sat Apr 09, 2022 12:18 pm The keyboard arrow keys always work, temp work around until you fix your mouse.
With arrow keys i can not scroll TBs.
Re: Can not scroll
We definitely have the same problem.
Shame no one has suggested a proper fix or acknowledged the problem .
Shame no one has suggested a proper fix or acknowledged the problem .
Re: Can not scroll
Again this bug, I can not scroll in other TBs, but far east works ok...
Re: Can not scroll
I don't think this is a bug (if it was its fixed in beta 26).
I can click on any Axis TB and use the arrow keys or the mouse to scroll. With no issues.
Will check the Soviets tomorrow.
I can click on any Axis TB and use the arrow keys or the mouse to scroll. With no issues.
Will check the Soviets tomorrow.

Beta Tester for: War in the East 1 & 2, WarPlan & WarPlan Pacific, Valor & Victory, Flashpoint Campaigns: Sudden Storm, Computer War In Europe 2
SPWW2 & SPMBT scenario creator
Tester for WDS games
- Joel Billings
- Posts: 33775
- Joined: Wed Sep 20, 2000 8:00 am
- Location: Santa Rosa, CA
- Contact:
Re: Can not scroll
If you are over a TB that has a scroll bar activated, then the mouse wheel will move the scroll bar. If you are over the map or a TB without a scroll bar active, then the mouse wheel zooms in/out (in this case I have to use the + and - keys to zoom in/out). This part is all WAD. Is it not working that way for you?
All understanding comes after the fact.
-- Soren Kierkegaard
-- Soren Kierkegaard
Re: Can not scroll
yep, sometimes, when there is a scrollbar active in a TBs it is not possible to scroll down or up with a mouse wheel
save and load helps or sometimes problem is gone by itself
as i wrote, i have no steps to reproduce
but it happens pretty often
save and load helps or sometimes problem is gone by itself
as i wrote, i have no steps to reproduce
but it happens pretty often
-
DarkHorse2
- Posts: 1070
- Joined: Fri Feb 04, 2022 12:08 pm
Re: Can not scroll
I have had some issues involving right-mouse clicking failing to bring up pop-up menus used in air-transport missions.tiger111 wrote: Sat Apr 09, 2022 4:51 pm I have had this problem (wheel map zoom in/out) since release.
Changing the mouse does not fix the problem. tried several. This problem does not happen with WITW and WITE.
It is as though there is a memory leak and cannot "buffer" the change
Any thoughts............
Once they start failing, they no longer work from that point on.
Only work-around I have found is to do a quick save and reload.
At that point, they start working again.
I have long suspected a memory leak or Windows user object resource leak in WiTE2.
User objects are described in the following table, with the associated "creator" and "destroyer" functions:
https://docs.microsoft.com/en-us/window ... er-objects
It just feels like there is not a one-for-one correspondence between these two sets of functions, resulting in a leak.
- Joel Billings
- Posts: 33775
- Joined: Wed Sep 20, 2000 8:00 am
- Location: Santa Rosa, CA
- Contact:
Re: Can not scroll
Have you tried to press the Esc key when the interface stops working as expected? I've noticed the Esc has some recovery features in the Wit... series games.
All understanding comes after the fact.
-- Soren Kierkegaard
-- Soren Kierkegaard
-
DarkHorse2
- Posts: 1070
- Joined: Fri Feb 04, 2022 12:08 pm
Re: Can not scroll
When this happens on my end, I've tried everything, to include 'esc' key.
There is a development tool I have used from System Internals, "Process Explorer", that has a setting you can configure that allows you to display the number of "gdi objects" and "user objects" a process currently has allocated.
Next time it happens, I will get a current listing and screen shot of it. At least try to identify if this is the case or not.
There is a development tool I have used from System Internals, "Process Explorer", that has a setting you can configure that allows you to display the number of "gdi objects" and "user objects" a process currently has allocated.
Next time it happens, I will get a current listing and screen shot of it. At least try to identify if this is the case or not.
-
DarkHorse2
- Posts: 1070
- Joined: Fri Feb 04, 2022 12:08 pm
Re: Can not scroll
There is a definite leak.
It is like the popup menu is not getting destroyed.
I did an xfer of 3 ac, before air transfer WiTE2 had 54 User Objects allocated.
WiTE2 has 57 User Object allocated now.
There is a Windows function "CreatePopupMenu" used to create a popup menu, usually in response to a right-mouse-click.
After the menu item is selected, there should be a call to destroy it, specifically "DestroyMenu".
I seriously suspect it is not getting called.
The OS will allow you to continue creating these User Objects until you reach a limit. At that point, it just doesn't create them anymore and thus no more Popup Menus.
----
You can also enable this display in Windows TaskManager, it is just now more hidden than what it used to be.
Select the "Details" tab, then right-click in the listview column header bar. Then "Select Columns" and that should bring up a Dialog Box that allows you to select all the columns available. Scroll down/up until you find "User Objects" and "GDI Objects". Once you select those, you will now see them for each process under the Windows TaskManager Details Tab.
----
Also suspect you are not checking the returned HMENU from CreatePopupMenu. If it fails, it should return a NULL.
Played around some more, xferred 6 more AC, upto 62 User Objects.
I may have tool somewhere that allows me to interrogate a running process for current list of User Objects.
It is like the popup menu is not getting destroyed.
I did an xfer of 3 ac, before air transfer WiTE2 had 54 User Objects allocated.
WiTE2 has 57 User Object allocated now.
There is a Windows function "CreatePopupMenu" used to create a popup menu, usually in response to a right-mouse-click.
After the menu item is selected, there should be a call to destroy it, specifically "DestroyMenu".
I seriously suspect it is not getting called.
The OS will allow you to continue creating these User Objects until you reach a limit. At that point, it just doesn't create them anymore and thus no more Popup Menus.
----
You can also enable this display in Windows TaskManager, it is just now more hidden than what it used to be.
Select the "Details" tab, then right-click in the listview column header bar. Then "Select Columns" and that should bring up a Dialog Box that allows you to select all the columns available. Scroll down/up until you find "User Objects" and "GDI Objects". Once you select those, you will now see them for each process under the Windows TaskManager Details Tab.
----
Also suspect you are not checking the returned HMENU from CreatePopupMenu. If it fails, it should return a NULL.
----Type: HMENU
If the function succeeds, the return value is a handle to the newly created menu.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Played around some more, xferred 6 more AC, upto 62 User Objects.
I may have tool somewhere that allows me to interrogate a running process for current list of User Objects.
- Joel Billings
- Posts: 33775
- Joined: Wed Sep 20, 2000 8:00 am
- Location: Santa Rosa, CA
- Contact:
Re: Can not scroll
I asked Pavel to look at your post and he replied that we aren't using Createpopupmenu.
All understanding comes after the fact.
-- Soren Kierkegaard
-- Soren Kierkegaard
-
DarkHorse2
- Posts: 1070
- Joined: Fri Feb 04, 2022 12:08 pm
Re: Can not scroll
Are you sure? Because it looks like somebody is calling it.
I am not 100% sure this is where the resource leak is, because I don't have access to the source code.
But I do know there is one. It could be any one of:
I am not able to tell exactly which user objects are not getting cleaned up. But this should be easy enough to track from within the source code.
I can tell:
- your source code is native C++. Most likely using Visual Studio as your IDE.
- using the Visual C++ CRT.
- using STL - standard template library.
- using lambdas, a modern C++ language feature.
- using the CAMThread class from the DirectShow API - most likely the WxUtil.h implementation.
- That would explain the dependency on the quartz.dll (direct show runtime library)
- using XMLLite (i typically use that one as well)
- using the Parallel Patterns Library (PPL) (can't speak to this as I have never used myself, typically using what was provided via the STL concurrency library)
- PPL appears to be a Microsoft extension to STL? interesting... Parallel Patterns Library
EDIT:
- _Ref_count_obj? Let me guess, someone went crazy with smart pointers? If using these for object lifetime management, you may never find a resource leak. I feel for you....
I am not 100% sure this is where the resource leak is, because I don't have access to the source code.
But I do know there is one. It could be any one of:
- Accelerator Table
- Caret
- Cursor
- DDE Conversion
- Hook
- Icon
- Menu
- Window
- Window Position
I am not able to tell exactly which user objects are not getting cleaned up. But this should be easy enough to track from within the source code.
I can tell:
- your source code is native C++. Most likely using Visual Studio as your IDE.
- using the Visual C++ CRT.
- using STL - standard template library.
- using lambdas, a modern C++ language feature.
- using the CAMThread class from the DirectShow API - most likely the WxUtil.h implementation.
- That would explain the dependency on the quartz.dll (direct show runtime library)
- using XMLLite (i typically use that one as well)
- using the Parallel Patterns Library (PPL) (can't speak to this as I have never used myself, typically using what was provided via the STL concurrency library)
- PPL appears to be a Microsoft extension to STL? interesting... Parallel Patterns Library
EDIT:
- _Ref_count_obj? Let me guess, someone went crazy with smart pointers? If using these for object lifetime management, you may never find a resource leak. I feel for you....
Last edited by DarkHorse2 on Wed Apr 27, 2022 6:15 pm, edited 2 times in total.
Re: Can not scroll
Looks like someone made a really deep dive into a problem.
Thanks for your investigation DarkHorse2!
Thanks for your investigation DarkHorse2!
Re: Can not scroll
ESC does not helpJoel Billings wrote: Tue Apr 26, 2022 8:20 pm Have you tried to press the Esc key when the interface stops working as expected? I've noticed the Esc has some recovery features in the Wit... series games.
the funny thing is that Far East is still working fine, while zoom on a map is working very bad and other TBs are not scrollable at all
Re: Can not scroll
Got the latest beta and still cannot scroll the map after 1 turn - no odd windows selected. esc doesn`t help. If i save and reload then I can scroll fine for only 1 turn
- Joel Billings
- Posts: 33775
- Joined: Wed Sep 20, 2000 8:00 am
- Location: Santa Rosa, CA
- Contact:
Re: Can not scroll
Are you talking about scrolling around the map, or zooming in using the mouse wheel, or scrolling the TB boxes? There are several different things mentioned in the thread.
All understanding comes after the fact.
-- Soren Kierkegaard
-- Soren Kierkegaard
Re: Can not scroll
initially when you just open a game - everything works fine
then if scroll in TBs fails to work properly
it means that zoom on map with mouse wheel will also fail to work normally, it will still work but instead of responding to each mouse wheel move, it will make 1 zoom in or out in few mouse wheel moves
navigation (left, right, top, bottom) always works
as well as +- to change zoom on a map
at least for me
same in last few game versions
then if scroll in TBs fails to work properly
it means that zoom on map with mouse wheel will also fail to work normally, it will still work but instead of responding to each mouse wheel move, it will make 1 zoom in or out in few mouse wheel moves
navigation (left, right, top, bottom) always works
as well as +- to change zoom on a map
at least for me
same in last few game versions

