-
Notifications
You must be signed in to change notification settings - Fork 152
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
Interrupt 0D #GP error dialog when printing in LARS #836
Comments
The problem is likely with a print dialog hook or template. Fixing it will be pretty much impossible without access to the program as the trace is too vague. |
Thank you again for looking into this. I am hoping we can work out a way to proceed. First, I could supply a copy of software somehow if you are interested. I am not sure how far you could get in actually running it, since the configuration is complex and bindery specific, but if access to the files is all that matters, we can make that work. Otherwise, with some pushes in the right direction, I can put in the necessary work to get whatever you might need. Would additional debug statements help anything? Or what else should I look for? For context, I am primarily a Unix sysadmin who has done a large amount of client/server programming in Perl, with basic knowledge of other common languages. I have effectively zero Windows programming experience. So, while this is all quite foreign (and generally lower level than I have worked from a programming perspective), we aren't starting from zero 😄 |
Don't necessarily need to run it, just a copy of the exe to analyze. |
Well that's easy! Hope it gives you what you need. |
cracyc, thank you again for you efforts. Unfortunately, this change does not appear to have made a difference. I am attaching a new trace which includes completing the print and then exiting the program. I am doing this because, after printing, the program will crash when trying to exit. The surface behavior is very similar, a series of interrupts. I thought it might provide another angle on the problem, if the cause ends up being related. Hope there might be some more insight gained. |
Well, I can see what's happening just not why. Note it uses MFC20, source can be seen at https://github.com/DigitalMars/dmc/tree/master/mfc/SRC/16-BIT.
Setwindowshookex is called to prepare the dialog call then printdlg is called at https://github.com/DigitalMars/dmc/blob/master/mfc/SRC/16-BIT/DLGPRNT.CPP#L118. The wm_nccreate message ends up in https://github.com/DigitalMars/dmc/blob/master/mfc/SRC/16-BIT/WINCORE.CPP#L274 where the hwnd is bound to a cwnd class and the hook is removed. The wm_setfont message is handled in https://github.com/DigitalMars/dmc/blob/master/mfc/SRC/16-BIT/DLGCORE.CPP#L34 where the cwnd class is retrieved but the hwnd is different (the nccreate message hwnd16 is 0xc5 while the setfont one is 0xc7). The 0xc7 hwnd has no cwnd so it crashes when it tries to use it. I've tried other programs that use mfc and none seem to have this problem so I don't know what is different about yours. |
Have you had a chance to test this yet? |
The pr needs to be rebased but the artifact is still there for testing. |
Sorry for the very long delay in replying. The rhythm of the academic year pulled me away from the project for a little while. So, I tested this quickly way back in December, and did not see any improvement. However, that was fairly long ago, and I wanted to be more confident in that assertion, so I decided to test it fresh yesterday. However, oddly enough I could no longer recreate the problem I was experiencing! I could do so neither on the linked build (1900), nor on an older build without this patch. I do not know what to make of it overall. Obviously, the computer has received regular updates and restarts over the last few months, so something could have changed. Is there any real chance the problem was somehow state related? At any rate, I did not see improvement with this patch back in December, but I also no longer have the problem now. Unless it comes back, or someone has an idea on making it come back for testing, I think we should consider this issue to be invalid with no necessary changes. Thank you, once more, for all of your work on this project. It is a huge help for us. |
I'm quite sure the patch was on the right track even if it wasn't entirely correct. Since the problem was in the behavior of msctf in windows 10 I wouldn't be surprised if microsoft made some change the solved or at least hid the problem. Anyway, if it's working you should close this issue. |
Okay, will do so now. Fingers crossed. |
Using build version 1888.
When attempting to print reports in LARS (library bindery software), a series of "Interrupt 0D #GP" dialogs appear several times (I believe 3 times). If you "continue" through the prompts, the print dialog does appear, but the eventual printer output is garbled (lines are squashed).
Tests were then performed with EnumFontLimitation=1. The Interrupts still occur, but the printer output was correct. Additional testing might be needed to determine whether the output changes were chance related, or if the EnumFontLimitation=1 was effective.
In both cases, however, the program can no longer exit properly after printing. Attempts to exit lead to more Interrupt prompts, then an abnormal program termination prompt.
Attaching a trace which contains the initial print-related prompts, but with print then canceled, and no subsequent crash on exit.
trace_int.txt
The text was updated successfully, but these errors were encountered: