Might and Magic 6, 7, 8 merge based on mm8 engine. [upd. 05.11.2023]

The role-playing games (I-X) that started it all and the various spin-offs (including Dark Messiah).
jeremy001
Leprechaun
Leprechaun
Posts: 10
Joined: 29 Apr 2020

Re: Might and Magic 6, 7, 8 merge based on mm8 engine. [upd. 05.11.2023]

Unread postby jeremy001 » 07 Oct 2024, 15:50

you are right, as always, thank you, it is working now :) thank you!

cthscr
Golem
Golem
Posts: 607
Joined: 12 Jan 2020

Re: Might and Magic 6, 7, 8 merge based on mm8 engine. [upd. 05.11.2023]

Unread postby cthscr » Yesterday, 08:43

toadking wrote: 05 Oct 2024, 12:44
toadking wrote: 05 Oct 2024, 11:52 Today I discovered an issue that can be reproduced in the following way:
1. Removing the file data\new.lod if it exists.
2. Starting a new game, then choose Enroth(MM6) and enter the first map "New Sorpigal".
3.Visiting the house named "Blade's End", game crash and exit.
If the party visit the house named "Blade's End" after joining the guild of "Blade's End Membership", the game will proceed normally, this is also my current temporary solution. Maybe you can help find the root cause of the problem, thank you very much.
I have tracked the code and it is possible that the issue is caused by the nil value of the award in line 234 of "Scripts\Global\Quest_Guilds.lua",FYR.
1. Cannot reproduce.
2. Line 234 shouldn't be an issue because it shouldn't be reached (if code wasn't changed locally) - MT.GuildNPCMastery is an empty table now.
So I think the problem is somewhere else.

PS. I'd set Merge.Settings.Logging.ForceFlush to 1 and Merge.Settings.Logging.LogLevel to 5 and see if "HousesTweaks: DrawShopTopics" is called yet.
PS2. First few function calls of last entry in ErrorLog.txt could be helpful too.

User avatar
toadking
Peasant
Peasant
Posts: 91
Joined: 22 Jul 2022

Re: Might and Magic 6, 7, 8 merge based on mm8 engine. [upd. 05.11.2023]

Unread postby toadking » Yesterday, 13:48

cthscr wrote: Yesterday, 08:43
toadking wrote: 05 Oct 2024, 12:44
toadking wrote: 05 Oct 2024, 11:52 Today I discovered an issue that can be reproduced in the following way:
1. Removing the file data\new.lod if it exists.
2. Starting a new game, then choose Enroth(MM6) and enter the first map "New Sorpigal".
3.Visiting the house named "Blade's End", game crash and exit.
If the party visit the house named "Blade's End" after joining the guild of "Blade's End Membership", the game will proceed normally, this is also my current temporary solution. Maybe you can help find the root cause of the problem, thank you very much.
I have tracked the code and it is possible that the issue is caused by the nil value of the award in line 234 of "Scripts\Global\Quest_Guilds.lua",FYR.
1. Cannot reproduce.
2. Line 234 shouldn't be an issue because it shouldn't be reached (if code wasn't changed locally) - MT.GuildNPCMastery is an empty table now.
So I think the problem is somewhere else.

PS. I'd set Merge.Settings.Logging.ForceFlush to 1 and Merge.Settings.Logging.LogLevel to 5 and see if "HousesTweaks: DrawShopTopics" is called yet.
PS2. First few function calls of last entry in ErrorLog.txt could be helpful too.
I tried it, and if I delete new.lod and directly access the house at the beginning of mm6 before join Blade's End Membership, it will report this error, almost every time. But if the following three lines are added, there will be no more errors. It is puzzling that there is no information output in the MMMergeLog *. txt log such as "Error found at this line" that I add only for trace :

Code: Select all

for npc, amastery in pairs(MT.GuildNPCMastery) do   ----Line 233
  MF.LogError("Error found at this line %d ", #MT.GuildNPCMastery)  ---only for trace
	local award = MT.GuildNPCAward[npc]
	if award == nil then   --I add line1
		return    --I add  line2
	end   --I add   line3
	...
	
In addition, the error messages in Errorlog.txt are as follows:

Code: Select all

Time: 2024/10/8 20:29:13 (08.10.2024 12:29:13 UTC)
Windows Version 6.2 

Exception EAccessViolation in module MM8patch.dll at 186AF91F.
Access violation at address 186B091F. Read of address 03C5F000.

Function Calls:

186B091F | (186B0000) + 91F
60003883 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 3883
032981B6 | D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 481B6
60003E92 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 3E92
60003EBB ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 3EBB
774069AF ? C:\Windows\SYSTEM32\ntdll.dll + 869AF
773E81E2 ? C:\Windows\SYSTEM32\ntdll.dll + 681E2
773E821B ? C:\Windows\SYSTEM32\ntdll.dll + 6821B
519A1E25 ? C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_a1e7755eb10c8b98\igc32.dll + A61E25
03298378 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 48378
03298378 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 48378
03298378 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 48378
03298378 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 48378
773BD379 ? C:\Windows\SYSTEM32\ntdll.dll + 3D379
51E73D58 ? C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_a1e7755eb10c8b98\igc32.dll + F33D58
51E4563D ? C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_a1e7755eb10c8b98\igc32.dll + F0563D
773B5F0E ? C:\Windows\SYSTEM32\ntdll.dll + 35F0E
773B5F0E ? C:\Windows\SYSTEM32\ntdll.dll + 35F0E
51A98075 ? C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_a1e7755eb10c8b98\igc32.dll + B58075
773B5F0E ? C:\Windows\SYSTEM32\ntdll.dll + 35F0E
773E8459 ? C:\Windows\SYSTEM32\ntdll.dll + 68459
773E84E5 ? C:\Windows\SYSTEM32\ntdll.dll + 684E5
773E8459 ? C:\Windows\SYSTEM32\ntdll.dll + 68459
773E8459 ? C:\Windows\SYSTEM32\ntdll.dll + 68459
773E84E5 ? C:\Windows\SYSTEM32\ntdll.dll + 684E5
773E84E5 ? C:\Windows\SYSTEM32\ntdll.dll + 684E5
774069E0 ? C:\Windows\SYSTEM32\ntdll.dll + 869E0
03298378 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 48378
774069E0 ? C:\Windows\SYSTEM32\ntdll.dll + 869E0
774069AF ? C:\Windows\SYSTEM32\ntdll.dll + 869AF
773E8399 ? C:\Windows\SYSTEM32\ntdll.dll + 68399
03298378 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 48378
773F3A31 ? C:\Windows\SYSTEM32\ntdll.dll + 73A31
7594542C ? C:\Windows\System32\KERNELBASE.dll + 12542C
773F3A31 ? C:\Windows\SYSTEM32\ntdll.dll + 73A31
7594542C ? C:\Windows\System32\KERNELBASE.dll + 12542C
7594542C ? C:\Windows\System32\KERNELBASE.dll + 12542C
032767D1 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 267D1
7594542C ? C:\Windows\System32\KERNELBASE.dll + 12542C
773F2B8A ? C:\Windows\SYSTEM32\ntdll.dll + 72B8A
77406BB0 ? C:\Windows\SYSTEM32\ntdll.dll + 86BB0
0325E2B8 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + E2B8
0325E384 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + E384
0325E399 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + E399
03256EBA ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 6EBA
03256FDB ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 6FDB
7594542C ? C:\Windows\System32\KERNELBASE.dll + 12542C
0325E2B8 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + E2B8
0325E384 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + E384
0325E399 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + E399
03294F2E ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 44F2E
03294725 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 44725
03294D45 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 44D45
03276360 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 26360
50E37471 ? C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.9554_none_d08d6fa2442aa556\MSVCR80.dll + 17471
03295107 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 45107
50E374D3 ? C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.9554_none_d08d6fa2442aa556\MSVCR80.dll + 174D3
600034C8 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 34C8
6000352A ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 352A
600033D5 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 33D5
773BF2C3 ? C:\Windows\SYSTEM32\ntdll.dll + 3F2C3
773BF1C4 ? C:\Windows\SYSTEM32\ntdll.dll + 3F1C4
773BF1C4 ? C:\Windows\SYSTEM32\ntdll.dll + 3F1C4
773B7C6D ? C:\Windows\SYSTEM32\ntdll.dll + 37C6D
773B7768 ? C:\Windows\SYSTEM32\ntdll.dll + 37768
773BBDE1 ? C:\Windows\SYSTEM32\ntdll.dll + 3BDE1
773BC5FC ? C:\Windows\SYSTEM32\ntdll.dll + 3C5FC
773BC5FC ? C:\Windows\SYSTEM32\ntdll.dll + 3C5FC
21115B5D ? D:\Program Files\MMMerge\mss32.dll + 15B5D
004D45BC ? D:\Program Files\MMMerge\mm8.exe + D45BC
773BAE9C ? C:\Windows\SYSTEM32\ntdll.dll + 3AE9C
773BAE7B ? C:\Windows\SYSTEM32\ntdll.dll + 3AE7B
004D4811 ? D:\Program Files\MMMerge\mm8.exe + D4811
004D2079 ? D:\Program Files\MMMerge\mm8.exe + D2079
004DA170 ? D:\Program Files\MMMerge\mm8.exe + DA170
773F15BA ? C:\Windows\SYSTEM32\ntdll.dll + 715BA
75939473 ? C:\Windows\System32\KERNELBASE.dll + 119473
75939491 ? C:\Windows\System32\KERNELBASE.dll + 119491
759393CD ? C:\Windows\System32\KERNELBASE.dll + 1193CD
773F15BA ? C:\Windows\SYSTEM32\ntdll.dll + 715BA
75939473 ? C:\Windows\System32\KERNELBASE.dll + 119473
75939491 ? C:\Windows\System32\KERNELBASE.dll + 119491
004DEFB2 ? D:\Program Files\MMMerge\mm8.exe + DEFB2
004DEED3 ? D:\Program Files\MMMerge\mm8.exe + DEED3
21104F9B ? D:\Program Files\MMMerge\mss32.dll + 4F9B
004A9344 ? D:\Program Files\MMMerge\mm8.exe + A9344
21115B5D ? D:\Program Files\MMMerge\mss32.dll + 15B5D
60003792 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 3792
60003899 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 3899
032981B6 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 481B6
60003E92 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 3E92
60003E92 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 3E92
773F15BA ? C:\Windows\SYSTEM32\ntdll.dll + 715BA
75939473 ? C:\Windows\System32\KERNELBASE.dll + 119473
75939491 ? C:\Windows\System32\KERNELBASE.dll + 119491
03252832 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 2832
0325286E ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 286E
03276360 ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 26360
032C20A7 ? D:\Program Files\MMMerge\MM8patch.dll + 20A7
032C2CA8 ? D:\Program Files\MMMerge\MM8patch.dll + 2CA8
...

Registers:

EAX = 26B9AA80
EBX = 0019CEDC
ECX = 0000006C
EDX = 00000000
ESI = 03A801C8
EDI = 00000001
EBP = 0019CF00
ESP = 0019CED0

Stack Trace:

0019CED0: 00000001
0019CED4: 03A801C8
0019CED8: 60003886 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 3886
0019CEDC: 03A80DC8
0019CEE0: 600037C0
0019CEE4: 03A802F4
0019CEE8: 03A80DC8
0019CEEC: 05AE0733
0019CEF0: 00000004
0019CEF4: 05AE0733
0019CEF8: 00000001
0019CEFC: 027F0000
0019CF00: 03A801C8 | Last EBP
0019CF04: 032981B8 | D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 481B8
0019CF08: 03A801C8
0019CF0C: 3B738A10
0019CF10: 3B738A08
0019CF14: 03A80DC8
0019CF18: 04617498
0019CF1C: 00000004
0019CF20: 0461FD14
0019CF24: 0019CF58
0019CF28: 3B738918
0019CF2C: 0019E028 | TExcFrame.next
0019CF30: 03270F70 | D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 20F70
0019CF34: 00000000
0019CF38: 0019CF6C
0019CF3C: 00517B40
0019CF40: 00000001
0019CF44: 60003E97 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 3E97
0019CF48: 03A801C8
0019CF4C: 0019E004
0019CF50: 00000001
0019CF54: 03A801C8
0019CF58: 80000000
0019CF5C: 4152C942
0019CF60: 00000000
0019CF64: 004B250A
0019CF68: 60003EC0 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 3EC0
0019CF6C: 00200206
0019CF70: 00517B40
0019CF74: 00000000
0019CF78: 00000001
0019CF7C: 0019DF94
0019CF80: 00000000
0019CF84: 00000000
0019CF88: 00000012
0019CF8C: 034F9C40
0019CF90: 0019CFFC
0019CF94: 0019DB58
0019CF98: 00010007
0019CF9C: 0019DB58
0019CFA0: 0019D37C
0019CFA4: 774069B4 ? C:\Windows\SYSTEM32\ntdll.dll + 869B4
0019CFA8: 0019D4B0
0019CFAC: 0019DB58
0019CFB0: 0019D0A0
0019CFB4: 0019CFFC
0019CFB8: 03270F70
0019CFBC: 0019D4B0
0019CFC0: 0019DBE4
0019CFC4: 0019DB58
0019CFC8: 773E81E7 ? C:\Windows\SYSTEM32\ntdll.dll + 681E7
0019CFCC: 0019D4B0
0019CFD0: 00010007
0019CFD4: 773E8220 ? C:\Windows\SYSTEM32\ntdll.dll + 68220
0019CFD8: 00010007
0019CFDC: 00000000
0019CFE0: 03A801C8
0019CFE4: 25F9FC78
0019CFE8: 0019DB34
0019CFEC: 001A0000
0019CFF0: 00196000
0019CFF4: 001A0000
0019CFF8: 00196000
0019CFFC: 0019D0C8
0019D000: 34F914E4
0019D004: 4CDF6B6F
0019D008: 0019D0EC
0019D00C: 519A1E2A ? C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_a1e7755eb10c8b98\igc32.dll + A61E2A
0019D010: 34F914E0
0019D014: 3299F858
0019D018: 00000004
0019D01C: 32FB002B
0019D020: 519A0053
0019D024: 3299002B
0019D028: 2B1E0053
0019D02C: 0000002B
0019D030: 0000002B
0019D034: 00000000
0019D038: 00000000
0019D03C: 00000000
0019D040: 00000000
0019D044: 00000000
0019D048: 0019DA28
0019D04C: 00000002
0019D050: 0329837D ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 4837D
0019D054: 00190023
0019D058: 00200202
0019D05C: 0019002B
0019D060: 00010053
0019D064: 0000002B
0019D068: 34F9002B
0019D06C: 00000000
0019D070: 00000000
0019D074: 00000000
0019D078: 00000000
0019D07C: 00000000
0019D080: 0019DA64
0019D084: 00000002
0019D088: 0329837D ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 4837D
0019D08C: 00000023
0019D090: 00200206
0019D094: 0019D2C4
0019D098: 0020002B
0019D09C: 0019D2CC
0019D0A0: 0001002B
0019D0A4: 34F8C07C
0019D0A8: 34F8C020
0019D0AC: 00000000
0019D0B0: 00000000
0019D0B4: 00000000
0019D0B8: 0000001A
0019D0BC: 00000002
0019D0C0: 00000000
0019D0C4: 00000005
0019D0C8: 00020000
0019D0CC: 000201CC
0019D0D0: 00000020
0019D0D4: 00000000
0019D0D8: 0000001C
0019D0DC: 000208FC
0019D0E0: 01410000
0019D0E4: 329C34B0
0019D0E8: 000208F8
0019D0EC: 0019002B
0019D0F0: 00190053
0019D0F4: 773B002B
0019D0F8: 0000002B
0019D0FC: 00000000
0019D100: 00000000
0019D104: 00000000
0019D108: 00000000
0019D10C: 00000000
0019D110: 0019DAF4
0019D114: 00000002
0019D118: 0329837D ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 4837D
0019D11C: 517A0023
0019D120: 00200202
0019D124: 0019D354
0019D128: 0141002B
0019D12C: 4CDF002B
0019D130: 00190053
0019D134: 32C0002B
0019D138: 32C0002B
0019D13C: 00000000
0019D140: 00000000
0019D144: 00000000
0019D148: 00000000
0019D14C: 00000000
0019D150: 0019DB34
0019D154: 00000002
0019D158: 0329837D ? D:\Program Files\MMMerge\ExeMods\MMExtension\lua51.dll + 4837D
0019D15C: 00000023
0019D160: 00200206
0019D164: 0019D394
0019D168: 0000002B
0019D16C: 00000000
0019D170: 00000012
0019D174: 00000002
0019D178: 00000000
0019D17C: 00000041
0019D180: 00020000
0019D184: 0002027C
0019D188: 00000020
0019D18C: 00000000
0019D190: 00000200
0019D194: 000210B4
0019D198: 01410000
0019D19C: 2FD5E128
0019D1A0: 000210B0
0019D1A4: 00000038
0019D1A8: 0019D1CC
0019D1AC: 773BD37E ? C:\Windows\SYSTEM32\ntdll.dll + 3D37E
0019D1B0: 03270F70
0019D1B4: 0019D280
0019D1B8: 00000000
0019D1BC: 00000000
0019D1C0: 00000200
0019D1C4: 00000040
0019D1C8: 00000000
0019D1CC: 00000000
0019D1D0: 51E73D5E ? C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_a1e7755eb10c8b98\igc32.dll + F33D5E
0019D1D4: 01410000
0019D1D8: 00000000
0019D1DC: 00000200
0019D1E0: 00000000
0019D1E4: 0019D1F0
0019D1E8: 51E45642 ? C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_a1e7755eb10c8b98\igc32.dll + F05642
0019D1EC: 00000200
...
PS:My program:Base2023.11.05+Master Branch 2024.07.15

cthscr
Golem
Golem
Posts: 607
Joined: 12 Jan 2020

Re: Might and Magic 6, 7, 8 merge based on mm8 engine. [upd. 05.11.2023]

Unread postby cthscr » Yesterday, 14:08

toadking wrote: Yesterday, 13:48

Code: Select all

60003883 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 3883
...
PS:My program:Base2023.11.05+Master Branch 2024.07.15
Do NOT use 'Program Files' for MMMerge (or vanilla MM6/7/8 with MMExtension) on Windows. It doesn't matter whether it on C: or not - Windows might forbid code alteration.
Put MMMerge somewhere else, set compat and try again.
No crashes for me on clean install of pack 20231105 and commit 51958672 (20240715). (With or without new.lod)

PS. 'Windows Version 6.2' means compat to WinXP SP3 wasn't set.

User avatar
toadking
Peasant
Peasant
Posts: 91
Joined: 22 Jul 2022

Re: Might and Magic 6, 7, 8 merge based on mm8 engine. [upd. 05.11.2023]

Unread postby toadking » Today, 00:57

cthscr wrote: Yesterday, 14:08
toadking wrote: Yesterday, 13:48

Code: Select all

60003883 ? D:\Program Files\MMMerge\ExeMods\MMExtension\MMExtCore.dll + 3883
...
PS:My program:Base2023.11.05+Master Branch 2024.07.15
Do NOT use 'Program Files' for MMMerge (or vanilla MM6/7/8 with MMExtension) on Windows. It doesn't matter whether it on C: or not - Windows might forbid code alteration.
Put MMMerge somewhere else, set compat and try again.
No crashes for me on clean install of pack 20231105 and commit 51958672 (20240715). (With or without new.lod)

PS. 'Windows Version 6.2' means compat to WinXP SP3 wasn't set.
My friend also encountered a similar problem during the game. When the party went to visit the second floor of the house facing Stone Castle, which is the "protection services", the game crashed and exited. After party joined the protection services guild membership to access it again without any problems. I confirmed that the issue can also be reproduced, even the code is added in Quest_Guilds.lua, the game file is in E:\MMMerge\, and compatibility is also set.
After observing these two problems, they have one thing in common: When the party goes to the guild to learn skills before joining, the game will crash and exit. However, the party joined the guild membership to access it again without any problems.
As you said, the problem is not be related to Quest_Guilds.lua, but it cannot be ruled out that the file new.lod(If new.lod exists, this problem hardly occurs). It seems to be related to the code used to determine whether the party has joined the guild when visiting a house, can you tell me where the relevant code is? Thank you again.


Return to “Might and Magic”

Who is online

Users browsing this forum: Strobe and 1 guest