Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sims 2 Tools (HomeCrafter Plus & Content Manager) #4518

Closed
Blayer98 opened this issue Dec 10, 2024 · 15 comments · Fixed by #4520
Closed

Sims 2 Tools (HomeCrafter Plus & Content Manager) #4518

Blayer98 opened this issue Dec 10, 2024 · 15 comments · Fixed by #4520

Comments

@Blayer98
Copy link

Blayer98 commented Dec 10, 2024

Both applications do not load and can cause freezes or crash Steam entirely depending on the system configuration.

Software information

The Sims 2 HomeCrafter Plus (Lets you create custom content for the game.)
The Sims 2 Content Manager (Lets you manage and enable/disable custom content.)

System information

  • Device: Steam Deck (256GB - LED)
  • Proton version: 1733476477 Experimental-9.0-20241206
  • DXVK version: v2.5.1-23-g027fe5963afdc81

The apps can cause Steam to crash completely, or on Steam Deck, cause a freeze which forces you to perform a hard reset, and I am unable to get an apitrace... I wanted to post an issue about these here first as I was unsure if the issue lies with Wine(Proton)/DXVK. I'm also posting this issue here in the event that a possible fix may fix some other apps or games having the same, if not similar issues.

Using wine directly, such as using the explorer from Protontricks to launch these apps, will result in the "D3DERR_INVALIDCALL" error.

Log files

Sims 2 Content Manager.log
Sims 2 Homecrafter Plus.log

@WinterSnowfall
Copy link
Contributor

Does launching with PROTON_USE_WINED3D=1 make any difference with either of these?

@Blayer98
Copy link
Author

Blayer98 commented Dec 10, 2024

Does launching with PROTON_USE_WINED3D=1 make any difference with either of these?

Nope, same D3DERR_INVALIDCALL error on both with that command.

image

image

Both display an additional window after clicking "OK".
image

image

Both apps do however generate a minidump and log file in your save data folder, in "Logs'.

@WinterSnowfall
Copy link
Contributor

Thanks for checking. A minidump won't help us here, only an apitrace would have been useful, had that worked.

One more thing to try, I guess: does it get any further with dxvk 2.4?

@Blayer98
Copy link
Author

Thanks for checking. A minidump won't help us here, only an apitrace would have been useful, had that worked.

One more thing to try, I guess: does it get any further with dxvk 2.4?

Nope, doesn't get any further on 2.3 either, I will try to do an apitrace though, but I'm not sure if it will provide anything.

@Blayer98
Copy link
Author

The Sims 2 Content Manager.trace.zip
Here's the trace for the Content Manager. :)

@WinterSnowfall
Copy link
Contributor

WinterSnowfall commented Dec 10, 2024

The Sims 2 Content Manager.trace.zip Here's the trace for the Content Manager. :)

Thank you. It has indeed captured something, however no D3DERR_INVALIDCALL errors to speak of, so it's still unclear why the crash happens. That being said, the things in the trace are somewhat nonsensical, and it appears to create textures, query them, and then not even release them fully? Perhaps it's simply running out of memory.

I assume both these utilities work on modern Windows? If so, it would be useful to capture an apitrace of that behavior, to see at least what the application expects to be proper in such cases, if there even is such a thing.

@Blayer98
Copy link
Author

The Sims 2 Content Manager.trace.zip Here's the trace for the Content Manager. :)

Thank you. It has indeed captured something, however no D3DERR_INVALIDCALL errors to speak of, so it's still unclear why the crash happens. That being said, the things in the trace are somewhat nonsensical, and it appears to create textures, query them, and then not even release them fully? Perhaps it's simply running out of memory.

I assume both these utilities work on modern Windows?

They do, yes. :)
Here's also the HomeCrafter Plus trace too in case anything differs.
TS2HomeCrafterPlus.trace.zip

@WinterSnowfall
Copy link
Contributor

Here's also the HomeCrafter Plus trace too in case anything differs. TS2HomeCrafterPlus.trace.zip

Appears to be mostly identical to the other one. No errors here either, just nonsensical behavior.

@Blayer98
Copy link
Author

Blayer98 commented Dec 10, 2024

Here's also the HomeCrafter Plus trace too in case anything differs. TS2HomeCrafterPlus.trace.zip

Appears to be mostly identical to the other one. No errors here either, just nonsensical behavior.

Content Manager loads almost instantly and works fine on Windows, I think HomeCrafter Plus has some issues on modern Windows though, it was working for me at one point however. Since both apps appear to have the same issue, I’ll try and see if I’m able to do an apitrace of Content Manager.

(NVM, HomeCrafter Plus is working it just took long time to load lol)

