[Bug 59541] New: replacing bass.dll with samp.dll causes freeze/black screen under wine . dll works fine under windows
http://bugs.winehq.org/show_bug.cgi?id=59541 Bug ID: 59541 Summary: replacing bass.dll with samp.dll causes freeze/black screen under wine . dll works fine under windows Product: Wine Version: 11.4 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@list.winehq.org Reporter: cnc3onlinekw@proton.me Distribution: --- Created attachment 80582 --> http://bugs.winehq.org/attachment.cgi?id=80582 wine log samp.dll is a dll that allows you to load custom mp3 music in the game plants vs zombies you remove bass.dll from the game's exe directory , replace it with samp.dll and name it bass.dll and you also place bass_b_2.dll in the same dir. the dll works fine on windows but when run in it Linux under wine the game freezes with a black screen. the dll files can be found in this archive: https://drive.google.com/drive/folders/1XlbpA8rLcUisRyuMXC027C7uqyaPW_Gi. IMPORTANT NOTE: samp.dll IS NOT THE SAME AS THE GTA SAN ANDREAS DLL. IT IS COMPLETELY UNRELATED -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 cnc3onlinekw@proton.me changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|replacing bass.dll with |replacing bass.dll with |samp.dll causes |samp.dll causes |freeze/black screen under |freeze/black screen under |wine . dll works fine under |wine . samp.dll works fine |windows |under windows -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 --- Comment #1 from cnc3onlinekw@proton.me --- Created attachment 80583 --> http://bugs.winehq.org/attachment.cgi?id=80583 this is the wine log after changing the "App can handle > 2gb address space " in PlantsVsZombies.exe in cff exploer -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 cnc3onlinekw@proton.me changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80583|this is the wine log after |this is the wine log after description|changing the "App can |changing the "App can |handle > 2gb address space |handle > 2gb address space |" in PlantsVsZombies.exe in |" flag in |cff exploer |PlantsVsZombies.exe in cff | |exploer -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 --- Comment #2 from cnc3onlinekw@proton.me --- Created attachment 80584 --> http://bugs.winehq.org/attachment.cgi?id=80584 this a file written by samp.dll it appears that the mp3 files that samp.dll is trying to load as shown in debugs.txt are enormous this doesn't happen on windows. very strange behaviour indeed -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 cnc3onlinekw@proton.me changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #3 from cnc3onlinekw@proton.me --- The problem was check for some proprietary microsoft font . i replaced it with no ops and it works flawlessly. here it is : https://drive.google.com/drive/folders/1Kqmhv_bq_BWN8G9xholX2gj54YfJH5Bj?usp.... just drop these two dlls in rename samp-fixed.dll to bass.dll and you are good to go -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 Alexandre Julliard <julliard@winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #4 from Alexandre Julliard <julliard@winehq.org> --- Closing bugs fixed in 11.5. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 LingM <lingm+winebz@posteo.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lingm+winebz@posteo.org --- Comment #5 from LingM <lingm+winebz@posteo.org> --- Hex editing the software you use isn't exactly a fix from the wine perspective. Since you mention Microsoft fonts, does "winetricks corefonts" maybe work around the problem as well? That would make this another duplicate of bug 32342. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 --- Comment #6 from cnc3onlinekw@proton.me --- (In reply to LingM from comment #5)
Hex editing the software you use isn't exactly a fix from the wine perspective. Since you mention Microsoft fonts, does "winetricks corefonts" maybe work around the problem as well? That would make this another duplicate of bug 32342.
. Well it wasn't really a wine problem. I stupidly assumed it was and submitted it only to realize that it had a function that was checking for a specific segoescript font and if it didn't find the dll exited and PlantsVsZombies.exe froze. I stepped through with a debugger found the useless function replaced it with nops and it works.The dll doesn't need the font by the way. I don't know why that function was there in the first place and i don't care. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 --- Comment #7 from cnc3onlinekw@proton.me --- (In reply to cnc3onlinekw from comment #6)
(In reply to LingM from comment #5)
Hex editing the software you use isn't exactly a fix from the wine perspective. Since you mention Microsoft fonts, does "winetricks corefonts" maybe work around the problem as well? That would make this another duplicate of bug 32342.
. Well it wasn't really a wine problem. I stupidly assumed it was and submitted it only to realize that it had a function that was checking for a specific segoescript font and if it didn't find the dll exited and PlantsVsZombies.exe froze. I stepped through with a debugger found the useless function replaced it with nops and it works.The dll doesn't need the font by the way. I don't know why that function was there in the first place and i don't care.
fixing the problem by installing proprietary microsoft fonts is not the solution since the program doesn't need them and having users install proprietary fonts for no good reason is not a good thing in my opinion and we should instead push users towards solution that do not require proprietary components -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 --- Comment #8 from LingM <lingm+winebz@posteo.org> --- Presumably this DLL works on Windows out-of-the box, right? If Windows ships the font and a program relies on it being present, then Wine should provide some kind of compatibility. Even if - at least as a first approximation - it's a dummy font that falls apart if it's actually used. Installing proprietary components is never the solution, but it can give pointers which component is at fault and tbh it's a better workaround than downloading binaries from random people on the internet. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 --- Comment #9 from tolis <cnc3onlinekw@proton.me> --- (In reply to LingM from comment #8)
Presumably this DLL works on Windows out-of-the box, right? If Windows ships the font and a program relies on it being present, then Wine should provide some kind of compatibility. Even if - at least as a first approximation - it's a dummy font that falls apart if it's actually used.
Installing proprietary components is never the solution, but it can give pointers which component is at fault and tbh it's a better workaround than downloading binaries from random people on the internet.
counter point: the only way to get samp.dll is to get off of random archives by people on the internet if the uesr is fine with downloading the stock samp.dll from a rando on the internet then they are probably also fine with downloading my modified version and also yes i have tested the unpatched dll on windows and it works. also if you don't trust me go into x32dbg with wine run plantsvszombies.exe set a breakpoint on adress 0x03D8B95D and then you will some call.jnebass something idk . this is the bad function you just fill it with no ops that's all i did. compare the hashes and see if i am lying to ya -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 tolis <cnc3onlinekw@proton.me> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cnc3onlinekw@proton.me -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 Zeb Figura <z.figura12@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|replacing bass.dll with |Plants vs Zombies mod |samp.dll causes |"samp.dll" freezes with |freeze/black screen under |black screen |wine . samp.dll works fine | |under windows | Resolution|FIXED |--- Status|CLOSED |UNCONFIRMED --- Comment #10 from Zeb Figura <z.figura12@gmail.com> --- This should not have been marked FIXED; nothing was fixed in Wine. What is the name of the font that the mod needs? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 --- Comment #11 from tolis <cnc3onlinekw@proton.me> --- (In reply to Zeb Figura from comment #10)
This should not have been marked FIXED; nothing was fixed in Wine.
What is the name of the font that the mod needs?
I WAS A DUMBASS. THE BUG IS WITH THE SOFTWARE. WINE DIDN'T NEED TO FIX ANYTHING. BUT if you insist the name of the font is segoescript.ttf or something. but i really wouldn't call installing it a fix since THE FONT IS NOT PROVIDED BY WINE COREFONTS PACKAGE AND the only way to obtain it is THROUGH A RANDOM WEBSITE OR A WINDOWS VM. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 --- Comment #12 from tolis <cnc3onlinekw@proton.me> --- The crash is caused by the software by an uninitialized pointer. see this do while loop: do { piVar3 = (int *)FUN_00463124(*(int *)PTR_DAT_0046e068,uVar6,uVar5); (**(code **)(*piVar3 + 0xc))(piVar3,iVar9,&local_54); thunk_FUN_00406154(local_54,(int *)L"Segoe Script"); if ((bool)uVar11) { DAT_004744d4 = '\x01'; } iVar9 = iVar9 + 1; iVar4 = iVar4 + -1; uVar11 = iVar4 == 0; uVar5 = extraout_ECX_07; uVar6 = extraout_EDX_05; } while (!(bool)uVar11); at the end of the loop Ivar4 becomes 0 and uVar11 gets set 1 and the program exits and DAT_004744d4 never gets set to 1 by the if statement . next we have this broken if statement that always executes as a result of if ((bool)uVar11) { DAT_004744d4 = '\x01'; } never succeeding : if (DAT_004744d4 == '\0') { FUN_00427690(*(int **)(*(int *)(*(int *)PTR_DAT_0046e000 + 900) + 100),(LPCSTR)L"MS Sans Serif") ; FUN_00427690(*(int **)(*(int *)(*(int *)PTR_DAT_0046e000 + 0x388) + 100), (LPCSTR)L"MS Sans Serif"); }. the problem with this is that it uses an uninitialized pointer leading to an exception code : EXCEPTION_ACESS_VIOLATION. The software is broken removing the if statement and always setting DAT_004744d4 = '\x01';. fixes the problem because the bad code never runs and the program continues normally -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 --- Comment #13 from tolis <cnc3onlinekw@proton.me> --- (In reply to tolis from comment #12)
The crash is caused by the software by an uninitialized pointer. see this do while loop: do { piVar3 = (int *)FUN_00463124(*(int *)PTR_DAT_0046e068,uVar6,uVar5); (**(code **)(*piVar3 + 0xc))(piVar3,iVar9,&local_54); thunk_FUN_00406154(local_54,(int *)L"Segoe Script"); if ((bool)uVar11) { DAT_004744d4 = '\x01'; } iVar9 = iVar9 + 1; iVar4 = iVar4 + -1; uVar11 = iVar4 == 0; uVar5 = extraout_ECX_07; uVar6 = extraout_EDX_05; } while (!(bool)uVar11); at the end of the loop Ivar4 becomes 0 and uVar11 gets set 1 and the program exits and DAT_004744d4 never gets set to 1 by the if statement . next we have this broken if statement that always executes as a result of if ((bool)uVar11) { DAT_004744d4 = '\x01'; } never succeeding : if (DAT_004744d4 == '\0') { FUN_00427690(*(int **)(*(int *)(*(int *)PTR_DAT_0046e000 + 900) + 100),(LPCSTR)L"MS Sans Serif") ; FUN_00427690(*(int **)(*(int *)(*(int *)PTR_DAT_0046e000 + 0x388) + 100), (LPCSTR)L"MS Sans Serif"); }. the problem with this is that it uses an uninitialized pointer leading to an exception code : EXCEPTION_ACESS_VIOLATION. The software is broken removing the if statement and always setting DAT_004744d4 = '\x01';. fixes the problem because the bad code never runs and the program continues normally
and this is what the patched loop looks like in ghidra : do { piVar3 = (int *)FUN_00463124(*(int *)PTR_DAT_0046e068,uVar6,uVar5); (**(code **)(*piVar3 + 0xc))(piVar3,iVar9,&local_54); thunk_FUN_00406154(local_54,(int *)L"Segoe Script"); DAT_004744d4 = '\x01'; iVar9 = iVar9 + 1; iVar4 = iVar4 + -1; uVar5 = extraout_ECX_07; uVar6 = extraout_EDX_05; } while (iVar4 != 0);. notice that the if statement is removed and we instead just set DAT_004744d4 equal to 1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 --- Comment #14 from tolis <cnc3onlinekw@proton.me> --- CASE AND POINT : If windows were ever to remove this font for any reason Buggy code of the program would execute thus leading to a crash. ACTUALLY FIXING THE SOFTWARE IS BETTER FOR USERS LONG TERM. SO STOP ASKING FOR ANOTHER SOLUTION. THERE IS NO OTHER PROPER SOLUTION TO THIS PROBLEM. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 --- Comment #15 from tolis <cnc3onlinekw@proton.me> --- (In reply to tolis from comment #14)
CASE AND POINT : If windows were ever to remove this font for any reason Buggy code of the program would execute thus leading to a crash. ACTUALLY FIXING THE SOFTWARE IS BETTER FOR USERS LONG TERM. SO STOP ASKING FOR ANOTHER SOLUTION. THERE IS NO OTHER PROPER SOLUTION TO THIS PROBLEM.
fixing the broken dll not only helps people using wine but also windows users because microsoft can remove that font any time without warning. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59541 --- Comment #16 from Nikolay Sivov <bunglehead@gmail.com> --- It's not broken if it's working on all supported Windows configurations. A lot of applications depend on specific fonts, and it's unlikely to be removed in future Windows releases. There is no benefit to run patched dll on Windows, if it already works. But, if this really helps running on Wine, it shows where the problem is. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla