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

Preview 1.82.2 Release #608

Merged
merged 133 commits into from
Nov 24, 2024
Merged

Preview 1.82.2 Release #608

merged 133 commits into from
Nov 24, 2024

Conversation

bagusnl
Copy link
Member

@bagusnl bagusnl commented Nov 20, 2024

What's changed? - 1.82.2

  • [Fix] Remove the use of Stub for launching Collapse, by @bagusnl
    • As we moved to Velopack, the use of stub is no longer needed as the latest version will always be in the "current" folder.
  • [New] Automatic Error Data Collection, by @bagusnl & @Cryotechnic
    • Every time either a crash or error happened, upload the error data alongside with the latest log to Sentry server for further analysis by developers.
    • Thanks Sentry for giving us free access to their Business plan <3
  • [New] Rewrite Icon generator code to be trim/NativeAOT friendly, by @neon-nyan
  • [Imp] Updated .NET to GA (Release) version, by @bagusnl
  • [Imp] Decouples PInvoke code from Hi3Helper.Core to its own Hi3Helper.Win32 submodule, by @neon-nyan
  • [Fix] Fixed DllNotFoundException when trying to turn on Database Sync feature, by @bagusnl
    • This is caused by missing Microsoft Visual C/C++ Redistributable required for the database handler.
    • Currently, user will be notified about the missing redist and told to download and install them.
  • [Fix] SharingViolation Exception and other issues on Sophon submodule, by @neon-nyan
    • Fix wrong URL path for manifestToProtoTaskCallback.
    • Fix non-existence files not getting renamed on update.
    • Fix SharedViolation exception by unassigning ReadOnly attribute.
  • [Imp] Improvement on Sophon submodule, by @neon-nyan
    • Reduce overhead on async I/O by removing unnecessary bridging Stream.
    • Directly invoking .GetAsync() on getting HttpResponseMessage.
    • Move to .NET 9's Convert.ToHexStringLower() to convert byte[] or ReadOnlySpan<byte> to Hex string.
    • Always check for file availability on enumerating updates. This to avoid unused files from old version to be written into new version.
    • Reuse code to deserializing Protobuf response and its callbacks.
  • [Fix] Fixed IODenied error in Genshin repair, by @bagusnl
    • This is caused by an asset wrongly marked as Persistent while actually being in StreamingAssets
  • [Imp] Use local placeholder background while waiting for dispatch background to download, by @bagusnl
    • Also include fixes for IOSharingViolation errors for both background and carousel event images
  • [Imp] Let user know that Database sync is processing after manual sync, by @bagusnl & @neon-nyan
  • [Fix] Type casting mistakes on Zenless Zone Zero game settings methods, by @neon-nyan
Changelog Prefixes
  **[New]**
  **[Imp]**
  **[Fix]**
  **[Loc]**
  **[Doc]**

transifex-integration bot and others added 30 commits November 6, 2024 20:30
100% reviewed source file: 'en_US.json'
on 'es_419'.
The server running is using a local dinky server, pls no abooze.

TODO: Implement Sentry catcher to ALL EXCEPTION HOLY THAT IS A LOT
100% reviewed source file: 'en_US.json'
on 'zh_CN'.
`USEREMOTELOGGING`, automatically enabled on Preview & Debug branches for obvious reasons.

update logger types
Does not initialize or de-initialize the utility.

Note: An app restart may be required when selecting the option
sends it to Sentry so we don't have to refactor all our exception calls
Move SentrySDK init to its own helper
This added current log for when exception is sent to Dsn
1. Redacted username in the log file when its not debug build
2. Properly dispose SentrySdk when toggled off
3. Pipe SentrySdk log to Logger
4. Use correct flusher for SentryHelper.cs
5. Fixed cleaner loop for ExceptionHandler_ForLoop by @neon-nyan

Co-authored-by: Kemal Setya Adhi <dev.kemalsetyaa@gmail.com>
No need for adding Sentry's ExceptionHandler on catcher that has SendException already
Grabbed from Velopack's Implementation with adjustments to make the COM Interop compatible with AOT/Trim
100% reviewed source file: 'en_US.json'
on 'ja_JP'.
Note:

- Some submodules cannot import SentryHelper, which is in `Hi3Helper.Core`
- Some calls are asynchronous, mostly for the handled exceptions, but also where it felt best to use them, feel free to change them if needed
- Most are categorized as `UnhandledOther`, but if we feel the need to change some, we can, it simply affects tagging on the frontend dashboard.
bagusnl and others added 29 commits November 22, 2024 21:54
…embly (#606)

# Main Goal
As you might already know, Collapse heavily relies on native invocation
for some libraries, especially when it is communicating with Win32 APIs.
For more than two years, we have been using the ``[DllImport]``
attribute to define the external method to call the native functions of
certain libraries (especially when it comes to `Win32` calls).

In .NET 7, ``[LibraryImport]`` was introduced, which is the
``[DllImport]`` alternative that provides the source-generated
invocation to native functions, instead of using a JIT-ed approach. The
``[LibraryImport]`` brings some invocation features which aren't
available for NativeAOT compilations, for example:
``GetLastWin32Error()``, which is useful when diagnosing what's wrong
when a `Win32` function is getting called.

Read more about ``[LibraryImport]`` here:

https://learn.microsoft.com/en-us/dotnet/standard/native-interop/pinvoke-source-generation

https://learn.microsoft.com/en-us/dotnet/standard/native-interop/best-practices

Another reason for these changes are for maintainability and to share
some of the same functionality between our projects. This changes can
improve the work time efficiency and reusability of the functions
between methods without making or implementing the same methods with the
same functionality between modules.

## PR Status :
- Overall Status : Completed
- Commits : Completed
- Synced to base (Collapse:main) : Yes
- Build status : OK
- Crashing : No
- Bug found caused by PR : Unsure

### Templates

<details>
  <summary>Changelog Prefixes</summary>
  
  ```
    **[New]**
    **[Imp]**
    **[Fix]**
    **[Loc]**
    **[Doc]**
  ```

</details>
Try to unassign read only flag from RunDownloadTask if it gets IODenied error
DO NOT ASK
This reverts commit 7e504b2.
- Use built-in ToHexStringLower for BytesToHex
- Fix SharedViolation exception by unassigning ReadOnly attribute
- Simplify and remove unnecessary Stream bridge
- Add and use alt. SophonChunksInfo if the default url returns 404
  This to fix an issue where sometimes the chunk files would return 404 due to identical chunks but was not existence in the new ChunksInfo
- Always check for file availability on enumerating updates
- Fix non-exist files not getting renamed on update
- More UnassignReadOnlyFromFileInfo() checks
- Fix wrong URL path for manifestToProtoTaskCallback
- Reuse Proto Parser Code
…ileNotFoundException

Try to delete and reassign them as missing file
Following infos will be sent:
1. Build info (Commit, Repo, Branch)
2. Currently loaded game info (Category, Region, Installed, Updated, Has Preload/Delta)
# Main Goal
Use poster as temporary background when requested background is not yet
downloaded.
New background retrieval mechanism:
1. Check if background is downloaded
2. If it's downloaded, then load the downloaded background
3. If not yet downloaded, load either last available regional background
or use poster as background instead

Due to the poster having slight transparency, the switching looks a wee
bit janky

This PR also contains IOException fixes especially for background
loading and image cache processing (really noticeable when user uses
Waifu2X)

## PR Status :
- Overall Status : Done
- Commits : Done
- Synced to base (Collapse:main) : Yes
- Build status : OK
- Crashing : No
- Bug found caused by PR : 0
@bagusnl bagusnl merged commit f6ade5f into preview Nov 24, 2024
5 checks passed
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.

3 participants