Author Topic: patched PmMerge  (Read 30005 times)

OS4User

  • Sr. Member
  • ****
  • Posts: 406
  • Karma: +10/-0
    • View Profile
patched PmMerge
« on: June 13, 2021, 10:26:39 am »
Any one brave to test ?  :)

http://gus.biysk.ru/os4/pmmerge/

Fixed:
  - a memory leak in a heap
  - missed serialization
  - access to freed memory
  - and many other small issues

Known bugs:
  -  none (so far)

Mike Kölling

  • Full Member
  • ***
  • Posts: 136
  • Karma: +7/-0
    • View Profile
Re: patched PmMerge
« Reply #1 on: June 13, 2021, 12:42:11 pm »
Any one brave to test ?  :)

Just installed on my T430. No problems after restart so far. However I have no clue what pmmerge.dll is for.
Mike

David Graser

  • Hero Member
  • *****
  • Posts: 967
  • Karma: +108/-0
    • View Profile
Re: patched PmMerge
« Reply #2 on: June 13, 2021, 02:27:26 pm »
Installed to my ArcaOs 5.06 with all the latest patches and drivers and using the OS4 kernel.  Works great.

OS4User, I was wondering if you have heard or used NEWCALLS for OS/2 by Carsten Arnold and your opinion of this idea.  I have used it in the past with no adverse effects that I could see.  I am running the patch with your modified pmmerge.dll without any seen adverse effects so far.

http://ca-arnold.de/download/newcalls104.zip

patch for pmmerge.dll

The file PMMERGE.DLL opens the INI files with the flag
OPEN_FLAGS_WRITE_THROUGH which has the consequence that these files
are written uncached to the HD, so that the WPS is blocked partially
quite a long while. IBM made for exaggerated safety reasons,
in my opinion that is not necessary.

This Tool goes back on an idea from Peter Fitzsimmons.

At this the module entry DOSCALLS will replaced in pmmerge.dll by NEWCALLS.
The NEWCALLS.DLL contains so-called Forwarder on all functions in DOSCALLS
except DOS32OPEN, this function its by own _DOS32OPEN replaced.
If opening files, _DOS32OPEN removes the flag
OPEN_FLAGS_WRITE_THROUGH and calls then DOS32OPEN in DOSCALLS.

I wrote now a Installer and shortened the file NEWCALLS.DLL somewhat
(no, there now nothing is missing;-)).

Supplementary product like DLLRNAME are more necessary.


Installation:
Start the Install.exe without parameter.
The Installer checks the file PMMERGE.DLL and looks for the entry DOSCALLS.

Then it copies file NEWCALLS.DLL into the directory X:\OS2\DLL, whereby X is
the boot drive.

Since the file PMMERGE.DLL normally in use and thus to write is locked,
the installer unlock the DLL. Now the entry is replaced DOSCALLS by NEW CALLS.

So that the modification becomes effective, a Reboot is necessary.
It is not enough to start the WPS again.


If against expect it to disturbances comes, you can deinstall NEWCALLS also
again. Start InstNC.exe with the parameter /DeInst. The module entry NEWCALLS
is replaced again through DOSCALLS and the file NEWCALL.DLL is deleted.
A restart of the system becomes also here necessarily.

This program is freeware.

« Last Edit: June 13, 2021, 03:02:18 pm by David Graser »

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +24/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: patched PmMerge
« Reply #3 on: June 13, 2021, 03:08:25 pm »
I was wondering if you have heard or used NEWCALLS for OS/2 by Carsten Arnold and your opinion of this idea.  I have used it in the past with no adverse effects that I could see.

And no benefits either. This was written 20 years ago when the author was probably running a P233 with 64mb and an IDE drive. What are you running today? Likely, something that's 20+ times faster. If say, WinOS/2, used to take 7 seconds to open and nowadays it opens instantly, what are the chances that a write to 'os2.ini' still has any meaningful impact on performance?

David Graser

  • Hero Member
  • *****
  • Posts: 967
  • Karma: +108/-0
    • View Profile
