PDA

View Full Version : Runtime Error: Exception: bad allocation



Lonewolf
November 20th, 2016, 15:21
Runtime Error: Exception: bad allocation

I have someone in a game that always gets this. Now my current thought is the problem is being caused by poor memory management on the client side. The users is just simply running out of memory and FG is struggling.

Have got them to do a complete reinstall (although it was not done as clean as would have liked). Everything is available on the GM side and other players can connect just fine.

Worth getting up into checking the memory allocation of his computer?

LordEntrails
November 20th, 2016, 15:40
I would first check to see how much RAM he has, and then how is swap is setup. Then if that looks good, run a diagnostic test on his RAM, they might have a hardware issue.

Trenloe
November 20th, 2016, 18:04
1) Clear the player cache. On the "Join Game" screen click the nuke button in the top right hand corner.
2) What operating system is the player using? Plus, is it 32-bit or 64-bit?
3) What ruleset are you using and which modules do you have shared with the players?
4) Are you sharing any large images/maps?

Lonewolf
November 20th, 2016, 18:49
Thanks.

That all makes perfect sense. Part of the problem is the affected user is not confident around computers. So we tried to do talk him through the obvious stuff. All I could do is give him a list of things of things to check off by googling the "how to". There no sign of thrashing but have to trust the users eyes here.

1. Well if he has done things right. The cache should be cleaned. We asked for complete reinstall due to some other concerns. However repeating this is good.
2. He could not tell us (It is kind of hard to do tech support here when an answer can't be provided. Worst the amount of physical memory was unknown).
3. The rules set was SW and the modules just 50th Fathoms. All confirmed working in every other client. Confirmed modules correctly selected.
4. Not unless there are selected for pre-loading. I don't think any where. Other new players did not experience any problems at all.

In short everyone else is running fine. One connection that does not work too well. From a computer that we can't get much information on. Think we will need to get his computer sorted out first before trying FG on it.

damned
November 20th, 2016, 21:00
He may also be using a WiFi connection that isnt as strong or reliable as he thinks it is.
Have him open two cmd windows and do
ping 8.8.8.8 -n 1000
in one and teh same command but his routers gateway in the other
he should get basically 1000/1000 from teh second command and he should get at least 99% from the first
if that is too hard for him have him move his computer closer to the wifi or connect using a LAN cable.

Chidgey
November 21st, 2016, 04:09
This is a problem with the 3.2 release that has pretty much made the game unplayable for me. If you have a large module such as a complete 4e parser output then since 3.2 you will constantly get this error with the application going over the 2gig process limit. In the last session I run there were 7 crashes from this error alone.

It seems that there is a memory leak in the module code (same as in 3.0.3) so when you open something in a module its memory stays allocated. With large modules you quite quickly go over the limit. Its fairly easy to reproduce, if you just open and close the feats section of the 4e parser scrape the process memory jumps 100mb each time and when the process hist 2GB it crashes. Upping your memory limit or changing the process to be large address aware mitigates the problem as it takes longer to reach the limit but you will eventually get a bad allocation when you hit 4GB.

There is also a second module error, when you try to open a very large powerlist such as a list of all 9000 odd 4e powers the server becomes unresponsive and constantly resizes from full screen to fullscreen minus the windows start bar, every 3 seconds.

Neither of these problems existed pre 3.2.

Chidgey
November 21st, 2016, 04:11
To buy time until its fixed you can up the process limit to reduce time between crashes.
https://www.techpowerup.com/forums/threads/large-address-aware.112556/

This changed the crash point from 2GB to closer to 4GB for me on the release 3.2.1 executable running on a 64bit version of windows 10. The link also details what to do for certain 32 bit versions of windows.

damned
November 21st, 2016, 04:11
Chidgey please also post in the 3.2.0 or 3.2.1 threads to make sure that the Devs see this.

Trenloe
November 21st, 2016, 04:21
To buy time until its fixed you can up the process limit to reduce time between crashes.
https://www.techpowerup.com/forums/threads/large-address-aware.112556/
This has been present on the FG executable for over 4 years now. See post #36 and #37: https://www.fantasygrounds.com/forums/showthread.php?16215-Will-try-RM-again-with-new-computer&p=121770&viewfull=1#post121770

There's no need to run this, FG is already large address aware.

As damned says, if you have specific details about recreating a memory leak, or other issues, please log in the v3.2.1 thread. Thanks.

Chidgey
November 21st, 2016, 05:25
You may want to check that as the 3.2.1 executable certainly wasn't large address aware for me or the other people I play with.

It crashed consistently at around 2GB, I then made it large memory aware and it crashed consistently at around 3.8GB.

Maybe the flags absence on the release is why more people are suddenly reporting memory problems but the underlying problem seems to be a memory leak. Version 3.0.3 had the same issue.

Moon Wizard
November 21st, 2016, 23:23
This isn't a memory issue. I've identified the issue (tied to a scrollbar display issue for extremely long lists (3K+ items)), and the fix is scheduled for the next patch (v3.2.2) which I'm planning to get into beta testing next week or sooner with a short turnaround.

Regards,
JPG

Trenloe
November 21st, 2016, 23:44
You may want to check that as the 3.2.1 executable certainly wasn't large address aware for me or the other people I play with.

It crashed consistently at around 2GB, I then made it large memory aware and it crashed consistently at around 3.8GB.

Maybe the flags absence on the release is why more people are suddenly reporting memory problems but the underlying problem seems to be a memory leak. Version 3.0.3 had the same issue.
Weird.

I've just deleted the v3.2.1 FantasyGrounds.exe file and re-ran an update so that I get the base version. And I can run over 3.5GB in memory use. So the base version of v3.2.1 is large memory aware without modification.

I'd try the same to make sure you have the most recent executable.