@WinterSnowfall
Copy link
Contributor

I’ll try and see if I’m able to do an apitrace of Content Manager.

If you can capture a trace of whichever is working on Windows, that would be fine and much appreciated.

@Blayer98
Copy link
Author

I’ll try and see if I’m able to do an apitrace of Content Manager.

If you can capture a trace of whichever is working on Windows, that would be fine and much appreciated.

I got the Content Manager trace from windows. :)
The Sims 2 Content Manager(Windows).zip

@WinterSnowfall
Copy link
Contributor

I got the Content Manager trace from windows. :) The Sims 2 Content Manager(Windows).zip

Thank you. This trace looks vastly different and... sane. I'll have to figure out what's causing it to diverge so wildly with dxvk/WineD3D, which may take a while, but I have all that I need now.

@Blayer98
Copy link
Author

Blayer98 commented Dec 10, 2024

While I haven't worked with apitraces before, I have noticed that right off the bat from line 8 it differs a bit:

Windows:

  • 8 Direct3DCreate9(SDKVersion = 32) = 0x5340260
  • 9 IDirect3D9::GetAdapterCount(this = 0x5340260) = 1
  • 10 IDirect3D9::GetAdapterMonitor(this = 0x5340260, Adapter = D3DADAPTER_DEFAULT) = 0x10001
  • 12 IDirect3D9::GetAdapterIdentifier(this = 0x5340260, Adapter = D3DADAPTER_DEFAULT, Flags = 0, pIdentifier = &{Driver = "igdumdim32.dll", Description = "Intel(R) HD Graphics 4000", DeviceName = "\\.\DISPLAY1", DriverVersion = {QuadPart = 2814827077177490}, VendorId = 32902, DeviceId = 358, SubSysId = 3234927693, Revision = 9, DeviceIdentifier = uuid(d7b78e66-4226-11cf-6f67-dbe0b4c2c735), WHQLLevel = 0}) = D3D_OK
  • 13 IDirect3D9::GetAdapterCount(this = 0x5340260) = 1
  • 14 IDirect3D9::GetAdapterMonitor(this = 0x5340260, Adapter = D3DADAPTER_DEFAULT) = 0x10001
  • 15 IDirect3D9::Release(this = 0x5340260) = 0
  • 16 Direct3DCreate9Ex(SDKVersion = 32, ppD3D = &0x5340260) = D3D_OK

Linux:

  • 8 Direct3DCreate9(SDKVersion = 32) = 0x1d63e0
  • 9 IDirect3D9::GetAdapterCount(this = 0x1d63e0) = 1
  • 10 IDirect3D9::GetAdapterIdentifier(this = 0x1d63e0, Adapter = D3DADAPTER_DEFAULT, Flags = 0, pIdentifier = &{Driver = "aticfx32.dll", Description = "AMD Custom GPU 0405 (RADV VANGOGH)", DeviceName = "\\.\DISPLAY1", DriverVersion = {QuadPart = 9223372036854775807}, VendorId = 4098, DeviceId = 5695, SubSysId = 0, Revision = 0, DeviceIdentifier = uuid(00000000-0004-0000-0000-000000000000), WHQLLevel = 0}) = D3D_OK
  • 11 IDirect3D9::GetAdapterDisplayMode(this = 0x1d63e0, Adapter = D3DADAPTER_DEFAULT, pMode = &{Width = 1280, Height = 800, RefreshRate = 60, Format = D3DFMT_X8R8G8B8}) = D3D_OK
  • 13 IDirect3D9::Release(this = 0x1d63e0) = 0

Everything matches up until line 8 where the second Create9 function is and Linux instead does GetAdaptorDisplayMode? that doesn't happen on Windows until line 89.

It's also missing an additional GetAdaptorCount, and two GetAdaptorMonitor lines are missing from Windows. Linux is also missing the Create9Ex function entirely?

I'll have a quick look at Body Shop as that works on Linux, and see if it differs at all.

@Blayer98
Copy link
Author

So Linux does the exact same thing on Body Shop, yet it's opening just fine there?
TS2BodyShop.1.zip

@WinterSnowfall
Copy link
Contributor

While I haven't worked with apitraces before, I have noticed that right off the bat from line 8 it differs a bit

That is a red herring. Games (and utilities) may have different paths depending on the hardware they're using or various other factors, it's nothing unusual.

The notable diverging point follows a call to IDirect3DDevice9::GetAvailableTextureMem which queries the total available video memory. We already have a memory limit in place here for The Sims 2, since it doesn't appear to work correctly without one. Extending this to the tools you've mentioned should fix things.

@Blisto91 is on the case and we should soon have a PR to fix them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants