Search results go to wrong file

I'm having a weird bug in version 4.0.20.
If I list locations for some random search text and I get the search results and press enter while on a result, the wrong file and line number is shown, and sometimes it just stays in the result view.
I'm not really sure if I'm just doing something wrong, but it worked this way in the previous version.

Edited by Daniel Bross on
Well that's a problem. It must be because of the new jumping system, but I haven't had anything like that happen while I was using it. Do you have any more information on how to reproduce it? What search are you using?

If you have the custom code, one quick fix for now is to just revert to the old system which you can do by defining:
1
#define USE_OLD_STYLE_JUMPS


EDIT: The bug also might have something to do with an odd character in the file name or an unusual error line format (if it's from compiler output).

Edited by Allen Webster on
Mr4thDimention
Well that's a problem. It must be because of the new jumping system, but I haven't had anything like that happen while I was using it. Do you have any more information on how to reproduce it? What search are you using?

If you have the custom code, one quick fix for now is to just revert to the old system which you can do by defining:
1
#define USE_OLD_STYLE_JUMPS



I'm not sure what's triggering it, but it seems to always happen if I execute the "open all code"-command and search for anything with Ctrl + Shift + F.
Thanks for the quick fix!

Mr4thDimention

EDIT: The bug also might have something to do with an odd character in the file name or an unusual error line format (if it's from compiler output).


Well I can't find any files that have odd characters in them, but I will take a better look!
Allen, just wanted to follow up that I seem to be having similar issues with 4.0.20 with respect to build error navigating. Tabbing through build errors doesn't jump to the correct file and also jumps the first 5 errors in the error list.

Regular 4.0.20 with no customization.
Okay, well this sounds like a big problem, but so far I've had no luck reproducing it.

What OS are you both on?

If either of you can create a zip with the 4coder files, a folder with code in it, and a set of steps to reproduce the bug, maybe I'll be able to reproduce it then.

Mebourne
Allen, just wanted to follow up that I seem to be having similar issues with 4.0.20 with respect to build error navigating. Tabbing through build errors doesn't jump to the correct file and also jumps the first 5 errors in the error list.

Regular 4.0.20 with no customization.


What is the format for the compiler error message output? What compiler?

Edited by Allen Webster on Reason: wrong BBCODE
I encountered this problem too, causing me to revert back to 4.0.19.

Win10. MSVC 2017. x64
Mr4thDimention

What is the format for the compiler error message output? What compiler?


EDIT:
Alright starting to get the bug again after continuing to test.

1. Opened 4ed via batch script with -F -S -f 14
2. Open all code command
3. Build
4. One error, jump to, jumps to incorrect file and jump to line doesn't align with the function naming error I introduced.

Zipping up project and 4coder files to send message.

---------------

Well, I can't reproduce it now. Attempted a few things over the last 30 minutes. Last night I went back to 4.0.19 due to the issue. Reinstalled 4.0.20 this evening to reproduce the results for you and now the jumping seems to be working fine. It's jumping to the correct file and line number which was the problem last night.

Setup: Win 10, VS2015 x64.

I'll keep utilizing 4.0.20 this weekend and see what pops up.

Edited by Scott Hunt on
Good news! I just discovered the problem. The sticky jump system requires a special end-file hook that was not getting set. The fix will be available in the next build. If you have the custom code, you can fix it just by calling:

1
set_end_file_hook(context, endfile_close_jump_list);


right before the end of get_bindings.

Edited by Allen Webster on
Nice! Glad you found it!