4coder » Forums » Search results go to wrong file
stonecompass
Daniel Bross
5 posts

Software developer
Primarily games and mobile apps

#12063 Search results go to wrong file
1 month, 3 weeks ago Edited by Daniel Bross on May 31, 2017, 3:20 p.m.

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.
Mr4thDimention
Allen Webster
252 posts
2 projects

Heyo

#12065 Search results go to wrong file
1 month, 3 weeks ago Edited by Allen Webster on May 31, 2017, 5:56 p.m.

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).
stonecompass
Daniel Bross
5 posts

Software developer
Primarily games and mobile apps

#12080 Search results go to wrong file
1 month, 2 weeks ago

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!
Mebourne
Scott Hunt
27 posts

Father, Thinker, Mechanical Engineer @NASA, and C/C++ Hobby Enthusiast / @TexxStudio

#12083 Search results go to wrong file
1 month, 2 weeks ago

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.

None
Mr4thDimention
Allen Webster
252 posts
2 projects

Heyo

#12090 Search results go to wrong file
1 month, 2 weeks ago Edited by Allen Webster on June 2, 2017, 4:19 p.m. Reason: wrong BBCODE

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?
JesseMeyer
Jesse
50 posts

None

#12094 Search results go to wrong file
1 month, 2 weeks ago

I encountered this problem too, causing me to revert back to 4.0.19.

Win10. MSVC 2017. x64

The meaning of life is to dance and sing while the music is being played.
Mebourne
Scott Hunt
27 posts

Father, Thinker, Mechanical Engineer @NASA, and C/C++ Hobby Enthusiast / @TexxStudio

#12097 Search results go to wrong file
1 month, 2 weeks ago Edited by Scott Hunt on June 3, 2017, 4:16 a.m.

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.

None
Mr4thDimention
Allen Webster
252 posts
2 projects

Heyo

#12210 Search results go to wrong file
1 month ago Edited by Allen Webster on June 16, 2017, 9:17 p.m.

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.
stonecompass
Daniel Bross
5 posts

Software developer
Primarily games and mobile apps

#12301 Search results go to wrong file
3 weeks, 2 days ago

Nice! Glad you found it!