Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / Crash when setting display resolution to max screen width or higher

Author
Message
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 1st Aug 2007 03:55 Edited at: 1st Aug 2007 05:18
This code example uses IanM's Matrix1Util 13 plugin to detect client resolution.

When the window is maximized or resized (by hand) to the maximum screen width or beyond the program will crash.

I tested this on my desktop (1680x1050) and my laptop (1280x800) and can confirm this problem.

Alquerian brought this to my attention when he tried to maximize my program or resize the window onto his second monitor.



http://3dfolio.com
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 1st Aug 2007 23:32 Edited at: 1st Aug 2007 23:33
That does indeed crash on me everytime. I modified your test code to manually set the display mode to 1024x768 and it worked fine. I also changed my project to a windowed 640x480x32 app, then manually resized/stretched the windows accross 2 screens, which worked fine, maximizing or double clicking the title bar of the window both produced crashes. Additionally, setting a window to 2048x768 (dual monitors running 1024x768) causes a crash as does 1200x768. The funny thing is that 1025x768 doesn't crash, even though it is beyond the scope of the primary display (1024x768).

Visit the Wip!
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 2nd Aug 2007 12:09
Same here, but this won't get looked at until you post an example not using a 3rd party plugin.

Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 2nd Aug 2007 16:26 Edited at: 2nd Aug 2007 17:27
What difference does it make? I've proved a bug in DBP independant of whatever plugin I used. I could have used BlueGUI or made some other dll call.

Here is an example using user32.dll instead. Compile using Windowed Fullscreen.



I don't think DBP takes into account the maximum resolution supported by the video card. It only considers the maximum screen resolution of the first monitor.

http://3dfolio.com
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 2nd Aug 2007 19:53
Quote: "First of all, the second version using user32.dll does not crash here."


Nor here.

I've just tried minimising, maximising, restore down and closing in various orders. Also tried switching between several applications - still no crash. Works smoothly.
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 2nd Aug 2007 20:32
Like clockwork, his new example crashed whether I maximized or double clicked the titlebar.

Visit the Wip!
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 2nd Aug 2007 20:52 Edited at: 3rd Aug 2007 02:11
The reason for different people experiencing different results is tricky but I'll try to explain it as clearly as possible.

In the beginning my computer did not crash when I maximized the window (don't worry, I'll explain why in a bit) but Alquerian's did. Maximizing the window is a simple and unobtrusive action that is uniform across all Windows OSs, right? Well, not exactly.

Alquerian is running his desktop with the Windows XP theme. I'm running Windows XP with the classic theme. If you compare themes you'll notice that with the Windows XP theme windows hug the edge of the screen whereas with the classic theme there is a locked resize border surrounding the window. The Windows XP default theme does not have this border. This can be proved by comparing the default behavior and a second example where I've limited the window resolution to be within the screen resolution.



Even though in the second image the window looks smaller it is in fact full screen. The border simply does not exist in the Windows XP default theme. To make the window border hug the edge of the screen the window is clipped 4 pixels in all directions which does in fact render the window larger than the maximum full screen resolution. In the case of Windows XP's classic theme this is not the default behavior.

For Windows XP's classic theme the default behavior is to draw the window border around the window while it is maximized. This is however, altered when a second monitor is installed. I confirmed this by installing Maxivista and created a multi-monitor setup between my desktop and my laptop. For some reason when this change occurs Windows XP will alter the window borders to hug the edge of the screen, even while using the Windows XP classic theme.




As these two examples show this does in fact render the maximized window larger than the maximum screen resolution. This is what made my program start to crash on my computer.

With all of this in mind I think it's safe to assume that this bug is capable of causing crashes on those running Windows XP with the default theme, those with multiple monitors, those who run alternate system shells such as DesktopX and Litestep, those who run alternate window themes using Window Blinds or other programs, and others.

This bug is not caused by an error from the user but is due to SET DISPLAY MODE only allowing a maximum resolution of the screen resolution and not the maximum resolution supported by the user's hardware.

http://3dfolio.com
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Aug 2007 02:45
Mistrel

Not sure I understand how to interpret your latest post.

I seem to be running a theme called "Windows XP (Modified)". How does that relate to your explanation?

If I've understood you correctly, I'm NOT using a default Windows theme - yet I don't get a crash.

