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

The Dialer on OS/2 crashes on startup #152

Open
Tracked by #8
davidrg opened this issue Feb 1, 2023 · 0 comments
Open
Tracked by #8

The Dialer on OS/2 crashes on startup #152

davidrg opened this issue Feb 1, 2023 · 0 comments
Labels
bug dialer The old Zinc dialer app OS/2 Kermit/2 only (or required for OS/2 support)
Milestone

Comments

@davidrg
Copy link
Owner

davidrg commented Feb 1, 2023

The Dialer now builds "fine" for OS/2 with OpenWatcom. setenv.cmd will add Zinc to the include and lib paths, and \kermit\dialer\mkos2.cmd will do a build. There is also \kermit\dialer\mkos2.bat for cross-compiling from Windows which Github Actions runs on every build.

But the Dialer doesn't actually work on OS/2 right now. The resulting binaries just crash on startup under Warp 4 Fixpak 15 (The Kermit 95 2.1.2 dialer works fine on this VM). A little investigation with a debug build and the OpenWatcom debugger suggests its failing at zinc\include\ui_win.hpp:1751 which is part of UIW_PULL_DOWN_MENU:

	static UI_WINDOW_OBJECT *New(const ZIL_ICHAR *name,
		ZIL_STORAGE_READ_ONLY *file = ZIL_NULLP(ZIL_STORAGE_READ_ONLY),
		ZIL_STORAGE_OBJECT_READ_ONLY *object = ZIL_NULLP(ZIL_STORAGE_OBJECT_READ_ONLY),
		UI_ITEM *_objectTable = ZIL_NULLP(UI_ITEM),
		UI_ITEM *_userTable = ZIL_NULLP(UI_ITEM))
		{ return (new UIW_PULL_DOWN_MENU(name, file, object, _objectTable, _userTable)); }

I'm not sure where this code is being called from or why its failing on OS/2 when built with Watcom at the moment. Perhaps it would fail when built with ICC too but I don't have access to that. Rebuilding OpenZinc didn't fix it, nor did rebuilding OpenZinc with the /bm (multithreaded runtime) compiler option. At this stage I'm not sure if its an OpenZinc bug, a Dialer bug, some issue with the way I'm building the dialer (linker script could be wrong?), or some other issue.

Further investigation in late 2024 found it to be crashing when creating a new SERVICE_MANAGER, with the crash seeming to happen somewhere in Zinc:
image

An attempt to debug this further with a version of zinc built with -bm -d3 (multithreaded runtime libraries, debugging) resulted in it crashing somewhere else. I've not been able to get the Open Watcom debugger to show me where its crashing in the source view.

At this stage I've no idea what the cause is or if the problem is something in the dialer, something in zinc, or an issue with the way the two are being built. I've compared the OpenZinc code with what was used to build the dialer in the retail release of K95 and see no differences that seem likely to be the cause, so it seems less likely to be an issue somewhere in OpenZinc.

A minimal version of Zinc can be built on OS/2 with OpenWatcom by doing the following:

cd zinc
cleanall.bat
cd source
wmake -f ow19.mak os2
cd ..
cd design
cd service
wmake -f ow19.mak os2
cd ..
cd direct
wmake -f ow19.mak os2
cd ..
cd storage
wmake -f ow19.mak os2
cd ..
cd ..

The libraries end up in zinc/lib/ow19. To modify the build parameters (eg, to build with the multithreaded runtime), macros such as OS2_CPP_OPTS will need to be adjusted in these makefiles:

  • /zinc/source/ow19.mak
  • /zinc/design/service/ow19.mak
  • /zinc/design/direct/ow19.mak
  • /zinc/design/storage/ow19.mak
@davidrg davidrg added this to the OS/2 milestone Feb 1, 2023
@davidrg davidrg changed the title Get the Dialer building Fix the Dialer on OS/2 Feb 3, 2023
@davidrg davidrg added the bug label Feb 3, 2023
@davidrg davidrg changed the title Fix the Dialer on OS/2 The Dialer on OS/2 crashes on startup Feb 3, 2023
@davidrg davidrg added the OS/2 Kermit/2 only (or required for OS/2 support) label May 5, 2023
@davidrg davidrg mentioned this issue Oct 8, 2024
@davidrg davidrg added the dialer The old Zinc dialer app label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dialer The old Zinc dialer app OS/2 Kermit/2 only (or required for OS/2 support)
Projects
None yet
Development

No branches or pull requests

1 participant