Crash When Trying To Use Palconv On Multiple Palettes
Introduction
SLADE is a powerful resource editor for Doom and other id Tech games. It provides a wide range of features, including the ability to convert palettes. However, some users have reported a crash when trying to use the palconv
command on multiple palettes at once. In this article, we will investigate this issue and provide a solution.
System Information
- SLADE Version: 3.2.7
- OS: Windows 11 (build 26100), 64-bit edition
- Graphics Vendor: Intel
- Graphics Hardware: Intel(R) UHD Graphics
- OpenGL Version: 4.6.0 - Build 32.0.101.6129
Steps to Reproduce
To reproduce the crash, follow these steps:
- Select multiple palettes at once.
- Go into the console and enter "palconv".
Crash Information
When trying to use palconv
on multiple palettes, SLADE crashes with the following error message:
Version: 3.2.7 (x64)
No current action
Operating System: Windows 11 (build 26100), 64-bit edition
Graphics Vendor: Intel
Graphics Hardware: Intel(R) UHD Graphics
OpenGL Version: 4.6.0 - Build 32.0.101.6129
Stack Trace:
0: (H:\Dev\SLADE\Build\src\Archive\ArchiveEntry.cpp:136) slade::ArchiveEntry::parent
1: (H:\Dev\SLADE\Build\src\Archive\ArchiveEntry.cpp:182) slade::ArchiveEntry::data
2: (H:\Dev\SLADE\Build\src\Archive\ArchiveEntry.cpp:172) slade::ArchiveEntry::rawData
3: (H:\Dev\SLADE\Build\src\MainEditor\UI\ArchivePanel.cpp:2546) slade::ArchivePanel::palConvert
4: (H:\Dev\SLADE\Build\src\MainEditor\UI\ArchivePanel.cpp:4437) c_palconv
5: (H:\Dev\SLADE\Build\src\General\Console.cpp:227) slade::ConsoleCommand::execute
6: (H:\Dev\SLADE\Build\src\General\Console.cpp:94) slade::Console::execute
7: (H:\Dev\SLADE\Build\src\UI\Controls\ConsolePanel.cpp:202) slade::ConsolePanel::onCommandEnter
8: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\appbase.cpp:656) wxAppConsoleBase::CallEventHandler
9: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\event.cpp:1464) wxEvtHandler::ProcessEventIfMatchesId
10: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\event.cpp:1916) wxEvtHandler::SearchDynamicEventTable
11: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\event.cpp:1639) wxEvtHandler::TryHereOnly
12: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\event.cpp:1576) wxEvtHandler::ProcessEventLocally
13: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\event.cpp:1549) wxEvtHandler::ProcessEvent
14: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\event.cpp:1665) wxEvtHandler::SafelyProcessEvent
15: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\msw\textctrl.cpp:2120) wxTextCtrl::OnChar
16: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\appbase.cpp:656) wxAppConsoleBase::CallEventHandler
17: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\event.cpp:1464) wxEvtHandler::ProcessEventIfMatchesId
18: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\event.cpp:1061) wxEventHashTable::HandleEvent
19: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\event.cpp:1643) wxEvtHandler::TryHereOnly
20: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\event.cpp:1576) wxEvtHandler::ProcessEventLocally
21: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\event.cpp:1549) wxEvtHandler::ProcessEvent
22: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\event.cpp:1665) wxEvtHandler::SafelyProcessEvent
23: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\msw\window.cpp:6509) wxWindow::HandleChar
24: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\msw\window.cpp:3509) wxWindow::MSWHandleMessage
25: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\msw\textctrl.cpp:2381) wxTextCtrl::MSWHandleMessage
26: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\msw\window.cpp:4037) wxWindow::MSWWindowProc
27: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\msw\window.cpp:3083) wxWndProc
28: [unknown location] CallWindowProcW
29: [unknown location] IsWindowUnicode
30: [unknown location] IsDialogMessageW
31: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\msw\window.cpp:2948) wxWindow::MSWSafeIsDialogMessage
32: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\msw\window.cpp:2840) wxWindow::MSWProcessMessage
33: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\msw\evtloop.cpp:103) wxGUIEventLoop::PreProcessMessage
34: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\msw\evtloop.cpp:121) wxGUIEventLoop::ProcessMessage
35: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\msw\evtloop.cpp:180) wxGUIEventLoop::Dispatch
36: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\evtloopcmn.cpp:239) wxEventLoopManual::ProcessEvents
37: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\evtloopcmn.cpp:288) wxEventLoopManual::DoRun
38: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\evtloopcmn.cpp:87) wxEventLoopBase::Run
39: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\appbase.cpp:364) wxAppConsoleBase::MainLoop
40: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\common\init.cpp:575) wxEntryReal
41: (H:\Dev\SLADE\Build\msvc\build64\_deps\wxwidgets-src\src\msw\main.cpp:171) wxEntry
42: (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288) __scrt_common_main_seh
43: [unknown location] BaseThreadInitThunk
44: [unknown location] RtlUserThreadStart
Last Log Messages:
Setting up the OpenGL context
Initialising OpenGL...
OpenGL Version: 4.6
Max Texture Size: 16384x16384
Checking extensions...
Vertex Buffer Objects supported
Point Sprites supported
Framebuffer Objects supported
MAPINFO (Hexen/Old ZDoom) parsing not yet implemented
> palconv
Analysis
The stack trace indicates that the crash occurs in the ArchiveEntry
class, specifically in the parent
method. This method is called when trying to access the parent entry of an archive entry. The crash is likely caused
Q: What is the cause of the crash when trying to use palconv on multiple palettes?
A: The crash is caused by a bug in the ArchiveEntry
class, specifically in the parent
method. This method is called when trying to access the parent entry of an archive entry.
Q: What is the solution to this issue?
A: The solution is to update the ArchiveEntry
class to fix the bug in the parent
method. This can be done by modifying the code to correctly handle the parent entry of an archive entry.
Q: How can I update the ArchiveEntry
class to fix the bug?
A: To update the ArchiveEntry
class, you will need to modify the code in the ArchiveEntry.cpp
file. Specifically, you will need to change the parent
method to correctly handle the parent entry of an archive entry.
Q: What are the steps to update the ArchiveEntry
class?
A: The steps to update the ArchiveEntry
class are as follows:
- Open the
ArchiveEntry.cpp
file in a text editor. - Locate the
parent
method and modify it to correctly handle the parent entry of an archive entry. - Save the changes to the
ArchiveEntry.cpp
file. - Rebuild the SLADE project to incorporate the changes to the
ArchiveEntry
class.
Q: What are the potential consequences of not updating the ArchiveEntry
class?
A: If the ArchiveEntry
class is not updated to fix the bug, the crash will continue to occur when trying to use palconv
on multiple palettes. This can cause frustration and make it difficult to work with SLADE.
Q: Can I update the ArchiveEntry
class myself, or do I need to wait for an official update from the SLADE developers?
A: You can update the ArchiveEntry
class yourself, but it is recommended to wait for an official update from the SLADE developers. The SLADE developers have the expertise and knowledge to ensure that the update is correct and does not introduce any new bugs.
Q: How can I report the issue to the SLADE developers?
A: You can report the issue to the SLADE developers by submitting a bug report on the SLADE website or by contacting them directly through email or other means.
Q: What are the next steps after reporting the issue to the SLADE developers?
A: After reporting the issue to the SLADE developers, you can expect the following next steps:
- The SLADE developers will review the bug report and determine the cause of the issue.
- The SLADE developers will create a patch or update to fix the bug.
- The SLADE developers will test the patch or update to ensure that it is correct and does not introduce any new bugs.
- The SLADE developers will release the patch or update to the public.
Q: How long will it take for the SLADE developers to fix the issue?
A: The time it takes for the SLADE developers to fix the issue will depend on the complexity of the bug and the resources available to the SLADE developers. It is difficult to estimate the exact time it will take to fix the issue, but it is typically a few days to a few weeks.
Q: What can I do in the meantime to work around the issue?
A: In the meantime, you can work around the issue by using the palconv
command on a single palette at a time. This will allow you to continue working with SLADE without experiencing the crash.