Insimenator.org
August 23, 2017, 04:19:22 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: When making requests, list what EP/SPs you have, or Joy will force feed you decaff coffee.
 
  Home   Forum   Help Search Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Mac Misbehaviour with Crashes and the Maximum Open Files Limit  (Read 332 times)
0 Members and 1 Guest are viewing this topic.
lordtyger
Site Santa!
*****
Gender: Male
Posts: 26



View Profile
« on: June 12, 2017, 02:12:57 pm »

ASPYR still offers Sims 2 support! If your game is absolutely broken, contact Aspyr!

First, before you do anything, back up your game.

1. Where are my files?

Macs store your files in two places. System files for your Sims game are located in your Application folder. Right-click Sims 2 Super Collection > Show Package Contents /Contents/Home/TSData.

The rest is the same as PC. These are SYSTEM files, do NOT touch/edit them unless you know EXACTLY what you’re doing. These are the files where you modify lighting, hood templates, and more. Keep in mind each time you edit these system files, your Sims will get reset. There is little chance these files can get corrupt, so just don’t touch them.

The editable User files are located in this path <User>/Library/Containers/com.aspyr.sims2.appstore/Data/Library/Application Support/Aspyr/The Sims 2.

The files here are your saves and Downloads. These files CAN get corrupt, so create a backup for the whole Sims 2 folder.

2. Reinstall?

If your user files in Aspyr/Sims 2 exploded in a fiery ball of fire visible from space, simply rename/delete the Sims 2 folder and it will regenerate on next game start.

3. File Limit? Character Limit? HUH?

Macs have an maximum open file limit. What the file limit means is that your system can only boot up X amount of files at a time. This number is generally high in newer systems, around ~10k, and really isn’t much of a problem in the modern world.

The issue is that Sims 2 is an ancient 2004 game that’s TERRIBLY inefficient. Upon load, Sims 2 loads EVERY file, regardless of whether its in use or not (which is why you can run into such long loading times). This is done in alphabetical order, which means your 40 neon recolors of the lawn flamingo are loaded prior to your Hood save files. If you watch your game load, you will start to notice which files it’s loading (i.e. 3rd-4th grid column is the longest, and the 4th folder also happens to be Downloads).

The character limit means the system can only read files that have less than ~250 letters and symbols. More than that and the system just can’t see the file. For instance, Users/example/Library/Containers/com.aspyr.sims2.appstore/Data/Library/Application Support/Aspyr/Sims 2 is already 104 characters. Add Downloads/clothes_[AlwaysSims]CropTopHighJeans-AF/BasciHighJeans-AF/[AlwaysSim]BasicHighJeans-PixicatGladiatorEdited-BloomSexyFeet-AFBottom_MESH.package and you are close to crossing that line.

Try to keep subfolders to a minimum. If your new CC isn’t showing up in game, check the length. Sometimes, rarely, certain CC just won’t show up as well and this may be because it is not compatible with your game being as it is created for Free Time or newer or uses one of the several Stuff Packs that are not available for Mac.


4. My Game Crashed! Bad CC Or Bad Mac?

If you’re reading this article on a 2004 game in 2017 then it’s a safe bet you might well know about meshes, mods, and the necessity of making backups.

You have most likely dealt with crashes before. On Macs, crashes are a tiny bit different: your crash can be CC or open file limit caused. CC crashes are easy to tell; usually your sim will jump/freeze/crash upon interaction with the object, your game will crash when entering the lot, or CAS will crash when selecting the new outfit/hair. You’ll try the 50/50 method and easily find the offending CC. Done.

Now, crashes that seem to have NO rhyme or reason are 99% open file limit caused. These crashes are random and it’s impossible to find the one CC you think is causing it. I faced these file crashes a lot, but while trying the 50/50 method, I think I have the CC, then I test it alone, works fine! Put in more files, crash again. It may seem like a GUID conflict at first (items conflicting because they have the same ‘ID’ number), but it would seem like random CC was crashing me. If this is familiar, if you can’t understand which CC is the problem, then it is a safe bet that you’re facing an open file limit crash.


5. File Crash Symptoms? Help!

Depending on the amount of files in your Sims 2 folder, you’ll experience different symptoms, ranging from errors, to crashes, to full-on corruption. Make sure to backup your save files often, especially before testing mass amounts of new Custom Content. You never know which file may be the final straw. Here I’ll list some symptoms I have personally experienced while diagnosing crashes.
Visual Symptoms:

Wire-frame Hood icons, seen either on main Hood selection screen, when switching from Hood to Hood, or, if playing, whenever the Neighborhood would be displayed in-game (such as Sim selecting ‘walk/drive to lot’ and picking the location). Removing CC and restarting the game would fix this.

Empty lots in bin: when selecting a lot from the bin and moving it over the terrain to place, the actual building disappears and the lot becomes empty. Each and every lot would do this. Removing CC would return the building next time the Hood loads.

Missing lots in the bin. Removing CC would return the missing lots.

Sims missing from the bin; they do NOT return on next load.

