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

SEGV (segfault) on program launch for LARS #824

Closed
hektech opened this issue Dec 2, 2020 · 7 comments
Closed

SEGV (segfault) on program launch for LARS #824

hektech opened this issue Dec 2, 2020 · 7 comments

Comments

@hektech
Copy link

hektech commented Dec 2, 2020

Testing on latest version (1871).

Not expecting anyone else to have this software (LARS), as it is specialty software for library binderies.

Testing on Win10 64bit. When launching, it segfaults a few times, then exits. The main program window does appear, but never populates with anything other than the main menus. (One cannot click the menus to see if they are working; the window is not accessible.)

I am attaching here the terminal output. I will try to get the full trace as requested as soon as possible.

otvdm_lars_error.txt

@hektech
Copy link
Author

hektech commented Dec 2, 2020

Here is the trace as suggested. Thank you for any insight you can offer!

trace.txt

@cracyc
Copy link
Contributor

cracyc commented Dec 2, 2020

161c:Call USER.85: DRAWTEXT(0044,00000010 #0010,ffff,149f:61d8,0025) ret=11ff:2279 ds=149f

Well, 0000:0010 isn't a valid address, that's why it crashes. Windows 3.1 appears to just ignore this error and continue so it might just be an error in the program (but it might not be).

Try https://ci.appveyor.com/project/otya128/winevdm/builds/36629746/job/9av7ev27gt6wb180/artifacts

@hektech
Copy link
Author

hektech commented Dec 2, 2020

You are brilliant. The program can now successfully open. Thank you! Unfortunately, the software is now segfaulting on the next screen. I will try to run another trace in the morning. Maybe it is something similar, maybe not.

@hektech
Copy link
Author

hektech commented Dec 3, 2020

Okay, the debug log was very long, so I truncated it a hundred lines or so before the next fault event. If I cut out something important, please let me know.

trace_segv_2_excerpt.txt

@hektech
Copy link
Author

hektech commented Dec 3, 2020

Okay, I decided to try following the same pattern as the last change, and wrapped the contents of GetTextExtent16() in a __TRY block, returning 0 on error. This seemed to work! Unfortunately, despite a functional result, the resulting build looks nothing like the builds offered here, so I am not very confident in it. I do not really know what I am doing, I've done some Linux dev, but never built anything on Windows before, and basically never used Visual Studio before (other than for the simplest things, and that was years ago). I am going to comment on the build ticket and see if I can get some clarity there.

@cracyc
Copy link
Contributor

cracyc commented Dec 3, 2020

That does appear to be right based on ntvdm behavior so I did it in #826.

@hektech
Copy link
Author

hektech commented Dec 7, 2020

Marking this closed, as I haven't hit any SEGV after these two commits. Thank you for your work on this. Running into different issues now, but will open a new Issue for it.

@hektech hektech closed this as completed Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants