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

crosspaste cannot display the window in my environment for some reason #1790

Open
lzqwebsoft opened this issue Sep 4, 2024 · 27 comments
Open
Labels
Bug Something isn't working UI UI Windows Windows

Comments

@lzqwebsoft
Copy link

How frequently does the bug occur?

-- select --

Description

windows10环境,附上我的日志
crosspaste.log

Stacktrace & log output

No response

Can you reproduce the bug?

Always

Reproduction Steps

No response

Version

crosspaste-1.0.7-891.x64.msix

OS

Windows10

@CompileFuture2024 CompileFuture2024 changed the title crosspaste在我的环境中无法显示窗口不知为何 crosspaste cannot display the window in my environment for some reason Sep 4, 2024
@guiyanakuang
Copy link
Member

Based on the logs, there don't seem to be any specific exceptions. Are you using multiple displays?

@lzqwebsoft
Copy link
Author

没有用多显示屏,但我的电脑环境里有多个java环境,不知道有没有影响,就是启动后看不到运行界面,好奇怪
image

@lzqwebsoft
Copy link
Author

在我的MAC机上运行是正常的,但是在windows 10上不知道为什么显示不了,MAC上还看的到windows的机器,但无法查看token,所以无法验证。

@CompileFuture2024
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It runs normally on my MAC machine, but I don’t know why it cannot be displayed on Windows 10. I can still see the Windows machine on my MAC, but I cannot view the token, so I cannot verify it.

@guiyanakuang
Copy link
Member

没有用多显示屏,但我的电脑环境里有多个java环境,不知道有没有影响,就是启动后看不到运行界面,好奇怪 image

Is the system icon displayed normally in the bottom right corner? When you click the system icon, does the main window not appear? Is that what's happening?
This is indeed very strange. This is the first time we've encountered a problem like this.

@lzqwebsoft
Copy link
Author

是的,进程都是OK的,很奇怪,这是我操作的视频

QQ.20240904163741.mp4

@CompileFuture2024
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Yes, the processes are all OK. It’s strange. This is a video of my operation.

QQ.20240904163741.mp4

@guiyanakuang guiyanakuang added Bug Something isn't working Windows Windows labels Sep 4, 2024
@guiyanakuang
Copy link
Member

image

@lzqwebsoft, It looks like there might be a bug in the compose-multiplatform UI rendering. It will take some time to investigate why this is happening.
Could you try right-clicking on the executable file, go to Properties -> Compatibility, modify the settings, and then attempt to launch the application?

@guiyanakuang guiyanakuang added the UI UI label Sep 4, 2024
@lzqwebsoft
Copy link
Author

Wow, you guys are really good at observing, amazing! 👍❤❤❤❤It is true that when you click on the tray icon, a gray area is displayed. Did you click on Properties->Compatibility, Windows 8, Windows 7? It seems that it still doesn't work.😢
QQ截图20240904174045

@guiyanakuang
Copy link
Member

@lzqwebsoft, To be honest, I can't reproduce this issue on my device, and there's no relevant exception information in the logs. I don't have any good ideas to solve this problem right now. I need some time to investigate the possible causes. 😂

@guiyanakuang
Copy link
Member

Could you try modifying the graphics preferences to select power-saving mode, which avoids hardware acceleration?
I've done some research, and this rendering issue might be related to your graphics card and its drivers. Compose Multiplatform uses Skia and OpenGL at its core to interact with graphics hardware for rendering. In your case, it appears that there's a problem with the graphics rendering process.
image

@lzqwebsoft
Copy link
Author

Thank you for taking the time to answer my question. ❤❤❤❤I downloaded the latest version on other Windows 10 machines and found it was feasible, but it still didn't work on this machine. I tried the method you mentioned above. I reinstalled Chrome and crosspaste, but it was still the same. I couldn't seen UI. It was really confusing.😢,Thank you for open-sourcing such a good tool software。

Other windows machines:
QQ图片20240906140327

Old machines i try:
QQ截图20240906135056

@guiyanakuang
Copy link
Member

@lzqwebsoft. Thank you for your patience in providing these error messages and helping with troubleshooting. This info is not only valuable for addressing your specific issue but can also assist other users who might encounter similar problems. Your contribution is helping the software grow and improve.

It appears that your machine doesn't have integrated graphics, which explains why there's no difference between power-saving and high-performance modes. In light of this, updating your graphics card drivers might be helpful in resolving the issue.

@lzqwebsoft
Copy link
Author

Yes, my CPU does not have integrated graphics, I am using a discrete graphics card, I have tried all three options, none of them worked, my graphics card drivers are up to date.

CPU:AMD Ryzen 7 3700X 8-Core Processor 3.59 GHz
GPU:GTX750

QQ截图20240906143052

@guiyanakuang
Copy link
Member

In this case, the best solution would be to seek help from the compose-multiplatform community. I need to create a simple reproduction demo to submit to the community.

@lzqwebsoft
Copy link
Author

Tell me how I can help.

@guiyanakuang
Copy link
Member

No rush. I need time to make a reproduction demo. I'll notify you when it's done. If you can reproduce the issue on your device, a short video (a few seconds) would be helpful to draw the compose-multiplatform community's attention to this bug.

@lzqwebsoft
Copy link
Author

I don’t know if this short video will help:

QQ.20240906150424.mp4

@guiyanakuang
Copy link
Member

The current crosspaste codebase is too large, and they are reluctant to extract the UI code for analysis. This is why I need to create a simple, reproducible demo that focuses solely on the UI. This will help them identify the issue more easily.

@lzqwebsoft
Copy link
Author

Oh oh got it

@guiyanakuang
Copy link
Member

@lzqwebsoft . I have created a demo. On machines where the UI cannot be displayed, run the following commands to check if the UI can be shown:

git clone https://github.com/CrossPaste/UIBugValidator
cd UIBugValidator
./gradlew.bat composeApp:run

@lzqwebsoft
Copy link
Author

The result:

QQ截图20240909100812

QQ.20240909101029.mp4

@guiyanakuang
Copy link
Member

@lzqwebsoft Thank you very much. This information is very helpful.

@lzqwebsoft
Copy link
Author

You're welcome. Glad to help.😊👍❤👍

@guiyanakuang
Copy link
Member

In the Compose Multiplatform community, an issue was created: https://youtrack.jetbrains.com/issue/CMP-6639/Creating-a-transparent-undecorated-window-results-in-no-visible-display
Based on the information you provided, it can be determined that this is a rendering . When the window is set as an undecorated transparent window

  1. It first encounters a "Failed to create DirectX12 device" error.
  2. It then falls back to using OpenGL, but fails to render the view in the middle of the transparent window.

@guiyanakuang
Copy link
Member

@lzqwebsoft https://github.com/CrossPaste/UIBugValidator/blob/a2b4511d5f1f75504b7f321463188211e0dc4dc4/composeApp/src/desktopMain/kotlin/com/crosspaste/verify/main.kt#L12
Could you please verify if the window can be displayed when transparent = false?

https://youtrack.jetbrains.com/issue/CMP-6639
Or directly respond here with the information that the official team wants to know.

@lzqwebsoft
Copy link
Author

Since I don't have an account, I'll reply to you directly.

The code:

package com.crosspaste.verify

import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application

fun main() = application {
    Window(
        onCloseRequest = ::exitApplication,
        title = "UIBugValidator",
        alwaysOnTop = true,
        undecorated = true,
        transparent = false,
        resizable = false,
    ) {
        App()
    }
}

The result is show the windows:

QQ截图20240909175843

QQ.20240909175940.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working UI UI Windows Windows
Projects
None yet
Development

No branches or pull requests

3 participants