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

Forward search marker sometimes does not appear in the pdf #31

Open
PHPirates opened this issue May 26, 2021 · 3 comments
Open

Forward search marker sometimes does not appear in the pdf #31

PHPirates opened this issue May 26, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@PHPirates
Copy link
Collaborator

As brought up implicitly in #30

TeXiFy 0.7.7-alpha.2, pdf viewer 0.12.0-alpha.1

Expected:

  • Type \newpage Page $n$ in LaTeX
  • Compile
  • Forward search is executed but focus (caret) should stay in LaTeX

Actual:

  • Type \newpage Page $n$ in LaTeX
  • Compile
  • Document reloads but stays at same position
  • Focus is transferred to pdf
  • Place caret back and compile second time
  • Now forward search is executed, although the marker disappears immediately and focus is still transferred

@slideclimb will have a look, the behaviour seems to have changed since 0.11

@PHPirates
Copy link
Collaborator Author

PHPirates commented Apr 23, 2023

Current behaviour seems to be that the forward search is executed and puts a marker in the pdf, which immediately disappears because the pdf is reloaded. However, when playing around in some cases it didn't want to move to the forward search location but just stayed at the same place.

The focus does stay in the LaTeX file though.

@PHPirates PHPirates added the bug Something isn't working label May 3, 2023
@PHPirates
Copy link
Collaborator Author

After #76, it seems that the above issue (forward search executed but the marker disappears) can still occur but much less frequently. Now, it is more common that the forward search will be executed fine, except the marker does not appear. However, sometimes it does appear.
A second manual forward search worked in all cases I tried it.

Also saw this exception once:

Uncaught Wu: Required value was null.
java.lang.Throwable: [LOGSEVERITY_ERROR][webpack://light-pdf-viewer/./application/viewer.js?:1]:
Uncaught Wu: Required value was null.
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
	at com.firsttimeinforever.intellij.pdf.viewer.jcef.JcefUtils$createDefaultConsoleMessageListener$1.invoke(JcefUtils.kt:104)
	at com.firsttimeinforever.intellij.pdf.viewer.jcef.JcefUtils$createDefaultConsoleMessageListener$1.invoke(JcefUtils.kt:101)
	at com.firsttimeinforever.intellij.pdf.viewer.jcef.JcefUtils$addConsoleMessageListener$1.onConsoleMessage(JcefUtils.kt:89)
	at com.intellij.ui.jcef.JBCefClient$3.lambda$onConsoleMessage$4(JBCefClient.java:305)
	at com.intellij.ui.jcef.JBCefClient$HandlerSupport.lambda$handle$0(JBCefClient.java:726)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at java.base/java.util.Collections$SynchronizedCollection.forEach(Collections.java:2131)
	at com.intellij.ui.jcef.JBCefClient$HandlerSupport.handle(JBCefClient.java:726)
	at com.intellij.ui.jcef.JBCefClient$HandlerSupport.handleBoolean(JBCefClient.java:731)
	at com.intellij.ui.jcef.JBCefClient$3.onConsoleMessage(JBCefClient.java:304)
	at jcef/org.cef.CefClient.onConsoleMessage(CefClient.java:352)

@PHPirates PHPirates changed the title Forward search after compilation only works the second time Forward search marker sometimes does not appear in the pdf May 12, 2023
@PHPirates
Copy link
Collaborator Author

PHPirates commented Sep 26, 2024

I can still reproduce this issue:

Expected:

  • Type \newpage Page $n$ <caret> in LaTeX
  • Compile
  • Type \newpage Page $n+1$ <caret>
  • Forward search is executed and the text just typed has a marker

Actual:

  • Type \newpage Page $n$ <caret> in LaTeX
  • Compile
  • Type \newpage Page $n+1$ <caret>
  • Document reloads but stays at page n, sometimes with a marker. Sometimes it goes to page n+1, so this may be a race condition
  • Compile second time
  • Now forward search is executed and the text on page n+1 has a marker (sometimes it has not)

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

No branches or pull requests

1 participant