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

Blank screen on previous window when opening a new one #1155

Open
3N4N opened this issue Aug 30, 2024 · 27 comments
Open

Blank screen on previous window when opening a new one #1155

3N4N opened this issue Aug 30, 2024 · 27 comments
Labels
help wanted Extra attention is needed

Comments

@3N4N
Copy link

3N4N commented Aug 30, 2024

I'm using Windows 11 and Sioyek v2.0.0. When I open a new window with Ctrl-T, the the new window opens with the same file the previous window was displaying. At this point both windows work fine. But when I open a new document in either of the windows, the other one goes blank. Scrolling it changes the page numbers in the status bar at the bottom, so it seems the issue is only with displaying the document.

I found this reddit comment from a year ago that describes the same issue. But I couldn't find it reported here. That's why I'm creating this bug report.

@ahrm ahrm added the help wanted Extra attention is needed label Aug 30, 2024
@ahrm
Copy link
Owner

ahrm commented Aug 30, 2024

Unfortunately I don't have a windows 11 machine to test this issue, maybe someone can help?

@3N4N

This comment was marked as resolved.

@ahrm
Copy link
Owner

ahrm commented Sep 3, 2024

Which branch are you trying to build? If you are building the development branch note that it requires qt 6.5+. This error seems to indicate that qt was unable to open the output file, this might be a permission issue, make sure that qmake has the permission to create the files in that directory (either by moving to another drive other than c or running qmake as administrator).

@3N4N
Copy link
Author

3N4N commented Sep 3, 2024

Sorry, the error seems to be because of "-tp vc" parameter. I took it from "build_windows.bat", but since I'm using MinGW, maybe I should be following "build_linux.sh". I did that, and qmake was able to generate the makefiles. There are some C++ errors. I'll try to fix those and let you know.

P.S. I was using the main branch and qt-5.15. Switched to dev branch now and installing qt-6.5.

@3N4N

This comment was marked as resolved.

@ahrm
Copy link
Owner

ahrm commented Sep 3, 2024

Yes, I think you need to specify a compiler option that allows large files, I don't remember what it is exactly for g++ but it might be -Wa,-mbig-obj (the option for visual studio is /bigobj).

@3N4N

This comment was marked as resolved.

@3N4N

This comment was marked as resolved.

@ahrm
Copy link
Owner

ahrm commented Sep 3, 2024

Hmmm I think you can comment the part between #else and #endif for now (line 8310), (it only disables some TTS-related stuff you can comment it out if you don't care about TTS).

@3N4N

This comment was marked as resolved.

@3N4N
Copy link
Author

3N4N commented Sep 5, 2024

My bad. The issue was totally different. It was due to a faulty if-defined conditional in SyncTeX:

Changing it to #if defined(_WIN32) && defined __CYGWIN__ fixes the mountain of errors coming in from the standard c libraries. I will try to compile Sioyek again and let you know.

@3N4N

This comment was marked as resolved.

@3N4N
Copy link
Author

3N4N commented Sep 5, 2024

Was finally able to build Sioyek. Both release and debug versions. I will try and find the cause of the bug later on.

@WvW-vOiDs
Copy link

I have the same issue. When I open a new window and switch between them using alt tab, the first window becomes blank. I'm using Windows 10 and Sioyek v2.0.0, which I downloaded from the releases.
recording

BTW, thank you for the awesome reader. I love it so much.

@3N4N
Copy link
Author

3N4N commented Sep 6, 2024

I couldn't reproduce the issue with the latest 'development' branch. Neither in release nor in debug mode.

@WvW-vOiDs can you check if you can reproduce the issue with this release?

Update: Sorry. The issue still exists. I'll double check.

@WvW-vOiDs
Copy link

I couldn't reproduce the issue with the latest 'development' branch. Neither in release nor in debug mode.

@WvW-vOiDs can you check if you can reproduce the issue with this release?

Update: Sorry. The issue still exists. I'll double check.

Sorry, I wasn't clear enough before. I downloaded sioyek-release-windows.zip from the release page. I didn't build it.

Thank you @3N4N for taking the time to recheck. I really appreciate it! I regret that I'm not very proficient in coding, so I can't provide any assistance.

@WvW-vOiDs
Copy link

Both issues do not show up on my Windows 11 PC.

recording

But they still exist on Windows 10.

@3N4N
Copy link
Author

3N4N commented Sep 11, 2024

@WvW-vOiDs I am running Windows 11 and I can still reproduce the issue. I tried to find the bug in the 'dev' branch, but still no luck. I can only say that the bug exists only in Windows, not in Linux. I'll try looking. But @ahrm, any suggestion would be really appreciated.

I found the relevant function:

sioyek/pdf_viewer/input.cpp

Lines 4246 to 4258 in 4015156

class NewWindowCommand : public Command {
public:
static inline const std::string cname = "new_window";
static inline const std::string hname = "Open a new window";
NewWindowCommand(MainWidget* w) : Command(cname, w) {};
void perform() {
int new_id = widget->handle_new_window()->window_id;
result = QString::number(new_id).toStdWString();
}
bool requires_document() { return false; }
};

@ahrm
Copy link
Owner

ahrm commented Sep 11, 2024

This is the command that creates a new window. Based on your screencasts, this command seems to be working fine, as the window is created, however, no content is being rendered in that window. The rendering-related code is in pdf_view_opengl_widget.cpp. For example, you could set a breakpoint on PdfViewOpenGLWidget::my_render and see if there is a difference between the execution of the window that is rendering correctly and the other window.

@Jacinto27
Copy link

Just found this out, hard to have homework and textbooks open at the same time. I'm using windows 11

@ahrm
Copy link
Owner

ahrm commented Oct 6, 2024

Can the issue be reproduced in the experimental builds here: https://github.com/ahrm/sioyek/releases/tag/sioyek3-alpha0 ?

@Jacinto27
Copy link

works just as intended sir 🫡 cant wait for the full release sir 🫡🫡 my homework will be decimated sir 🫡🫡🫡

@Noninn1
Copy link

Noninn1 commented Oct 13, 2024

Can the issue be reproduced in the experimental builds here: https://github.com/ahrm/sioyek/releases/tag/sioyek3-alpha0 ?

I am having the same issue with this new version. I'm using windows 11. The new window wors fine, but the last one is blocked.

@ahrm
Copy link
Owner

ahrm commented Oct 13, 2024

Are you sure you are running the new version? ( do you have access to new commands such as add_freetext_bookmark in the commands menu)?

@Noninn1
Copy link

Noninn1 commented Oct 13, 2024

Heres a video: https://imgur.com/a/zOPAY4c

@ahrm
Copy link
Owner

ahrm commented Oct 13, 2024

Unfortunately I can't reproduce it on my system (I don't have a windows 11 machine, it might be a windows 11-specific issue). Can you share your prefs_user.config? Maybe there is a specific configuration that is causing the issue.

@Noninn1
Copy link

Noninn1 commented Oct 13, 2024

I didn't modify anything in the prefs_user.config file. I have just tried opening two windows in my laptop and it worked fine, but in my pc, the last windows crashes. This is quite strange, its something to do with my pc, but I don't know what is. (Both on windows 11, also in my laptop I can't run the sioyek 3 alpha version. I run the program but then nothing happens).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants