WohlSoft / Moondust-Project

Moondust Project by Wohlstand
https://wohlsoft.ru/projects/Moondust/
GNU General Public License v3.0
250 stars 39 forks source link

Crash when removing SMBX2 tiles in SMBX1.3 mode #611

Open thedarkcave215 opened 1 day ago

thedarkcave215 commented 1 day ago

Which component?

Describe the bug In the world map screen, when selecting the option to "Remove All" on any SMBX2-exclusive tiles while having the configuration loaded from SMBX1.3, the program crashes with a Signal Segmentation Fault

To Reproduce Steps to reproduce the behavior:

  1. Start application PGE Editor
  2. Open a .wldx file
  3. Right-click on a scenery object and select Remove All
  4. See errors or crash happen

Expected behavior For the program to correctly remove all tiles of the type specified

Screenshots If applicable, add screenshots to help explain your problem.

Crash report and log files

We're sorry, but Moondust Editor has crashed. 
Reason: Signal Segmentation Violation [SIGSEGV]

================================================
            Additional information:
================================================
Platformer Game Engine - Editor version: 0.3.2.2-beta2
Architecture: x86_64 (64-bit)
GIT Revision code: a05932b
GIT branch: master
Build date: 2024-10-02 01:10:55 UTC
================================================
Qt 5.14.2
SDL2 2.30.7
SDL Mixer X 2.7.0
================================================
 Please send this log file to the developers by one of ways:
 - Via contact form:          https://wohlsoft.ru/contacts/
 - Official forums:           https://wohlsoft.ru/forum/
 - Make issue at GitHub repo: https://github.com/WohlSoft/Moondust-Project
================================================
Important note: please don't post this report at third-party forums
and chat servers (including ANY SMBX-related community servers with
no exceptions). Otherwise, you have an EXTREMELY SMALL CHANCE of
getting the proper support. We can give you a support at OFFICIAL
RESOURCES listed above only.
================================================

