-
Notifications
You must be signed in to change notification settings - Fork 124
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
libwx_gtk2 caret + tags file bug #87
Comments
Additional information: As an alternative to my "change focus of window to invalidate hex control view", another workaround that I see working is to right click, showing the right click context menu. It seems to me that this reinforces the original theory: there is some issue with a failure to redraw/invalidate the view. A similar bug can be observed when bytes are actually edited within the view. There appears to be some "ghosting" at times, where individual byte positions are sometimes not immediately redrawn to reflect the changes. Again, changing the window focus in my desktop environment makes the issue correct itself. Similarly, moving the caret around with the arrow keys redraws, once the actually-modified nibble/hex character is highlighted with the caret. My uneducated guess is that the underlying cause is something like this: https://forums.wxwidgets.org/viewtopic.php?t=10114 Should I track this other issue by opening a separate Github issue? |
Following a little debugging with a It looks like the issue is actually timing sensitive (this may be why some files don't seem to have the issue at all, as previously reported). I can see the bug or not see the bug by varying how quickly I make the first click. Then, the state of the caret is confused (it's incorrectly invisible) unless and until I change window in the desktop environment, and change back to wxHexEditor (i.e. apply my workaround). So, my newly refined theory is that the event loop assumes a pairing of calls to [1] http://docs.wxwidgets.org/3.0/classwx_caret.html#a5112409bd3a83148f364c4b08086fe28 |
Caret shadow is something problematic on wxWidgets. I remember that it make big noise before but work good now even if it has some glitches that we need to work on it. If you figure out how to re-produce it, I will try to understand what happening. |
Hi @EUA , I uploaded this video, which shows exactly what I'm talking about: https://youtu.be/CbN6rXSMUIw Thanks! |
The issue is related with Tags. More precisely: So when Tag Popup is visible, caret doesn't want to work at first. |
I dig deeper.
If I click to TAG at first run, "hex_ctrl->SetFocus();" runs BUT it doesn't activate first breakpoint somehow. How could this be possible? I directly call it and it doesn't work! Probably TAG Popup receive the event somehow and doesn't want to Skip it to the it's parents which is wxHexCtrl class... At this point, I don't think if there are an easy solution. |
I've stumbled upon a partial solution, or perhaps a clue:
This almost fixes the problem. I find that I can click directly on a tag, and the caret appears. However, this only works after I scroll up and down a bit within the hex ctrl. I have to scroll up and down a bit when wxHexEditor initially starts, and then it's fine. I have to do the same procedure when I select the DataInterpreter dialog, and reselect the hex ctrl -- scroll a bit, and then clicking on a tag makes the caret appear. BTW, I've also noticed that another workaround works (with or without this rough patch): If I click on an area in the hex ctrl that happens to not have a tag, the caret appears immediately, and continues to appear if I click on a tag. In case it isn't obvious, I don't really have a clue what I'm doing here. |
After all those years, the bug hides at here:
Thank you. |
@EUA Thanks! |
The blinking block caret within the main hex control view sometimes does not appear initially, which seems like a UI bug. I'll click within the hex control view, and see values within the DataInterpreter view, indicating that the clicks are in some sense "registered". However, as I said, the clicks don't "fully register" since the blinking block caret will not appear. I can continually click around, and the caret will not appear at any point (though the contents of DataInterpreter will change as I click around). I'm working against git tip here. Hopefully, a fix for this issue will make it into the final v0.24.
If I open a file for editing that has a large tag file associated with it already, then this often happens. I've been working around the issue by quickly changing the focus to another window within my desktop environment. Once I do that, the blinking block caret appears as expected. It's been a long time since I wrote any wxWidgets code, but I'd guess that this refocusing creates some kind of invalidation of the view's contents. That's why my workaround fixes the issue. The fix seems to last the entire rest of the session.
This is not the expected/correct behavior, of course. I expect the block caret to appear immediately, as happens on my machine with the same file when there is no associated tag file (for whatever reason). My workaround shouldn't be necessary.
Note that this seems to consistently happen with particular files, and consistently not happen with other files (there is always an associated tag file when the bug hits). There is probably some aspect of the file itself (e.g. the overall size), and/or my large tag file that accounts for this. Some random thing about the input into wxHexEditor makes the difference between the bug hitting or not hitting. I have no idea what this may be, but I am willing to investigate with some help.
Details of my build:
Thanks!
The text was updated successfully, but these errors were encountered: