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

整合包安装信息存在问题:未将对象引用设置到对象的实例 #4277

Closed
3 tasks done
goumo opened this issue Jul 16, 2024 · 9 comments
Closed
3 tasks done
Labels
· Bug 忽略 因为各种杂项原因而关闭

Comments

@goumo
Copy link

goumo commented Jul 16, 2024

检查项

  • 我已尝试使用其他启动器,其他启动器没有出现问题。 如果其他启动器也存在问题,证明是网络环境不佳(解决方法),并非 PCL 的问题,请 不要 提交反馈。下载 HMCL
  • 我知晓大多数此类问题都是网络环境不佳导致的,但我确实认为我的问题可能是 PCL 导致的,和网络环境无关。
  • 我已在 Issues 页面常见&难检反馈及问题列表 中搜索,确认了这一 Bug 未被提交过。

描述

在最新版本中安装附件中的整合包时提示 整合包安装信息存在问题:未将对象引用设置到对象的实例 ,但是在旧版本 PCL 或 HMCL 中可以正常安装

(.minecraft 文件夹内为模组文件和整合包图标,我认为和报错无关所以没有上传)

重现步骤

1、将压缩包拖进启动器安装

日志与附件

整合包安装信息.zip
日志.zip

@goumo goumo added · Bug 新提交 需要社区初步确认其有效的新提交 labels Jul 16, 2024
@3gf8jv4dv
Copy link
Collaborator

The modpack you provided is missing the instance.cfg file.

@zkitefly zkitefly added 等待确认 已经过社区确认,等待开发者确认 and removed 新提交 需要社区初步确认其有效的新提交 labels Jul 16, 2024
@goumo
Copy link
Author

goumo commented Jul 16, 2024

The modpack you provided is missing the instance.cfg file.

That's all the files, and it's can be installed when using older versions of PCL

@3gf8jv4dv
Copy link
Collaborator

3gf8jv4dv commented Jul 16, 2024

That's all the files, and it's can be installed when using older versions of PCL

I noticed that what you are trying to import is a MultiMC modpack. mmc-pack.json and instance.cfg are selected by default when exporting a modpack in MultiMC or Prism Launcher, somehow the latter is not included in the archive you uploaded.

I just did some testing and code review a while ago, and the latest PCL (whether from LTCatt or the build on GitHub) will try to read mmc-pack.json and instance.cfg when it detects the MultiMC modpack. I encountered the same situation as you when the latter was not included in the modpack.

'MMC
Private Sub InstallPackMMC(FileAddress As String, Archive As Compression.ZipArchive, ArchiveBaseFolder As String)
'读取 Json 文件
Dim PackJson As JObject, PackInstance As String
Try
PackJson = GetJson(ReadFile(Archive.GetEntry(ArchiveBaseFolder & "mmc-pack.json").Open, Encoding.UTF8))
PackInstance = ReadFile(Archive.GetEntry(ArchiveBaseFolder & "instance.cfg").Open, Encoding.UTF8)
Catch ex As Exception
Log(ex, "整合包安装信息存在问题", LogLevel.Hint)
Exit Sub

I tried creating an empty file and named it instance.cfg, and put it in the modpack you provided, and PCL will display the pop-up window for the player to enter the instance name normally.

You said that earlier versions of PCL did not encounter similar problems. Could you provide a rough version range?

Regards.

@goumo
Copy link
Author

goumo commented Jul 16, 2024

Could you provide a rough version range?

around February

I don't know where to get the historical version, but at the time this modpack was installed without problems

@3gf8jv4dv
Copy link
Collaborator

around February

I don't know where to get the historical version, but at the time this modpack was installed without problems

LTCatt uploaded 最新正式版.zip in GitHub repo. You can find the stable version provided by LTCatt through the commit history. I will try several versions later.

@3gf8jv4dv
Copy link
Collaborator

3gf8jv4dv commented Jul 16, 2024

I tested several versions and found that 2.7.4 worked fine, but 2.8.2 started to have the same problem as the author.

I further tested the versions within this range, 2.8.1 worked fine, but 2.8.2 started to have problems.

Not sure if this is related to the fix for #4194. Can be confirmed.

@lactobionicAcid
Copy link
Contributor

lactobionicAcid commented Jul 16, 2024

HMCL 读取该整合包时似乎直接跳过了 mmc-pack.json 文件...
也就是说, HMCL 根本就没把这玩意作为 MultiMC 整合包读取。

说明 PCL 对于整合包类型的检测还不够完善...?

@3gf8jv4dv
Copy link
Collaborator

3gf8jv4dv commented Jul 16, 2024

HMCL 读取该整合包时似乎直接跳过了 mmc-pack.json 文件...
也就是说, HMCL 根本就没把这玩意作为 MultiMC 整合包读取。

说明 PCL 对于整合包类型的检测还不够完善...?

The modpack provided by the author was originally considered as a CurseForge modpack by PCL. However, due to the code logic change in 2.8.2, the modpack was considered as a MultiMC modpack instead. The modpack happened to lack instance.cfg, so an error occurred in the PCL.

According to the information you provided, it seems that HMCL follows the previous logic of PCL. I tested HMCL, if only mmc-pack.json is retained without retaining other files, HMCL also cannot recognize modpack; it can be recognized normally when both mmc-pack.json and instance.cfg exist.

@goumo
Copy link
Author

goumo commented Jul 16, 2024

另一个 issue 也是冬季救援整合包,这也太巧了

我刚才试了下即使是 mmc 也不能导入,也就是说 instance.cfg 是必须的,由于发布时误删导致新版本 PCL 无法正确读取整合包,所以不应该由 PCL 背这口锅(

@goumo goumo closed this as completed Jul 16, 2024
@allMagicNB allMagicNB reopened this Jul 16, 2024
@allMagicNB allMagicNB closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2024
@Pigeon0v0 Pigeon0v0 added 忽略 因为各种杂项原因而关闭 and removed 等待确认 已经过社区确认,等待开发者确认 labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
· Bug 忽略 因为各种杂项原因而关闭
Projects
None yet
Development

No branches or pull requests

6 participants