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

"Set breakpoint at " message appearing #14003

Closed
angelobanse opened this issue Oct 27, 2023 · 7 comments
Closed

"Set breakpoint at " message appearing #14003

angelobanse opened this issue Oct 27, 2023 · 7 comments
Assignees
Milestone

Comments

@angelobanse
Copy link
Member

Set breakpoint at 26.00 or Set breakpoint at -2.00 appears in the Status Line in netedit when clicking on any of the following lines which start with a number:

 Import done:
   653 nodes loaded.
   13 types loaded.
   1131 edges loaded.
@m-kro
Copy link
Contributor

m-kro commented Oct 27, 2023

Cannot reproduce it on my side

@angelobanse
Copy link
Member Author

bug

@angelobanse
Copy link
Member Author

Cannot reproduce it on my side

try clicking a little bit under the last line

@m-kro
Copy link
Contributor

m-kro commented Nov 1, 2023

OK it doesn't happen with my network, but the relevant code is here:

} else {
const int lookback = MIN2(pos, 20);
const int start = MAX2(lineStart(pos), pos - lookback);
const FXString candidate = text.mid(start, lineEnd(pos) - start);
FXint timePos = candidate.find(" time") + 6;
SUMOTime t = -1;
if (pos >= 0 && pos > start + timePos) {
t = getTimeString(candidate, timePos, 0, candidate.length());
if (t >= 0) {
t += myBreakPointOffset;
std::vector<SUMOTime> breakpoints = myMainWindow->retrieveBreakpoints();
if (std::find(breakpoints.begin(), breakpoints.end(), t) == breakpoints.end()) {
breakpoints.push_back(t);
std::sort(breakpoints.begin(), breakpoints.end());
myMainWindow->setBreakpoints(breakpoints);
myMainWindow->setStatusBarText("Set breakpoint at " + time2string(t));
}
}
}
}

Do you have " time" somewhere in the messages?

@m-kro
Copy link
Contributor

m-kro commented Nov 1, 2023

@angelobanse Can you try with rebuilt netedit? I added some refactoring in f722bba which might influence the problem.

@angelobanse
Copy link
Member Author

@m-kro That just fixed it. Good job!

@m-kro m-kro added the bug label Nov 2, 2023
@m-kro m-kro added this to the 1.19.0 milestone Nov 2, 2023
@m-kro m-kro self-assigned this Nov 2, 2023
@m-kro
Copy link
Contributor

m-kro commented Nov 2, 2023

Actually very sad that apparently we used a string search without checking the result properly for ages...

m-kro added a commit that referenced this issue Nov 6, 2023
Signed-off-by: m-kro <m.barthauer@t-online.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants