-
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
Error when displaying images, LoadImage16 #1380
Comments
I found a demo of this at https://www.apbenson.com/cyrillic-downloads but I can't reliably repo this problem. It doesn't happen at all when I load the examples and happened only once when creating a new file. I do get the loadimage error but I think it's unrealated. I could be missing something because I don't know how to use this program. I do get a crash at exit every time though. |
I'm getting the crash, too, however only when using the demo version. cracyc I've shared a repo with you, please have a look. |
So far I've found that they disappear if the window is larger than about 2075px width or 915px height. It's likely a bug in the program as very few win16 developers expected to support displays that large. The demo version has the width program but not the height oddly. Print preview doesn't show the icons in either version no matter the size and although printing works (as long as you don't use the adjustdpi option). |
The bug triggers as well when having the window resized to smaller dimensions by using the zoom function. |
It also works in winevdm without the issues in an xp vm but the bug is still in the program itself. Specifially, it uses MM_TWIPS which on large resolution and physical displays can overflow (the vm reports a smaller physical display size which is why it works there. |
Sadly, the new gdi.exe didn't help and the problem prevails. |
By the way, i see from the trace that you have a 1920x1080 display but how large is it? |
This gdi.exe does still not work. Even if I leave the program window at a normal size (not maximized), when zooming inside the program, the images will disappear at certain zoom levels (too large but also too small). My PC has three screens attached: |
I found a fix that works for me that is safer. You can get it to try from https://ci.appveyor.com/project/otya128/winevdm/builds/49450326/job/mqtgdyr60425wo00/artifacts . |
Wow! It seems to work flawlessly. How did you do that? What was the reason for this bug, do you care to expain it in a bit more detail? Thanks anyway. I am very happy and will be testing this build thoroughly. |
Well, it uses windows coordinate transformations, https://learn.microsoft.com/en-us/windows/win32/gdi/coordinate-spaces-and-transformations, to simplify zooming but in some cases, mostly with larger physical displays, the output overflows a 16bit int as win32 uses 32bits for the coordinates. In the other gdi.dlls I tried changing the mapping mode to reduce the size of the multiplier but the last change just clamps the output to [-32768, 32767]. |
clamp world transform coordinates to 16 bits. #1380
Describe the bug
The software I'm running (genetics pedigree program Cyrillic2) will display images, but upon clicking on the user interface, all images will become blank. Upon clicking on individual images, the LoadImage16 error messages will appear (see log below) and each individual image will be displayed.
Expected behavior
Display images correctly.
Screenshots
Environment (please complete the following information):
Additional context
I did not install otvdm as I am running a single exe file. I start the software with
otvdm cyrillic.exe
from a batch file.I have already applied a variety of settings in otvdm.ini, to no avail.
Trace
Note: trace is redacted for personal information
trace.txt
The text was updated successfully, but these errors were encountered: