https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=16410
--- Comment #22 from Tomasz Mon <[email protected]> ---
(In reply to Roland Knall from comment #15)
> (In reply to Rasmus Jonsson from comment #14)
> > > Qt: Changes ProfileModel assert
> >
> > That's the issue I found. I assumed the problem was with a release build
> > (where Q_ASSERT does nothing). I did want to ask about Q_ASSERT though,
> > should they generally be replaced since they make it hard/ impossible to
> > debug for example this feature?
>
> In general, Q_ASSERT does work with and without debug mode. And no, they
> should not be generally be replaced, as they usually are guards preventing
> extreme scenarios to be played out. Which in this case was correct.
This is absolutely right. The assert is not the problem in itself, but the fact
that the condition was not met is the real issue.
Failing with assertions early on makes it easier to pinpoint the real issue.
This is because the problem stops working as soon as it notices that something
really bad happened, instead of continuing to work with bad data. In this case
the assert actually helped with debugging the problem, as it narrowed down the
search quite nicely.
> Something else must have been changed, as - when I developed the feature - I
> did not get empty file names, which in turn did not trigger the Q_DEBUG
> issue.
This seems to be related to how QFileInfo(QString &file) constructor handles
strings that end with directory separator. The underlying issue is fixed in
https://code.wireshark.org/review/36238
--
You are receiving this mail because:
You are watching all bug changes.
___________________________________________________________________________
Sent via: Wireshark-bugs mailing list <[email protected]>
Archives: https://www.wireshark.org/lists/wireshark-bugs
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-bugs
mailto:[email protected]?subject=unsubscribe