Re: patched PmMerge
« Reply #4 on: June 13, 2021, 03:17:20 pm »
Thanks Rich for the feedback.

Rich, what is your opinion on this patch?  The last time I checked, ArcaOS was still using build 14.006.

http://hobbes.nmsu.edu/download/pub/os2/system/patches/PMFIX.zip

THIS INFORMATION IS WITHOUT ANY WARRANTY. USE AT YOUR OWN RISK.
I AM NOT RESPONSIBLE FOR ANY DAMAGE CAUSED BY USING THIS PACKAGE.


This package contains 2 Fixes to PMMERGE.DLL Build 14.006.
This build was released by IBM as pj31908 and is also part of many ECS 2.0 
and ECS 2.1 releases.

DESCRIPTION
FIX1: SYS3171 (Stack Overflow) on PMSHELL.EXE and others.

When clicking on an inactive program to get focus on it, the program crashes.
This behaviour is mainly seen when running VPC as host.
When starting several programs by fastly clicking on their icons PMSHELL may die.
A reboot is necessary to get the system back to life.

The cause for this behaviour is within function CallOemPointer.
It is used to send drawing commands to the graphics system.
Under certain conditions, this function calls WIN32SENDMSG.
If the function was called as a result of message processing, a loop may be established.
This causes the stack to be filled within the loop, ending with SYS3171.

The file named PM_SYS3171 patches CallOemPointer to not call SENDMSG anymore.
This behaviour is similar to PMMERGE Builds 14.095 and earlier.
Side effect may be lost mouse clicks when system is busy but I use this Patch
for over a Year now with no noticeable drawbacks.


FIX2: USING PM_SystemFonts->DefaultFont CHANGES ALL FORM SIZES

When setting PM_SystemFonts->DefaultFont to anything smaller than SystemProportional
many other forms (such as the settings pages of the WPS) have too small text items.
Also the height of titlebars on all windows is changed. 

The file named PM_DEFFONT patches the initial processing of pmmerge to using fixed
fontsize (using the values from SystemProportional).
So don't use this patch if you are pleased using the DefaultFont setting already.
Side effect: The IBM Help Viewer looks strange, don't know why.
Use NewView instead.



HOW TO APPLY THIS FIX

1. Make shure, you are using PMMERGE.DLL 14.106 using bldlevel utility.

2. Make a bakup of your original PMMERGE.DLL

3. Make shure that you are able to boot from disc or maintainance partition.
   Be shure! You cannot start the system with a corrupted PMMERGE!

4. Get lxlt133 from the web and unpack it into a temporary directory.
   On ECS 2.1 lxlite is already installed.

5. Copy PMMERGE.DLL to the temporary directory.

6. Expand PMMERGE.DLL using lxlite.exe, file size should be 1754169 bytes.

7. Copy the *.PAT files to the temporary directory.

8. Run PATCH.EXE PM_SYS3171.PAT /A to apply fix1

9. Run PATCH.EXE PM_DEFFONT.PAT /A to apply fix2
« Last Edit: June 13, 2021, 03:22:26 pm by David Graser »

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: patched PmMerge
« Reply #5 on: June 13, 2021, 03:44:39 pm »
I have both of Holger's patches applied since years. I never noticed a problem without and with fix 1, but since the Mozilla times it was hard to say what really caused the countless crashes.