Sims missing from lots, no plumbobs above houses. They do NOT return on next load!

Only some Sims missing from household. If you can load the lot, you’ll see “$subject” names in memories instead of original name.
 
All sims in aspiration failure, including toddlers, babies, and pets.

Bodyshop displays a black screen on the left, but visible menu. You may be able to click ‘Create Sims’, but it’ll crash afterwards. Also the options menu will display only one thing, sometimes even if Bodyshop works fine.

This very odd one-time glitch?
Game Crashes:

Game crashes when entering Hood, usually on 4th column or after entire load, often paired with wire-frame icons. Often it’ll just freeze indefinitely.

Creating new Hoods crashes, usually on 1st/2nd row when creating ‘Pets’, or after 1st/2nd row of ‘Exotic Destinations’.

CAS crashing on ‘Create Another Sim’, often I’ll make one, then CAS will show the hourglass and crash when clicking ‘create another sim’ again. Often I would be able to make 2 sims before it crashed, but sometimes it would crash when clicking create sim the very first time.

Unrelated programs crashing when opened during Sims, or Sims crashing when opening other programs.

And one of the biggest signs: game crashes on next play session without being changed. Your play session goes fine, you save and exit game. You DO NOT move/delete/edit files. On next load your Hood/lot crashes.

6. Is my game CORRUPT?

You may not be entirely interested as to why these crashes happen, but I’ll explain because I think understanding crashes is a huge help and may save you the confusion.

Technically speaking, file limit crashes are caused solely by the game trying to access files it hasn’t loaded. Your 15 scratching post recolors (”Downloads”) load before Neighborhoods, so your game simply can’t pull up the Hood info.

If you remove some files, it’ll load fine and fix whatever problems you were having last time, since now it CAN reach save files.

That’s the case for missing lots, which is why they reappear in the bin. When the game attempts to access Sims though, instead of simply skipping the missing Sim, the game overwrites their files as though they are totally gone.

This means your missing Sims, from lots, households, and the bin, will NOT reappear on next boot. The game has shredded the files due to loading them only partially. Hopefully you have a backup in this case, since it’s hard to predict if your Sims will be impacted.

So why does the game crash on next play session, even though you didn’t add/move/change files? Because saving those extra files after your play session was just enough to push you over the file limit, so voila! A big fat crash. The save file grows, and if you’re right on the limit, you’ll pass it after you exit the game.

Another time you’ll face corruption is by editing system files in the App folder, such as editing lighting. Every time you do this, your lots reset.

This doesn’t mean anything to on-world Sims, but if your Sim was off-world during the save, such as work or school, they’ll be basically wiped out. Entering the lot you’ll notice “$subject” titles instead of their names in memories and they’ll be missing from Hood view.

Corrupted Sims may also be in aspiration failure. Your lots get reset automatically, whether you enter or load the Hood. This is unfixable and unavoidable; make sure to always save when all Sims are at home and no off-world loiters to avoid any sort of corruption.

7. What is MY file limit?

Different Macs have different file limits. You can easily check using Terminal. Checking the limit doesn’t change anything, so don’t be afraid to use Terminal.

Open Terminal
Type in “sysctl kern.maxfiles”, no quotes, just like that. Hit Enter.

You’ll see “kern.maxfiles: X” This is the file limit overall.

Type in “sysctl kern.maxfilesperproc”, no quotes, just like that. Hit Enter.

You’ll see “kern.maxfilesperproc: X” It’ll be smaller than the previous number. This is the file limit per process, i.e., per Sims launch.

Now, these numbers are HYPOTHETICAL. This means they are soft limits. And THAT mean your system may be able to handle more or less files; the limit is there as a guideline. You’ll notice your Mac gets crazy hot; the strain of using THIS many files is why the limit is there as a safeguard. The per-process limit is less than the general file limit: this is so you can run Finder/Safari/iTunes and system files along side your main task. Which explains why sometimes Sims 2 crashes other programs; there simply isn’t enough space to run the files it needs for both.

To check your personal Sims 2 size, locate your editable User files, the ones at Aspyr/Sims 2. Right click the WHOLE Sims 2 folder/Get Info/General/Size. Pay attention to the ‘Files’ number, not ‘Bytes’. Next, locate your Sims 2: Super Collection app. Right click > Show Package Files > right click Contents > Get Info. Add the two together and that’s your file amount so far.

8. How do I fix it!

This is probably the section you skipped to. If you did, at least take a glance at the others. They will help as well.

The bad news is the file limit will always hang around. You simply cannot have infinite files and infinite space. Luckily, you can push the file limit up, assuming you have a decent Mac.

Essentially you override the system’s command of sticking to 1x,xxx files and allow yourself to run more than ‘recommended’.

To Fix the Open File Limit on Yosemite and newer read my instructions located here

http://www.insimenator.org/index.php/topic,49183.0.html
Logged

Curiosity Killed the Cat, but Satisfaction Brought It Back.
Pages: [1]
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.13 seconds with 31 queries.
SimplePortal 2.1.1