Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Editor window can be 'restored' off-screen at startup [DEFEDIT-913] #729

Closed
ghost opened this issue Apr 26, 2017 · 12 comments
Closed

Editor window can be 'restored' off-screen at startup [DEFEDIT-913] #729

ghost opened this issue Apr 26, 2017 · 12 comments
Assignees
Labels
blocker An issue that is blocking further progress for users

Comments

@ghost
Copy link

ghost commented Apr 26, 2017

After downloading the latest version 2 of the editor (1.2.103 in about menu), the editor crashes when opening any project from disk.

Only the menu options and icon show, I can still build the project with Command B but no visual editor or windows show.

If it is any help, I loaded the project into version 1 and I am getting a crash error message when loading any project also. I have attached the screenshot.

I tested a couple of defold sample code projects and my own project and all crash

screen shot 2017-04-26 at 12 04 39 pm 2

I am using Mac OSX Sierra

@RagnarSvenssonKing RagnarSvenssonKing added blocker An issue that is blocking further progress for users more-info The issue is missing important information that is needed before work can be done to fix the issue labels Apr 26, 2017
@RagnarSvenssonKing
Copy link
Contributor

I will test the latest version right now. In the mean time, what can you tell me more about the crash? How does it look, what happens? Any error message? I'm asking since you say that the menu options and icon still show, which is something I've never seen before. You could also try to download a fresh copy of Editor2 and see if that makes a different. The problem in Editor1 looks actually completely unrelated to whatever the problem is in Editor2. I'll see what I can find.

@RagnarSvenssonKing
Copy link
Contributor

What were the exact steps you took to get the crash in Editor1? Just opening a project by selecting the project and then the branch? I found a similar crash in another software that came from drag and drop: https://bugs.eclipse.org/bugs/show_bug.cgi?id=412794

@RagnarSvenssonKing
Copy link
Contributor

Check Help > About, is this your version? b58ee007608c95a5823bbc82afef1b02d99a157b
I tested here and had no problems opening a project with that version.

@ghost
Copy link
Author

ghost commented Apr 26, 2017

Hi Ragnar,

I have made a screen recording so you can see the issue:

https://vimeo.com/214802704
Password: defold

It is a clean install of the editor.

The exact steps I took in editor 1 is exactly the same, however with editor 1 it shows the editor window and shows the crash when loading any project.

@RagnarSvenssonKing
Copy link
Contributor

Thanks for that excellent capture! I actually think that there is something unexpected happening when the editor window is repositioned based on your prefs (we try to restore it to the same state, positions, maximized, splitters, etc). Did you happen to run it on a different monitor setup before, like dual screens? Anyway, you could try to right click on the app icon in the tray and select 'Show All Windows'. It might just be hiding off screen.
Regarding Editor1, it would be fantastic if you could do a similar screen capture of that too. I don't think I would have thought of window restore without seeing that video.

@ghost
Copy link
Author

ghost commented Apr 26, 2017

This makes sense as I will often use dual screens most of the time. I tried 'Show all Windows' with dual screens on and off and can't seem to restore the editor window.

I do get this transparent frame show up

blankframe

@ghost
Copy link
Author

ghost commented Apr 26, 2017

Here is the video showing editor 1 crashing when loading a project

https://vimeo.com/214819514
Password: defold

@RagnarSvenssonKing
Copy link
Contributor

Thanks for that! This is awkward to explain, but you are actually using the wrong way to open the project in Editor1. You need to do File > Open Project, rather than File > Open File. I don't want to go into details, let's just say there are many reasons why there is an Editor2 being developed. ;)

Regarding the blue rectangle, it looks as if the window has become invisible, but positioned in-screen. Which macOS are you using? I've seen reports about invisible windows in Yosemite (10.10): https://forums.macrumors.com/threads/invisible-windows.1882819/
It could be something in OSX, but it still seems likely it's related to our window restoration code. We check for position, dimensions, maximized and full-screen. To make sure, you could try to add a keyboard shortcut to maximize the window (and see if the blue rectangle follows), maybe like this: http://osxdaily.com/2013/03/22/5-simple-window-management-keyboard-shortcuts-to-improve-workflow-in-mac-os-x/

@ghost
Copy link
Author

ghost commented Apr 26, 2017

After a bit of googling I found a solution from here

https://superuser.com/questions/331/reset-mac-os-x-windows-position-after-de-attaching-external-monitor

The app mentioned called 'sizeup' worked which bought the window back into view.

I think this would of be caused by me working with dual screens then I detached my Macbook when I went to work away from the desk, then the project saved and the editor kept the dual screen positioning information.

The editor 1 issue was my dumb error, sorry about that.

@RagnarSvenssonKing
Copy link
Contributor

Good find, we need to account for that and move the window in-screen in case it has an invalid position. I'll take the liberty of updating the title to correspond to the issue.

@RagnarSvenssonKing RagnarSvenssonKing changed the title Editor 2 Latest version - Editor crashes on project load Editor window can be 'restored' off-screen at startup Apr 26, 2017
@RagnarSvenssonKing RagnarSvenssonKing removed the more-info The issue is missing important information that is needed before work can be done to fix the issue label Apr 26, 2017
@RagnarSvenssonKing RagnarSvenssonKing self-assigned this Apr 27, 2017
@RagnarSvenssonKing RagnarSvenssonKing changed the title Editor window can be 'restored' off-screen at startup Editor window can be 'restored' off-screen at startup [DEFEDIT-913] Apr 28, 2017
@RagnarSvenssonKing
Copy link
Contributor

After investigating, it turns out that this issue has nothing to do with dual-screen, but everything to do with 'maximize'. On macOS, full-screen (green-window-button) and maximize (Alt/option+green-window-button) are different. I could reproduce this issue 100% when using maximize, regardless of how many screens and which screen the editor was last positioned on. Is this consistent with your usage pattern?
This is my awesome ascii testing matrix, showing single and dual screen setups.

 |1
-+-
y|w
n|m
y|f

 |1 2
-+---
y|w
n|m
y|f
y|  w
n|  m
y|  f

y = works, n = does not work
w = windowed, m = maximize, f = full-screen

@RagnarSvenssonKing
Copy link
Contributor

Fixed!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocker An issue that is blocking further progress for users
Projects
None yet
Development

No branches or pull requests

1 participant