TcT2k / HLMWadExplorer

Small tool to edit resources in Hotline Miami 2
GNU General Public License v3.0
62 stars 15 forks source link

»An assertion failed!« error (non-breaking) #2

Open jancborchardt opened 9 years ago

jancborchardt commented 9 years ago

Installation went fine, but when I open a file (like hlm2_data_desktop.wad), I get this error: »An assertion failed!«. Everything works fine, but that error is strange.

Backtrace:

ASSERT INFO:
/usr/include/wx-3.0/wx/strvararg.h(456): assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): format specifier doesn't match argument type

BACKTRACE:
[1] wxArgNormalizer<unsigned long>::wxArgNormalizer(unsigned long, wxFormatString const*, unsigned int)
[2] wxArgNormalizerWchar<unsigned long>::wxArgNormalizerWchar(unsigned long, wxFormatString const*, unsigned int)
[3] void wxLogger::Log<unsigned long, wxString>(wxFormatString const&, unsigned long, wxString)
[4] WADArchive::ApplyFilter(wxString const&)
[5] WADArchive::ParseFile()
[6] WADArchive::WADArchive(wxString const&, bool)
[7] ExploreFrame::OpenFile(wxString const&)
[8] ExploreFrame::OnOpenClicked(wxCommandEvent&)
[9] wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const
[10] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[11] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[12] wxEvtHandler::TryHereOnly(wxEvent&)
[13] wxEvtHandler::ProcessEventLocally(wxEvent&)
[14] wxEvtHandler::ProcessEvent(wxEvent&)
[15] wxWindowBase::TryAfter(wxEvent&)
[16] wxEvtHandler::SafelyProcessEvent(wxEvent&)
[17] wxMenuBase::SendEvent(int, int)
[18] g_closure_invoke
[19] g_signal_emit_valist
[20] g_signal_emit
[21] gtk_widget_activate
[22] gtk_menu_shell_activate_item
[23] g_closure_invoke
[24] g_signal_emit_valist
[25] g_signal_emit
[26] gtk_propagate_event
[27] gtk_main_do_event
[28] g_main_context_dispatch
[29] g_main_loop_run
[30] gtk_main
[31] wxGUIEventLoop::DoRun()
[32] wxEventLoopBase::Run()
[33] wxAppConsoleBase::MainLoop()
[34] wxEntry(int&, wchar_t**)
[35] main
[36] __libc_start_main
[37] _start
TcT2k commented 9 years ago

Give the latest commit a try: 91bdbd3565d391da9a1b6db126c68b984c96e402 Seems to be an issue when using %d on a size_t on 64 bit build.

jancborchardt commented 9 years ago

Great stuff, works now without any errors! (And yeah, I’m on a 64 bit system.)

For what it’s worth, there were also some notices during installation. No failures but maybe they help you to improve the code:

jan@Rechenknecht:~/HLMWadExplorer$ make
Scanning dependencies of target HLMWADExplorer
[ 14%] Building CXX object CMakeFiles/HLMWADExplorer.dir/App.cpp.o
[ 28%] Building CXX object CMakeFiles/HLMWADExplorer.dir/ExploreFrame.cpp.o
[ 42%] Building CXX object CMakeFiles/HLMWADExplorer.dir/HLMWADFrames.cpp.o
/home/jan/HLMWadExplorer/HLMWADFrames.cpp: In constructor ‘BaseExploreFrame::BaseExploreFrame(wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long int)’:
/home/jan/HLMWadExplorer/HLMWADFrames.cpp:101:21: warning: variable ‘openTool’ set but not used [-Wunused-but-set-variable]
  wxToolBarToolBase* openTool; 
                     ^
/home/jan/HLMWadExplorer/HLMWADFrames.cpp:104:21: warning: variable ‘saveTool’ set but not used [-Wunused-but-set-variable]
  wxToolBarToolBase* saveTool; 
                     ^
/home/jan/HLMWadExplorer/HLMWADFrames.cpp:109:21: warning: variable ‘extractTool’ set but not used [-Wunused-but-set-variable]
  wxToolBarToolBase* extractTool; 
                     ^
/home/jan/HLMWadExplorer/HLMWADFrames.cpp:114:21: warning: variable ‘applyTool’ set but not used [-Wunused-but-set-variable]
  wxToolBarToolBase* applyTool; 
                     ^
[ 57%] Building CXX object CMakeFiles/HLMWADExplorer.dir/WADArchive.cpp.o
/home/jan/HLMWadExplorer/WADArchive.cpp: In member function ‘bool WADArchive::Extract(const WADArchiveEntry&, wxOutputStream&)’:
/home/jan/HLMWadExplorer/WADArchive.cpp:121:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (copiedSize + readSize > entry.GetSize())
                             ^
[ 71%] Building CXX object CMakeFiles/HLMWADExplorer.dir/TexturePack.cpp.o
[ 85%] Building CXX object CMakeFiles/HLMWADExplorer.dir/TexturePackPanel.cpp.o
[100%] Building CXX object CMakeFiles/HLMWADExplorer.dir/StringTablePanel.cpp.o
Linking CXX executable HLMWADExplorer
[100%] Built target HLMWADExplorer

Cheers!