QuickChat/PopMenus Crash (Memory Leak)
We need more information. There is a sticky at the top of these boards explaining how to post a CoHHelper and Hijackthis report. That will help.
Also, I forget what the "popmenu"stuff is, but it would not surprise me if something is hogging memory and causing a crash.
I have odd crashes nobody has been able to explain as well: http://boards.cityofheroes.com/showt...68#post4225368
I have the "pophelp" stuff disabled because it is annoying, if that is what you mean. But, the window where those little exclamation points show up will sit over my other Ui elements on first login and when it wants to show me something even if the window is disabled and invisible, or at least it used to.
It's one of those systems that I wish they would just delete from the game because it doesn't help people nearly enough and all too late for when they really should learn it(like they need a manual to read before playing, or the wiki).
It's like they were trying to make the game less of a "trial by fire"but failed because the game is such a mess that it would need an encyclopedia(or wiki) worth of info right at the login screen, rather than the few popups that state the obvious that can be figured out by looking at whatever prompted the help popup.
Edit for clarification:
The pophelp thing is for the people who miss the obvious, but those people need a LOT more help than a little popup, which they probably will have trouble figuring out as well, can give.
There is a leak in the way Popmenus are displayed in such that when a menu is opened, the memory usage rises. But when the menu is close, the memory is not released. If the same menu is opened a second time, the memory rises again.
|
If the ram could be released after a menu is shown, then we could have very large popmenus. Even leaving alone, given enough menus opened, the client will eventually run out of ram.
|
I have a popmenu with the following stats:
1,432,325 Lines 189,087 Submenus 440,937 Options 385,163 Locked Options 49 Megs |
Pop Menus =/= Pop Help. He's talking about menus like the quick chat menu. Though they might also be contributing.
Triumph: White Succubus: 50 Ill/Emp/PF Snow Globe: 50 Ice/FF/Ice Strobe: 50 PB Shi Otomi: 50 Ninja/Ninjistu/GW Stalker My other characters
Why the heck do you have a 49 meg popfile!!!??? Yea, that could be a problem.
Father Xmas - Level 50 Ice/Ice Tanker - Victory
$725 and $1350 parts lists --- My guide to computer components
Tempus unum hominem manet
Why the heck do you have a 49 meg popfile!!!??? Yea, that could be a problem.
|
To test for yourself, if you are capable of macroing a keyboard (outside of CoX), create a macro to open QuickChat, then close it (Escape key closes) and have it repeatedly open and close the QuickChat file (I had my test running several minutes) and you will see the memory slowly rise each time it opens.
The size of the popmenu file is irrelevant to the problem happening, it just speeds up the process.
Why not have a 49 meg popfile? If I can code a file correctly to give me whatever info I want in game, so that I don't have to alt tab out of game just to look something up, then I should. But the bug is not related to the size of the popmenu file. It happens with the provided popmenu's as well. In the original post I commented that it happened with 10 meg files as well. It also happens with much smaller files, and even with the QuickChat file. Granted the smaller the file, the longer the bug will take to crash the client, but regardless it still happens.
To test for yourself, if you are capable of macroing a keyboard (outside of CoX), create a macro to open QuickChat, then close it (Escape key closes) and have it repeatedly open and close the QuickChat file (I had my test running several minutes) and you will see the memory slowly rise each time it opens. The size of the popmenu file is irrelevant to the problem happening, it just speeds up the process. |
If you happen to know, can you tell us how much memory is used use each time a small (<1K) popmenu is opened?
Your tests show that it only takes two openings of your 40 meg popmenu to crash and five times with a 10 meg popmenu. Hope you can understand that why I leaped to the idea that size may be the problem in this case.
Father Xmas - Level 50 Ice/Ice Tanker - Victory
$725 and $1350 parts lists --- My guide to computer components
Tempus unum hominem manet
The smallest menu I have currently is QuickChat (not sure the size as I don't have it extracted, but it is by far the simplest. It uses about 20k? when opened in rapid succession.
I have retested on my home computer (Windows 7 32 bit) using 4 custom menus. These menus have been uploaded to: http://www.mediafire.com/?1y745mkd1af75
I closed all power trays, maps, contact window, and any extra windows I had opened, including chats. Loaded into a minimal base (4 porters, storage items, minimal power/control items, and 0 decorative items) stood in a med room and looked at the wall.
The results of the tests (clicking on menu, looking at Task Manager and noting the Memory usage of CityOfHeroes.exe in notepad, Hitting [ESC] to close menu and then repeating):
Menu: QuickChat.mnu (unknown size but pretty small)
used about 20 k when opened in rapid succession
Menu: SGBadgesByCatagory.mnu (371 kb)
1,062,936
1,063,368
1,063,680
1,064,124
1,064,372
1,065,096
1,065,316
1,065,852
1,066,260
Menu: BadgesByCatagory (3,692 kb)
1,006,348
1,012,384
1,018,576
1,024,792
1,030,548
1,042,996
1,048,972
1,055,524
1,059,572
1,056,248
1,059,688
Menu: ZoneMaps.mnu (10,899 kb)
1,058,424
1,064,404
1,073,684
1,090,152
1,117,472
1,143,408
1,169,260
Menu: ContactsByName.mnu (40,810 kb)
1,169,260
1,244,564
1,321,212
1,398,212
1,551,516
1,628,516
1,705,060
True. However popmenus like other "features" accessible via insertion into the DATA folder is completely unsupported. Maybe it has stability issues related to size or number of nested levels. The only place I can think of where the devs may use it is the emotes popup button next to the chat bar (please enlighten me if it's officially used somewhere else in the game, I'm curious).
I've seen code in real life that works fine on a specific set of expected data only to malfunction when it's fed data that should work but exceeded some internal limitation due to it's design. I'm also would not be surprised by memory leaks. IIRC the game is written in C where memory cleanup for all execution paths is very much dependent on the individual developer as well as manual methods for manipulating data structures such as link lists were a bug could "lose" parts of the list forever into the allocated memory pool.
Do I think it's a problem they can track down if they look into it, sure. Do I think memory leaks caused by user generated popmenues will ever appear on a coders todo list, sadly doubtful. It's my impression that the number of client programmers are rather small when compared to the rest of the staff and after 8+ years parts of the code can be quite the nightmare to work on without accidentally breaking something else so they pick their battles wisely.
Father Xmas - Level 50 Ice/Ice Tanker - Victory
$725 and $1350 parts lists --- My guide to computer components
Tempus unum hominem manet
True. However popmenus like other "features" accessible via insertion into the DATA folder is completely unsupported. Maybe it has stability issues related to size or number of nested levels. The only place I can think of where the devs may use it is the emotes popup button next to the chat bar (please enlighten me if it's officially used somewhere else in the game, I'm curious).
|
Other versions that are the same format (and easily reproduced fully)
The Main Menu (When clicking Menu)
Any clicking of names (chat windows)
The main difference between a /popmenu for the names, is that it uses variables to know who to send the tell to. It may also be of some sort of dynamic window that is created and thrown away on each click.
Those are the main uses of it that I can think of off the top of my head. I'm sure there are other smaller uses that exist
Do I think memory leaks caused by user generated popmenues will ever appear on a coders todo list, sadly doubtful. It's my impression that the number of client programmers are rather small when compared to the rest of the staff and after 8+ years parts of the code can be quite the nightmare to work on without accidentally breaking something else so they pick their battles wisely. |
I would prefer it if they would focus on more important fixes/QoL improvements (Base items for one)
Try opening your graphics options tab in an area with somewhat high graphics load sometime. The FPS will be cut almost in half.
Also,don't flick any slider, tested this with window opacity, back and forth a few times. It makes your netgraph go crazy, super laggy.
Those got added to the bug list.
Try opening your graphics options tab in an area with somewhat high graphics load sometime. The FPS will be cut almost in half.
Also,don't flick any slider, tested this with window opacity, back and forth a few times. It makes your netgraph go crazy, super laggy. Those got added to the bug list. |
Good attempt, but I 'believe' what the OP is looking to find here isn't a settings issue. They're looking at how things are coded and where the system is/isn't letting go of memory. As far as I understand it though, Windows has a nasty habit of not letting ram go at all until the app is fully shutdown. So if these windows are being treated as part of City's main program, then they'll likely never release the memory until you logout.
|
It was just showing how much more, probably worse(considering the huge popfile is much more uncommon, and not causing an issue in most cases, than the 2 scenarios I gave), bugs the UI has.
It doesn't surprise me that the OP discovered this crash bug because the support people did not even know about the "graphics tab FPS slicing in half" and "options sliders causing severe latency"(which actually accelerate the netgraph's tracking of latency, meaning it move from right to left a LOT faster) bugs until I discovered them.
Most people don't see these strange, but very worrying, bugs because they do not have the same circumstances as those of us who do.
Also, I'm not a hacker(old school meaning), but I do feel a sense of pride in finding out where a system fails, at least if they are willing to fix it.
I do understand that the larger menu causes it to crash quicker because it uses a larger amount of ram. My point was though that the root problem is not the size of the menu in use, but more the fact the ram is not released once the menu is closed.
|
Generally the popmenu system was intended to work with fairly small files so may have been optimised to that end.
Remember this is a mechanism that was intended to be used by the game's developers and was made available to the playerbase as unsupported. As such if it is used outside its intended scope then there may be problems - it is the responsibility of the person developing the menu to test it as opposed to the game's development team.
Different languages use different techniches for garbage collection.
C generally its the programmers responsibilty,
Java usually its left to the system to handle it
Both of those are included in the job specs on NCSoft's vacancies.
If you have a system designed to handle garbage collection automatically which expects small increments of memory usage of a few k and you through some 50Mb jumps at it when its close to but still below the clean up threshold you could put it straight to a crash position without allowing the system to clean up first.
It could also be that any pointers or data structures are not of a sufficiently large type to handle such a large file because they were never intended to do so.
Mind of Gaia lvl 50 Defiant's first Mind/Storm 'troller.
Deadly Doc 50 Dark/Dark Corr
and lots more on Pinnacle,Union and Defiant
There is a leak in the way Popmenus are displayed in such that when a menu is opened, the memory usage rises. But when the menu is close, the memory is not released. If the same menu is opened a second time, the memory rises again.
Test environment:
64 bit Windows 7 with 3 gig ram
Graphics set to minimum, sitting in Cimerora with no PC's/NPC's on screen except myself
Test1:
1 very large popmenu file (40 megs+)
Memory usage on login: 1,755,364 k
After opening and then closing popmenu: 1,859,468 k
Tried to open 2nd time: CoX crashed once 1,904,316 k ram was hit
Test2:
a Not as Large Popmenu (10 megs+)
Memory usage on login: 1,754,268 k
Menu open 1 time: 1,779,816 k
Menu open 2 times: 1,805,480 k
Menu open 3 times: 1,831,920 k
Menu open 4 times: 1,857,872 k
About to open menu 5th time and crashes with:
Read failed for file: player_library/V_fem_Boot.geo
-1
The game ran out of memory and must now exit.
Used QuickChat menu only (With macro'ed G15 keyboard)
Opened QC multiple times (2-3 times a second for a few minutes)
Crashed once ram got up around 1,900,000 k
If the ram could be released after a menu is shown, then we could have very large popmenus. Even leaving alone, given enough menus opened, the client will eventually run out of ram.