0   Moondust Editor                     0x0000000102e90104 _ZN12CrashHandler13getStacktraceEv + 68
1   Moondust Editor                     0x0000000102e91336 _ZN12CrashHandler23doCrashScreenAndCleanupE7QString + 134
2   Moondust Editor                     0x0000000102e9176e _ZN12CrashHandler13crashBySIGNALEi + 526
3   libsystem_platform.dylib            0x00007ff817f73e9d _sigtramp + 29
4   ???                                 0x00007faf44843a00 0x0 + 140390745520640
5   Moondust Editor                     0x0000000102ff6dd4 _ZN9ItemScene11contextMenuEP24QGraphicsSceneMouseEvent + 5220
6   Moondust Editor                     0x0000000103b5eea4 _ZN13QGraphicsItem10sceneEventEP6QEvent + 484
7   Moondust Editor                     0x0000000103b81c64 _ZN21QGraphicsScenePrivate14sendMouseEventEP24QGraphicsSceneMouseEvent + 628
8   Moondust Editor                     0x0000000103b8b257 _ZN14QGraphicsScene17mouseReleaseEventEP24QGraphicsSceneMouseEvent + 55
9   Moondust Editor                     0x0000000103007d5c _ZN8WldScene17mouseReleaseEventEP24QGraphicsSceneMouseEvent + 1036
10  Moondust Editor                     0x0000000103b86a00 _ZN14QGraphicsScene5eventEP6QEvent + 944
11  Moondust Editor                     0x000000010389120c _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 268
12  Moondust Editor                     0x00000001038926ac _ZN12QApplication6notifyEP7QObjectP6QEvent + 588
13  Moondust Editor                     0x00000001042ee8a4 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 212
14  Moondust Editor                     0x0000000102e9d0a5 _ZN17GraphicsWorkspace17mouseReleaseEventEP11QMouseEvent + 1237
15  Moondust Editor                     0x00000001038cb382 _ZN7QWidget5eventEP6QEvent + 450
16  Moondust Editor                     0x000000010396a3ed _ZN6QFrame5eventEP6QEvent + 45
17  Moondust Editor                     0x0000000103bad977 _ZN13QGraphicsView13viewportEventEP6QEvent + 1191
18  Moondust Editor                     0x00000001042eeb6e _ZN23QCoreApplicationPrivate29sendThroughObjectEventFiltersEP7QObjectP6QEvent + 206
19  Moondust Editor                     0x00000001038911f7 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 247
20  Moondust Editor                     0x000000010389412d _ZN12QApplication6notifyEP7QObjectP6QEvent + 7373
21  Moondust Editor                     0x00000001042ee8a4 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 212
22  Moondust Editor                     0x0000000103891b44 _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPointerIS0_Ebb + 900
23  Moondust Editor                     0x00000001038e9ff8 _ZN13QWidgetWindow16handleMouseEventEP11QMouseEvent + 1704
24  Moondust Editor                     0x00000001038e8d1b _ZN13QWidgetWindow5eventEP6QEvent + 235
25  Moondust Editor                     0x000000010389120c _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 268
26  Moondust Editor                     0x00000001038926ac _ZN12QApplication6notifyEP7QObjectP6QEvent + 588
27  Moondust Editor                     0x00000001042ee8a4 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 212
28  Moondust Editor                     0x0000000103c088ca _ZN22QGuiApplicationPrivate17processMouseEventEPN29QWindowSystemInterfacePrivate10MouseEventE + 3434
29  Moondust Editor                     0x0000000103bf015b _ZN22QWindowSystemInterface22sendWindowSystemEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 219
30  Moondust Editor                     0x0000000103256580 _ZN28QCocoaEventDispatcherPrivate19processPostedEventsEv + 320
31  Moondust Editor                     0x0000000103256cf8 _ZN28QCocoaEventDispatcherPrivate26postedEventsSourceCallbackEPv + 40
32  CoreFoundation                      0x00007ff818025266 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
33  CoreFoundation                      0x00007ff818025208 __CFRunLoopDoSource0 + 157
34  CoreFoundation                      0x00007ff818024fdf __CFRunLoopDoSources0 + 203
35  CoreFoundation                      0x00007ff818023c5a __CFRunLoopRun + 960
36  CoreFoundation                      0x00007ff8180232aa CFRunLoopRunSpecific + 536
37  HIToolbox                           0x00007ff823af8fe3 RunCurrentEventLoopInMode + 292
38  HIToolbox                           0x00007ff823afe807 ReceiveNextEventCommon + 201
39  HIToolbox                           0x00007ff823afeb62 _BlockUntilNextEventMatchingListInModeWithFilter + 66
40  AppKit                              0x00007ff81b8bfd8b _DPSNextEvent + 902
41  AppKit                              0x00007ff81c2dc4c8 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1290
42  AppKit                              0x00007ff81b8b0eb7 -[NSApplication run] + 610
43  Moondust Editor                     0x0000000103255a95 _ZN21QCocoaEventDispatcher13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 2741
44  Moondust Editor                     0x00000001042ea7ff _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 431
45  Moondust Editor                     0x00000001042eef12 _ZN16QCoreApplication4execEv + 130
46  Moondust Editor                     0x000000010301416e main + 4702
47  dyld                                0x0000000205e642cd start + 1805

Desktop specs (please complete the following information):

Additional context The world I loaded was originally created using SMBX2, which has more scenery tiles. When I loaded the world file with a SMBX1.3 config, the missing scenery tiles from SMBX2 turn into bugged textures. I was initially trying to remove the SMBX2 tiles, and tried clicking Remove All, and then the program crashed as seen above.

Let me know if there's anything I may be missing here.

Wohlstand commented 1 day ago

Looks weird, but thanks for a note, that's not supposed to crash when removing any non-registered objects...

thedarkcave215 commented 23 hours ago

@Wohlstand I'd also like to add that it doesn't crash when removing a single tile from the context menu, only when removing all of them.