Skip to content

Conversation

Jklawreszuk
Copy link
Collaborator

@Jklawreszuk Jklawreszuk commented Mar 28, 2025

PR Details

As the name suggests my PR separates FreeImage wrapper from TextureWrapper project just for sake of #2689 to prevent circular dependencies error. I've also changed namespace styling.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

@Jklawreszuk Jklawreszuk changed the title feat: Xplat support for image loading and saving from memory refactor: Move FreeImage into separate project Mar 28, 2025
@Jklawreszuk
Copy link
Collaborator Author

Jklawreszuk commented Mar 29, 2025

I'm not sure but seems like my new Stride.FreeImage package doesn't include the runtimes folder with freeimage.dll :( . If anyone has an idea what is wrong I would appreciate it

@Jklawreszuk Jklawreszuk marked this pull request as draft March 30, 2025 11:19
@Jklawreszuk Jklawreszuk marked this pull request as ready for review March 30, 2025 17:56
@Jklawreszuk
Copy link
Collaborator Author

Pr is ready for review, I tested the changes using the JumpyJet project. No regression so far 😄

@Doprez
Copy link
Contributor

Doprez commented Mar 30, 2025

I did a quick rebuild with the following steps:

  • git clean -xfd
  • dotnet clean
  • rebuild

And it seems to have broken the Test projects but I can confirm the GameStudio seems to run as expected.

[AssetCompiler] Exception in command [DdsMaskBC3] Stride.Assets.Textures.TextureConvertParameters: Stride.TextureConverter.TextureToolsException: Loading dds file D:/dev/GitControlledProjects/stride/sources/data/tests/SmallDdsMaskBC3.dds failed: E_FAIL

Im wondering if there is a reference to the new project missed for the tests somewhere?

@Jklawreszuk
Copy link
Collaborator Author

Oh that's because my branch is not up-to-date. One moment please hah

@Jklawreszuk
Copy link
Collaborator Author

@Doprez There you go

@Doprez
Copy link
Contributor

Doprez commented Mar 30, 2025

That seems to have fixed! Looks like everything is working on my end.

I did get a new crash but it seems unrelated to your changes but Ill log it here just in case:

Exception: ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Threading.ThreadLocal`1[[Stride.Core.MicroThreading.MicroThread, Stride.Core.MicroThreading, Version=4.2.0.1, Culture=neutral, PublicKeyToken=null]]'.
   at System.Threading.ThreadLocal`1.GetValueSlow()
   at Stride.Core.MicroThreading.Scheduler.get_RunningMicroThread() in D:\dev\GitControlledProjects\stride\sources\core\Stride.Core.MicroThreading\Scheduler.cs:line 79
   at Stride.Core.MicroThreading.MicroThreadSynchronizationContext.Post(SendOrPostCallback d, Object state) in D:\dev\GitControlledProjects\stride\sources\core\Stride.Core.MicroThreading\MicroThreadSynchronizationContext.cs:line 29
   at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

Log: 1: BasicCameraController(0,0): []: Fatal: The asset BasicCameraController is missing or incorrectly indexed in the package. Please report this issue.
2: MyGameApp(0,0): []: Fatal: The asset MyGameApp is missing or incorrectly indexed in the package. Please report this issue.

It looks like a threading issue due to incorrectly disposed assets so I think you're fine for this PR, likely just an existing issue.

@Jklawreszuk Jklawreszuk marked this pull request as draft March 31, 2025 11:17
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 this pull request may close these issues.

2 participants