Merged
Conversation
…ctrl. Also, added braces as requested.
Merge release 4.3 into development
* Add simple 2min autosave * Remove test debug * Le review feedback * Don't load-save straight away
* Use Travis config validation See https://blog.travis-ci.com/2019-10-24-build-config-validation for details * Fix validation warnings
* Remove temporary aliases when calling resetProfile() * Ensure aliases are disabled, cleaned up and then enabled when resetting profile
* Use latest VS image in Appveyor * Use Qt 5.13.0 on appveyor builds (cherry picked from commit 81ac771) * Up to Qt 5.13.2 * Install right version in SDK as well
* New translations mudlet.ts (German) * New translations mudlet.ts (Italian) * New translations mudlet.ts (Italian) * New translations mudlet.ts (Italian) * New translations mudlet.ts (Russian) * New translations mudlet.ts (Portuguese) * New translations mudlet.ts (Portuguese, Brazilian) * New translations mudlet.ts (Portuguese, Brazilian) * New translations mudlet.ts (Portuguese, Brazilian) * New translations mudlet.ts (Portuguese, Brazilian) * New translations mudlet.ts (Portuguese, Brazilian) * New translations mudlet.ts (Portuguese, Brazilian)
…ces (#3249) * Refactor: remove multiple redundent semi-colons following closing braces One was pointed out to me by CodeFactor in a recent commit to a PR and when I looked I found a few more! During the testing of this PR there were CI failures for the macOS case which turned out to be because `pcre2` was being considered for `pcre` as a package - the former has an updated formula currently and was tripping the code to try and update the latter package - but that package does not need it. The fix was to add the `-w` (whole-word) option to a couple of calls to `grep`. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
This was coming from mishandling the XDG_DATA_DIRS environmental variable - as environmental variables have to be converted to qmake variables before they can be used easily in the qmake profile file. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
This ought to help if any line number indexes are being used to access the buffer underlying a console as then they can be revised downwards to match the number of lines removed from the buffer/console concerned. This commit also improves the UI for the setConsoleBufferSize(...) Lua API function to bring it up to our current design style. It will now return true on sucess or nil + an error message otherwise. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Redo_Enhance: overhaul stopwatches This PR is a rework of the original PR #2516 squash-and-merged with the bugfix that I proposed as PR #3162 but which became difficult to apply when the original PR was eliminated from the development branch because it has been reverted from the 4.2.0 release and then that had been merged into the development branch! This PR allows stopwatches to be stopped and read at any time afterwards, for any number of times. It also: * allows stopwatches to be destroyed - so ID numbers WILL get reused - with a Lua (bool) destroyStopWatch((int) id) function. * allows them to be marked as persistent so that they are saved with the profile and reloaded again - if they were running then they will continue to increment when the profile is not loaded so they can be used to real time events outside of the profile/session; this uses a new Lua function (bool) setStopWatchPersistence((int) id, (bool) setPersistent). * allows them to be adjusted (even so they become negative) so can be used to count down as well as count up time - whether the stopwatch concerned is running or not. * have error messages that conform to our current style * have more run-time handling - most actions that produce no effect will advise that this is the case - e.g. stopping a stopwatch that was NOT running... * can handle periods of time longer than a day - the previous implementation wrapped around after 24 hours. * should not affected by DST changes - OS permitting. * the Lua API also gains a getStopWatches() function that returns a table with the id numbers as keys and values as tables of: * (bool) isRunning * (bool) isPersistent * (string) name * (table) elapsedTime - containing broken down time: * (bool) negative * (int) days * (int) hours (0 to 23) * (int) minutes (0 to 59) * (int) seconds (0 to 59) * (int) milliSeconds (0 to 999) * (float) decimalSeconds floating point value of whole of the time in seconds (can be negative!) * allows stop watches to be named - which is useful as then they can be identified in scripts; this means that all the stop watch functions can now take a name string as well as a numeric argument. Using an empty string will access the first (lowest id) stopwatch that does not have a name and the createStopWatch() function will accept an optional string argument as a name. For simplicity each name must be unique and this is enforced for that function and the added setStopWatchName(id or name, newName) function. The latter will also accept an empty string as either the first or second argument; in the first case it will assign the name to the first unnamed stopwatch and the second will clear the name of the specified one. * added getStopWatchBrokenDownTime(...) which returns the same broken down elements in a table for a single specified timer (day count; hours; minutes; seconds; milliseconds and whether the time is positive or negative {when preset with a negative adjustment and used as a count down})... During debugging I found out that the process of loading an existing profile that contained createStopWatch() calls was creating them during the testing/loading phase so I had to add extra code to prevent that function from taking effect whilst (bool) ~~`Host::mIsProfileLoadingSequence`~~ *revised to use a different, new, flag: `Host::mBlockStopWatchCreation` which is cleared earlier in the loading sequence* is true. Then, when testing the resetProfile() function I found that the same thing was happening AND that the non-persistent stopwatches needed to be removed as well - which is now solved by also preventing stopwatch creation whilst (bool) Host::mResetProfile is set and by running a new method (void) Host::removeAllNonPersistentStopWatches()! This thus allows stopwatches to be created during the profile startup sequence when lua scripts are run on loading (but after a prior compilation to test for script validity has been done). The code in (void) stopWatch::Host::adjustMilliSeconds(const qint64) originally used (QDateTime) QDateTime::addMSecs(qint64) incorrectly in that I had thought it adjusted the QDateTime it was called upon whereas it returns a reference to the adjusted value - so needed to be invoked in a different manner which was already being done in the original PR. QString stopWatch::getElapsedDayTimeString() const made use of int for some intermediate local variables but on Windows platforms the int type may be 32-bit long and thus not big enough to contain 64-bit values - and some other locals can be much shorter because of the limits that the code places on their values but will give compiler warnings without static_cast <T>. Use std::chrono_literals to specify some needed time intervals rather than large long integer literal constants. Refactor a block of code used to generate the broken down time as a Lua table so that two instances are handled by a single helper function. Additional code (the bug fix) has been included to provide backwards-compatibility for Lua startStopWatch(id) function which recreates prior start stop-watch behaviour when it is created: The prior form of startStopWatch(...) would reset and restart the indicated stopwatch each time that it was called. This is not really compatible with the revised functionality which allows the recorded time to be adjusted even before the stopwatch is first used. To allow existing scripts to continue to experience the same API this commit adds an optional second boolean argument to the startStopWatch(...) call ONLY WHEN the first argument is an id number and NOT a string name. If the second argument is omitted (as it will be when using older scripts) or is true then each time the function is used the stopwatch will be reset and restarted. Just in case the same behaviour ***is*** wanted with stop watch created with a **name** then a second boolean `true` will start the stopwatch from zero. This PR replaces (and thus will) close #3162 . A separate commit was appended and squashed in to reduce a code duplication pointed out by CodeFactor: Created a single function that is used to do the same thing in four separate stop-watch functions. Signed-off by: Stephen Lyons <slysven@virginmedia.com
This PR is a squash and merge of three commits with the following edited summary of the commit messages: This applies to the main console window for a profile and now reports all mouse button presses and releases in the `sysWindowMousePressEvent` and `sysWindowMouseReleaseEvent` instead of only the first three (left, right, middle). The code for the same things in Labels was checked and I found that we were generally okay there already except that we were fabricating native Qt mouse events for the mapper where it overlaid a label but we were using an older (Qt4 compatible) event that only handled one mouse wheel at a time and we were assuming it was for a vertical mouse wheel. As the owner of a mouse with two wheels that assumption is misplaced so I have rejigged `(bool) TLabel::forwardEventToMapper(QEvent*)` so that it can pass horizontal and vertical mouse wheel events in the future. The new constructor I mentioned in the previous paragraph was only introduced in Qt 5.12 but not documented as such so it was found necessary as a result of the CI process to reintroduce a different, older and now deprecated in current code, `QWheelEvent` constructor to support builds against Qt 5.11.x versions. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
…2621) This is a squash-and-merge of a number of commits with the following edited summary: This PR reorganises the 2D Painter code to draw the player room indicator AFTER all the rooms have been drawn so that it does not get overdrawn by rooms painted after the player's room - which it could be if the rooms are at maximum size or the area is in "gridMode". It also offers some alternative marker options in the form of an oversized ring around the room which reduces the obstruction of the details of the room when the marker is drawn on it. The alternatives are: * a fixed red colour ring * a fixed blue/yellow colour ring - two contrasting colours mean that it can not be lost if drawn over a room that already has one of them as its colour (environment) setting. * a customizable two colour ring where the user can set the outer and inner colours as they like - even to the same colour. The ancient `(bool) Host::mMapStrongHighlight` option is still respected, I note that it was introduced in 3cb1719 from 2011/01/20 (after Mudlet 1.0.5) and the code to control it was lost in 8b0e8bb from 2012/12/31 "NEW Vadim Peretokin: mapper remembers settings" just before the release of Mudlet 2.0...! Refactor: ensure player room is drawn last This is done by extracting the relevant room drawing code to a separate inline function that is used whilst iterating through the area rooms to paint them, skipping but noting if the player room is found and then that function is used to paint the player's room afterwards. Revise: made code acceptable to all compilers The clang compiler does not like `auto` being used as a type in function prototypes as it is not formally part of the C++14 standard but a GCC extension - it got put in by the Qt Creator function extraction code option on the refactor menu. Revise: allow player room marking customisation to be saved and restored They are saved with the profile's data rather than the map. Revise: show transparency effects in custom player room marker colours It is not possible to just colour the background of the `QPushButton`s that set the custom colours to use for the *custom* player room marker as the transparency effects do not show. Instead this commit arranges for an icon with a black-and-white checker board pattern is over-painted with a brush in the relevant colour so that when the opacity is less than 100% the pattern is shown to an extent which is proportional to the degree of transparency of the colour chosen. Refactor: extract code to start 2D map speed-walk & simplify drawRoom code Suggested in peer review comment: #2621 Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
/src/icons/black_white_transparent_check_1x3_ratio.png -- 0.43kb -> 0.38kb (11.19%) Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
This entails changing the name of the existing 32 Bits one so that another
one for 64 Bits can be placed alongside it in the same directory. The
Discord release zip file puts them (and the Linux and MacOs 64 bit ones) in
separate directories - which is a little inconvenient for us...
I have also put in some qDebug() messages - because I am having difficulty
getting the Discord RPC to respond to local builds - though it works fine
for Linux AppImages - which use the very same copy of the library for THAT
OS. They are enabled with a DEBUG_DISCORD #define visible to the
discord.cpp compilation unit...
Turns out the origin Windows libraries I had put in were both 32-bit ones -
the ones inserted now are described differently by the MSYS2 `file` command as:
* discord-rpc32.dll: "PE32 executable (DLL) (console) Intel 80386, for MS
Windows"
* discord-rpc64.dll: "PE32+ executable (DLL) (console) x86-64, for MS
Windows"
Further more they were certified and signed on "27 November 2018 17:20" so
that is consistent with them being the (current) version 3.4.0 release
files from that same date.
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* Update TTextEdit.cpp Put in a couple checks for bounds in front of every place I can imagine an out of bounds check is needed. * Update TTextEdit.cpp Fixed the signs, and moved code around to return on what would have caused the crash rather than just break out of a loop and never return the selected text. * Update TTextEdit.cpp I think this undoes all my changes. * Update TTextEdit.cpp Undo final change. * Update TTextEdit.cpp try catch blocks and variable dumps. * Update TTextEdit.cpp Fix crash condition reported at #3239 (comment) . * Update TTextEdit.cpp Removed the debug code as per Vadi2's request in #3241 (comment) .
…alised Forgot this when I was producting #2621 as I tend to use the other form of the map in a floating/dockable window. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
* New translations mudlet.ts (Italian) * New translations mudlet.ts (Portuguese, Brazilian) * New translations mudlet.ts (Portuguese, Brazilian) * New translations mudlet.ts (German) * New translations mudlet.ts (Russian) * New translations mudlet.ts (Italian) * New translations mudlet.ts (Italian) * New translations mudlet.ts (Portuguese, Brazilian) * New translations mudlet.ts (Italian) * New translations mudlet.ts (German) * New translations mudlet.ts (Russian) * New translations mudlet.ts (Chinese Simplified) * New translations mudlet.ts (Chinese Traditional) * New translations mudlet.ts (Dutch) * New translations mudlet.ts (English, United Kingdom) * New translations mudlet.ts (French) * New translations mudlet.ts (Greek) * New translations mudlet.ts (Pirate English) * New translations mudlet.ts (Polish) * New translations mudlet.ts (Portuguese) * New translations mudlet.ts (Spanish) * New translations mudlet.ts (Portuguese, Brazilian) * New translations mudlet.ts (Portuguese) * New translations mudlet.ts (Russian) * New translations mudlet.ts (Polish) * New translations mudlet.ts (Polish) * New translations mudlet.ts (Italian) * New translations mudlet.ts (Portuguese, Brazilian)
* Add Mud Sound Protocol (MSP) Support * Adjust URL to http, remove extra return * Resolving code compliance checks * Resolving code compliance checks * Resolving code compliance checks * Resolving code compliance checks * Resolving code compliance checks * Wildcards, CLAZY, slashes, break, nullptr and paths * Resolved directory creation issue, downloads working * Enhanced MSP with QAudio::CustomRole * Backed out QAudio, Possible final revisions * Updated Protocol Preferences in Settings * Code compliance * Code compliance * Code compliance * Trigger Windows & Linux builds * Updated download methodology * Code compliance * Code compliance * Resolving conflict * Code compliance * Introducing TMedia * Code Compliance * Code Compliance * Sets .wav and .mid correctly * Typo resolved * Security checks * GMCP Support * Code compliance * Added lua receiveMSP() * Code compliance * Resolving conflict * Updated CMakeLists.txt * Updated CMakeLists.txt * Updated CMakeLists.txt * Code compliance * Registered receiveMSP * Code compliance * Undo missing GNU * Refined code * Enhance GMCP Support * Enhance GMCP Support * Enhance GMCP Support * Code compliance * Added Suppression * Code compliance * Enhanced suppression * Implemented Priority * Added Validation * Code compliance * Resolved bug * Introducing GMCP.Media * Code compliance * Code compliance * GMCP volume bug resolved * mediaLocation by protocol * List fix * MediaKey constraints * matchMediaKeyAndStopMediaVariants * Code dedupe * Code dedupe * Resolving priority bug * Bug fixes * bool mediaContinue * Trialing Video * Untrialed video * Untrialed video * Removed target (no video) * Minor update * Documentation links * Code compliance * Wiki reference update * Resolve bug in XMLImport.cpp * Fix unintialised TMediaPlayer * Removed pointers * Fixed priority * Removed folder making from tag * Changed sub-directory generation * Adjust label names in preferences
This code:
local oldCL = createLabel
function createLabel(name, posX, posY, width, height, fillBackground)
oldCL(name, 0, 0, 0, 0, fillBackground)
moveWindow(name, posX, posY)
resizeWindow(name, width, height)
end
Doesn't understand the new parent argument, and thus no label gets created.
* Add missing Geyser file to mudet.pro * fix bloody typo Co-authored-by: Slobodan Terzić <githzerai06@gmail.com>
This file was added by accident.
* Adding a bunch of tests for Other.lua * Typo that bugged me
* Fix createStopWatch(nil) potentially crashing Mudlet Also "name as string or autostart as boolean are optional, got nil!" sounds pretty confusing to me, so I've edited out the optional part, like with other messages. If it's optional, then don't complain that you got nil... * Add note per review
Merge release-4.5 branch into development
Merge release-4.6 branch into development
* Update mudlet.pro * Update CMakeLists.txt
* Fixing typo in error message for table.is_empty * Adding tests and increasing coverage for TableUtils spec.
* Fix issue in _comp where table B containing keys table A does not have would still return true * Move table.size test to after the existing pairs loop so it will potentially fail faster * Further optimization to avoid relooping table A to get its size, instead track it while we're looping A anyway * Finished all pending tests in TableUtils_spec as most of them used the _comp function internally, and testing they still work increases confidence in this change * Removing duplicate but also strangely empty test
…release branches (#3412)
* Adjusting items in StringUtils to support the : function notation * Adding StringUtils spec, to make sure that the changes I made didn't break anything * Adjusting one test and adding one last one
* fix segfault with Composer window being left open * Added closeEvent to Composer window which clears pointer to itself in cTelnet when it gets closed without pushing save/cancel (such as clicking X or right-click and close) * Added to cTelnet destructor saying to close Composer window * Use QPointer and set flag to delete on close (#8) * Update dlgComposer.h * Update dlgComposer.cpp * Update ctelnet.cpp * Update ctelnet.h * Update dlgComposer.cpp * missed part (#9) * Update ctelnet.cpp * Update ctelnet.cpp
* flyoutLabel fixes Fixes some issues with flyoutLabels * remove closeNest and Geyser.Label.currentLabel leaving menu closes whole menu Made some changes that closeNest and Geyser.Label.currentLabel aren't now needed anymore leaving an menu will close the whole menu now as expected
ZookaOnGit
pushed a commit
that referenced
this pull request
Nov 27, 2025
…rocessing (Mudlet#8571) <!-- Keep the title short & concise so anyone non-technical can understand it, the title appears in PTB changelogs --> #### Brief overview of PR changes/additions Fix: heap-use-after-free when cleanup runs during alias/trigger/key processing #### Motivation for adding to Mudlet Fixes crash when running Mudlet#8559 (comment) benchmark on Linux. #### Other info (issues closed, discussion etc) ==617553==ERROR: AddressSanitizer: heap-use-after-free on address 0x51200086e6d0 at pc 0x589b650367f6 bp 0x7ffc44dbc700 sp 0x7ffc44dbc6f8 READ of size 8 at 0x51200086e6d0 thread T0 #0 0x589b650367f5 in Tree<TAlias>::isActive() const (/home/vadi/Programs/Mudlet/build/src/mudlet+0xe8a7f5) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #1 0x589b65d81408 in TAlias::match(QString const&) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1bd5408) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #2 0x589b6560c156 in AliasUnit::processDataStream(QString const&) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1460156) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #3 0x589b65c872b4 in Host::send(QString, bool, bool) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1adb2b4) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #4 0x589b65d96517 in TCommandLine::enterCommand(QKeyEvent*) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1bea517) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #5 0x589b65d93095 in TCommandLine::event(QEvent*) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1be7095) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #6 0x7ac668391c8a in QApplicationPrivate::notify_helper(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/widgets/kernel/qapplication.cpp:3307:31 #7 0x7ac66839b2f0 in QApplication::notify(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/widgets/kernel/qapplication.cpp:2725:39 #8 0x7ac668b83f7f in QCoreApplication::notifyInternal2(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1109:24 #9 0x7ac66840cc0b in QWidgetWindow::event(QEvent*) /home/qt/work/qt/qtbase/src/widgets/kernel/qwidgetwindow.cpp:285:23 #10 0x7ac668391c8a in QApplicationPrivate::notify_helper(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/widgets/kernel/qapplication.cpp:3307:31 #11 0x7ac668b83f7f in QCoreApplication::notifyInternal2(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1109:24 #12 0x7ac6677ee8e2 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) /home/qt/work/qt/qtbase/src/gui/kernel/qguiapplication.cpp:2609:46 #13 0x7ac655cf9a04 in QIBusPlatformInputContext::filterEventFinished(QDBusPendingCallWatcher*) /home/qt/work/qt/qtbase/src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.cpp:523:57 #14 0x7ac668be8b74 in QtPrivate::QSlotObjectBase::call(QObject*, void**) /home/qt/work/qt/qtbase/src/corelib/kernel/qobjectdefs_impl.h:461:57 #15 0x7ac668be8b74 in void doActivate<false>(QObject*, int, void**) /home/qt/work/qt/qtbase/src/corelib/kernel/qobject.cpp:4255:30 #16 0x7ac6671e5142 in void QMetaObject::activate<void, QDBusPendingCallWatcher*>(QObject*, QMetaObject const*, int, void*, QDBusPendingCallWatcher* const&) /home/qt/work/qt/qtbase/src/corelib/kernel/qobjectdefs.h:319:17 #17 0x7ac6671e5142 in QDBusPendingCallWatcher::finished(QDBusPendingCallWatcher*) /home/qt/work/qt/qtbase_build/src/dbus/DBus_autogen/include/moc_qdbuspendingcall.cpp:137:32 #18 0x7ac668bdd56b in QObject::event(QEvent*) /home/qt/work/qt/qtbase/src/corelib/kernel/qobject.cpp:1411:31 #19 0x7ac668391c8a in QApplicationPrivate::notify_helper(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/widgets/kernel/qapplication.cpp:3307:31 #20 0x7ac668b83f7f in QCoreApplication::notifyInternal2(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1109:24 #21 0x7ac668b879e4 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) /home/qt/work/qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1904:36 #22 0x7ac668e7d416 in postEventSourceDispatch /home/qt/work/qt/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246:39 #23 0x7ac6667145c4 (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5d5c4) (BuildId: 1eb6131419edb83b2178b682829a6913cf682d75) #24 0x7ac666773736 (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0xbc736) (BuildId: 1eb6131419edb83b2178b682829a6913cf682d75) #25 0x7ac666713a62 in g_main_context_iteration (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5ca62) (BuildId: 1eb6131419edb83b2178b682829a6913cf682d75) #26 0x7ac668e7caad in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) /home/qt/work/qt/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399:43 #27 0x7ac668b9002a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) /home/qt/work/qt/qtbase/src/corelib/kernel/qeventloop.cpp:186:22 #28 0x7ac668b8ba59 in QCoreApplication::exec() /home/qt/work/qt/qtbase/src/corelib/kernel/qcoreapplication.cpp:1452:36 #29 0x589b64ab0675 in main (/home/vadi/Programs/Mudlet/build/src/mudlet+0x904675) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #30 0x7ac66602a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #31 0x7ac66602a28a in __libc_start_main csu/../csu/libc-start.c:360:3 #32 0x589b649c1d04 in _start (/home/vadi/Programs/Mudlet/build/src/mudlet+0x815d04) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) 0x51200086e6d0 is located 16 bytes inside of 296-byte region [0x51200086e6c0,0x51200086e7e8) freed by thread T0 here: #0 0x589b64a9b9f1 in operator delete(void*) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x8ef9f1) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #1 0x589b65d80711 in TAlias::~TAlias() (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1bd4711) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #2 0x589b6560eefc in AliasUnit::doCleanup() (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1462efc) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #3 0x589b65c8e88d in Host::incomingStreamProcessor(QString const&, int) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1ae288d) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #4 0x589b651b73b5 in TMainConsole::runTriggers(int) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x100b3b5) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #5 0x589b64e39c4b in TBuffer::commitLine(char, unsigned long&) (/home/vadi/Programs/Mudlet/build/src/mudlet+0xc8dc4b) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #6 0x589b64e28d4e in TBuffer::translateToPlainText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, bool) (/home/vadi/Programs/Mudlet/build/src/mudlet+0xc7cd4e) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #7 0x589b651b638d in TMainConsole::printOnDisplay(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, bool) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x100a38d) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #8 0x589b64f9ed5b in TLuaInterpreter::feedTriggers(lua_State*) (/home/vadi/Programs/Mudlet/build/src/mudlet+0xdf2d5b) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #9 0x7ac66942ffa0 in luaD_precall /build/lua5.1-rMDsVj/lua5.1-5.1.5/src/ldo.c:320:10 #10 0x7ac66943ad7a in luaV_execute /build/lua5.1-rMDsVj/lua5.1-5.1.5/src/lvm.c:591:17 #11 0x7ac66942e96c in luaD_call /build/lua5.1-rMDsVj/lua5.1-5.1.5/src/ldo.c:378:5 #12 0x7ac66942af70 in luaD_rawrunprotected /build/lua5.1-rMDsVj/lua5.1-5.1.5/src/ldo.c:116:3 #13 0x7ac66942bb94 in luaD_pcall /build/lua5.1-rMDsVj/lua5.1-5.1.5/src/ldo.c:464:12 #14 0x7ac66942bce0 in lua_pcall /build/lua5.1-rMDsVj/lua5.1-5.1.5/src/lapi.c:821:12 #15 0x589b64fd65f1 in TLuaInterpreter::call(QString const&, QString const&, bool) (/home/vadi/Programs/Mudlet/build/src/mudlet+0xe2a5f1) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #16 0x589b65d84d31 in TAlias::execute() (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1bd8d31) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #17 0x589b65d84577 in TAlias::match(QString const&) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1bd8577) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #18 0x589b6560c156 in AliasUnit::processDataStream(QString const&) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1460156) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #19 0x589b65c872b4 in Host::send(QString, bool, bool) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1adb2b4) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #20 0x589b65d96517 in TCommandLine::enterCommand(QKeyEvent*) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1bea517) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #21 0x589b65d93095 in TCommandLine::event(QEvent*) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1be7095) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #22 0x7ac668391c8a in QApplicationPrivate::notify_helper(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/widgets/kernel/qapplication.cpp:3307:31 previously allocated by thread T0 here: #0 0x589b64a9b171 in operator new(unsigned long) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x8ef171) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #1 0x589b6500f595 in TLuaInterpreter::startTempAlias(QString const&, QString const&) (/home/vadi/Programs/Mudlet/build/src/mudlet+0xe63595) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #2 0x589b6512c41d in TLuaInterpreter::tempAlias(lua_State*) (/home/vadi/Programs/Mudlet/build/src/mudlet+0xf8041d) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #3 0x7ac66942ffa0 in luaD_precall /build/lua5.1-rMDsVj/lua5.1-5.1.5/src/ldo.c:320:10 #4 0x7ac66943ad7a in luaV_execute /build/lua5.1-rMDsVj/lua5.1-5.1.5/src/lvm.c:591:17 #5 0x7ac66942e96c in luaD_call /build/lua5.1-rMDsVj/lua5.1-5.1.5/src/ldo.c:378:5 #6 0x7ac66942af70 in luaD_rawrunprotected /build/lua5.1-rMDsVj/lua5.1-5.1.5/src/ldo.c:116:3 #7 0x7ac66942bb94 in luaD_pcall /build/lua5.1-rMDsVj/lua5.1-5.1.5/src/ldo.c:464:12 #8 0x7ac66942bce0 in lua_pcall /build/lua5.1-rMDsVj/lua5.1-5.1.5/src/lapi.c:821:12 #9 0x589b64fd65f1 in TLuaInterpreter::call(QString const&, QString const&, bool) (/home/vadi/Programs/Mudlet/build/src/mudlet+0xe2a5f1) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #10 0x589b65d84d31 in TAlias::execute() (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1bd8d31) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #11 0x589b65d84577 in TAlias::match(QString const&) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1bd8577) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #12 0x589b6560c156 in AliasUnit::processDataStream(QString const&) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1460156) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #13 0x589b65c872b4 in Host::send(QString, bool, bool) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1adb2b4) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #14 0x589b65d96517 in TCommandLine::enterCommand(QKeyEvent*) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1bea517) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #15 0x589b65d93095 in TCommandLine::event(QEvent*) (/home/vadi/Programs/Mudlet/build/src/mudlet+0x1be7095) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) #16 0x7ac668391c8a in QApplicationPrivate::notify_helper(QObject*, QEvent*) /home/qt/work/qt/qtbase/src/widgets/kernel/qapplication.cpp:3307:31 SUMMARY: AddressSanitizer: heap-use-after-free (/home/vadi/Programs/Mudlet/build/src/mudlet+0xe8a7f5) (BuildId: c98a5e4208b6daa52aa1b083c4ee6c4ab4552cc4) in Tree<TAlias>::isActive() const Shadow bytes around the buggy address: 0x51200086e400: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x51200086e480: fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa 0x51200086e500: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd 0x51200086e580: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x51200086e600: fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa =>0x51200086e680: fa fa fa fa fa fa fa fa fd fd[fd]fd fd fd fd fd 0x51200086e700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x51200086e780: fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa 0x51200086e800: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd 0x51200086e880: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x51200086e900: fd fd fd fd fd fd fd fd fd fd fd fd fd fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==617553==ABORTING Co-authored-by: Vadim Peretokin <vadi2@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.