[It's late now, perhaps I should revisit this when I'm awake? ]
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 3rd Aug 2007 09:28
"Windows XP (Modified)" means any change to the default theme.

Did you change your desktop background image?

If so, then you are running the "Windows XP (Modified)" theme!

I'm unique, just like everybody else.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Aug 2007 12:40 Edited at: 3rd Aug 2007 12:41
heartbone

Thanks - but I don't see how your reply helps.

Quote: ""Windows XP (Modified)" means any change to the default theme."


I guessed that was what it meant.

Quote: "Did you change your desktop background image?"


Yes.

Quote: "If so, then you are running the "Windows XP (Modified)" theme!"


I know.

You haven't answered my original question since I don't seem to be running the DEFAULT theme.

As I said, I'm NOT using the default theme (since I changed it), yet I do NOT get the crash.

WindowsKiller's explanations of this particular problem sound more likely to me.
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 3rd Aug 2007 16:42 Edited at: 3rd Aug 2007 16:44
Quote: "If I need to guess, I'd say that it will crash if either width or height is an odd number .. "


If you look at my examples you'll see that the crash is from an even number. My video card supports up to 1920x1200 on a single-link DVI yet DBP will crash one pixel over 1600x1050, my screen resolution. In my examples my screen crashes at an even-numbered resolution of 1608x1058.

Quote: "and you pass it to SET DISPLAY MODE without checking if your graphics card will accept the given size for a surface."


DBP will only report the maximum screen resolution. It's not possible to return what resolutions the actual hardware supports.

Quote: "The actual crash might even be caused by the display driver, not by DBPro."


This is not the case. I've reproduced this crash on three different computers and can enable/disable it from occuring by the aforementioned method.

Quote: "As I said, I'm NOT using the default theme (since I changed it), yet I do NOT get the crash."


Green Gandalf, would you do me a favor and install AutoHotkey and tell me what Autoit3 Window Spy (included) reports as your maximized window size? Please also report your screen resolution. And if possible, please post a screenshot of a maximized notepad window as well.

http://www.autohotkey.com/download/AutoHotkeyInstall.exe

http://3dfolio.com
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Aug 2007 18:10 Edited at: 3rd Aug 2007 18:17
Mistrel

I attach a screenshot of a maximised Notepad window - unsurprisingly it's a 1024x768 image since I'm using a screen resolution of 1024x768 (32bit).

Will report the Autoit3 Window Spy thing when I've found it ...

(I'll edit this post with the result).

Edit

Found it. Here are the results:

1. Maximised using button

"left=-4, top=-4, width=1032, height=776"

2. Maximised using drag

"left=-3, top=-2, width=1029, height=773"

Hope all this means something to you.

Attachments

Login to view attachments
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 7th Aug 2007 04:31 Edited at: 7th Aug 2007 04:32
I'm sorry but I don't understand why it doesn't crash for you. This is the case for both Alquerian and I and I've verified it by duplicating his scenario. I've also confirmed it on my desktop (GeForce 8800 GTS), my laptop (GeForce GO 7400) and Alquerian confirmed it on his desktop (ATI.. something).

To narrow down the possibilities of what it could be, what version of DBP are you using, Green Gandalf?

It would certainly help if more people would test this and post their results.

http://3dfolio.com
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 7th Aug 2007 12:43
Mistrel

I tested your code on my PC which is an Intel P3/980MHz, GFX card NVIDIA GeForce FX 5200. I'm currently running DBPro U6.6b.

When I get a chance later today I'll also test it on my laptop which has an AMD processor (I think) and a different display width/height ratio.
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 7th Aug 2007 16:22 Edited at: 26th Aug 2007 08:19
I would appreciate that.

Another thing you can try is to install and setup the trial version of Maxivista to simulate multiple monitors and see if that causes a problem for you. This is how I confirmed Alquerian's problem on my computers.

My scenario is a bit different, however. I use an alternate shell called LiteStep which gives me control over the overlapping pixels of my windows across the edge of my screen. If you start crashing due to this bug I won't be able to help you revert back.

http://3dfolio.com
Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 28th Aug 2013 09:27
Was any resolution had to this problem? Whilst using two monitors, the DBPro application always crashes after reaching a resolution greater than the primary monitor.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia

Login to post a reply

Server time is: 2024-04-19 21:29:49
Your offset time is: 2024-04-19 21:29:49