I recommend fix 2, because then dialog sizes adjust perfectly to a set font for PM_SystemFonts -> DefaultFont. (This value is usually unset, which defaults. to 10.System Proportional. I've mine set to 9. WarpSans.

The only problem is that IBM's view.exe has problems with that and e.g. the buttons are resized, but their font don't fit in the reduced size. That app doesn't seem to comply with PM rules. (Holger already has mentioned this problem in the readme.)

In eCS times Alex wrote that Asian fonts have problems with this patch. That's probably the main reason why it didn't make it into a later eCS.

OS4User

  • Sr. Member
  • ****
  • Posts: 406
  • Karma: +10/-0
    • View Profile
Re: patched PmMerge
« Reply #6 on: June 13, 2021, 05:40:25 pm »
OS4User, I was wondering if you have heard or used NEWCALLS for OS/2 by Carsten Arnold and your opinion of this idea.

I have not seen it before and  just checked it.   And  so far agree with Rich - it does not have big sense now,  however can be easily added to  discussed pmmerge.

OS4User

  • Sr. Member
  • ****
  • Posts: 406
  • Karma: +10/-0
    • View Profile
Re: patched PmMerge
« Reply #7 on: June 13, 2021, 05:43:13 pm »
No problems after restart so far. However I have no clue what pmmerge.dll is for.
Mike

tnx for testing.  pmmerge.dll  is a main dll which contains  code of Presentation Manager. 

David McKenna

  • Hero Member
  • *****
  • Posts: 815
  • Karma: +25/-0
    • View Profile
Re: patched PmMerge
« Reply #8 on: June 13, 2021, 06:04:21 pm »
 Been running this test PMMERGE.DLL for a couple hours now and it seems OK. One thing I notice is a 3 note beep from the system speaker right when the desktop appears at boot. This doesn't happen when using the ArcaOS PMMERGE. Not sure if this is a signal from the test version, or some other system component complaining...

OS4User

  • Sr. Member
  • ****
  • Posts: 406
  • Karma: +10/-0
    • View Profile
Re: patched PmMerge
« Reply #9 on: June 13, 2021, 06:26:12 pm »
One thing I notice is a 3 note beep from the system speaker right when the desktop appears at boot.

this is a signal from the test version  :)

Eugene Tucker

  • Sr. Member
  • ****
  • Posts: 403
  • Karma: +15/-0
    • View Profile
Re: patched PmMerge
« Reply #10 on: June 13, 2021, 07:24:56 pm »
OS4User it is running without problem on my machine as well. I wil keep shaking it down and let you know.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5026
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: patched PmMerge
« Reply #11 on: June 14, 2021, 01:47:05 am »
... However I have no clue what pmmerge.dll is for.
Hi Mike

At EDM/2 we try to document each OS/2 file. Here it is more information about PMMERGE.DLL.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

David Graser

  • Hero Member
  • *****
  • Posts: 967
  • Karma: +108/-0
    • View Profile
Re: patched PmMerge
« Reply #12 on: June 14, 2021, 02:55:14 am »
I play around with a lot of graphics.  At some point I always have a hang.  PMView would lock the system or FM/2 would lock the system occasionally when I had several instances of PMView opened along with iconedit.  So far, I am not seeing this with the patched PMMerge.dll

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1355
  • Karma: +26/-0
    • View Profile
Re: patched PmMerge
« Reply #13 on: June 14, 2021, 03:00:37 am »
Hello OS4USER,

Any one brave to test ?  :)

http://gus.biysk.ru/os4/pmmerge/
...

Alright...got a problem to report.

So during the boot the normal BLUE screen right before transition to WPS happens is missing, the displays actually go black as if the video signal is cut off, then by the time both displays come back I go straight into the WPS Desktop. Normally this only happens after the BLUE screen pops up, a little clock-icon after and than WPS is up.

Weird, but OK so far.

The problem is that attempting to run Lucide right after (repeated this twice) gives me a non-responsive WPS. Only CAD-Helper gets me out of the problem, the Re-boot option that is.

I haven't tried any other apps yet since I figured I would report this first and test any other specifics you might be interested in?

FYI, this is a 4.52 SMP setup (6-core AMD CPU), 202 kernel, latest ACPI, SNAP drivers, dual-screen (1920x1200 x 2).

Thanks!

Mike Kölling

  • Full Member
  • ***
  • Posts: 136
  • Karma: +7/-0
    • View Profile
Re: patched PmMerge
« Reply #14 on: June 14, 2021, 11:55:41 am »
No problems after restart so far. However I have no clue what pmmerge.dll is for.
Mike

tnx for testing.  pmmerge.dll  is a main dll which contains  code of Presentation Manager.

Thanks for the information about pmmerge.dll.
Martin, - also thanks to you for information about the dll.

Put it also in my TP X250 today (with AOS) - runs there as well as on my T430.

Mike