xCHM icon indicating copy to clipboard operation
xCHM copied to clipboard

Crash on opening

Open kakohari opened this issue 1 year ago • 9 comments

Debian 10 x64 xCHM 1.23 (via apt/repo)

When opening attached file the following error is thrown: `ASSERT INFO: ../src/common/unichar.cpp(65): assert "Assert failure" failed in ToHi8bit(): character cannot be converted to single byte

BACKTRACE: [1] wxUniChar::ToHi8bit(unsigned int) [2] wxURI::Unescape(wxString const&) [3] wxFileSystem::URLToFileName(wxString const&) [4] wxFileSystem::OpenFile(wxString const&, int) [5] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) [6] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) [7] wxEvtHandler::TryHereOnly(wxEvent&) [8] wxEvtHandler::ProcessEventLocally(wxEvent&) [9] wxEvtHandler::ProcessEvent(wxEvent&) [10] wxWindowBase::TryAfter(wxEvent&) [11] wxEvtHandler::SafelyProcessEvent(wxEvent&) [12] wxToolBarBase::OnLeftClick(int, bool) [13] g_closure_invoke [14] g_signal_emit_valist [15] g_signal_emit_by_name [16] g_closure_invoke [17] g_signal_emit_valist [18] g_signal_emit [19] g_closure_invoke [20] g_signal_emit_valist [21] g_signal_emit [22] g_closure_invoke [23] g_signal_emit_valist [24] g_signal_emit [25] gtk_propagate_event [26] gtk_main_do_event [27] g_main_context_dispatch [28] g_main_loop_run [29] gtk_main [30] wxGUIEventLoop::DoRun() [31] wxEventLoopBase::Run() [32] wxAppConsoleBase::MainLoop() [33] wxEntry(int&, wchar_t**) [34] __libc_start_main

` DATEV_Format_Pruefprogramm.zip

I am not quite sure if the file is corrupt itself - DATEV is known for shitty IT-business while being the german thing for payroll and taxes...

kakohari avatar Jul 13 '22 17:07 kakohari

I'm not sure what's happening there, but the latest (released) xCHM version is 1.33, and I can open your .chm with no issues using it on Arch Linux (see attached screenshot). Maybe you could open an issue on Debian's bug tracker?

Screenshot_2022-07-13_20-54-24

rzvncj avatar Jul 13 '22 17:07 rzvncj

You may also be able to compile xCHM yourself, if you prefer - it should be relatively painless (please see the instructions on the project's main page). It's possible that wxWidgets also needs to be updated, which is slightly more involved, but not impossible. Let me know if you want to try this.

rzvncj avatar Jul 13 '22 18:07 rzvncj

Thanks for your quick reply, I will https://xkcd.com/303/ and post another reply here.

kakohari avatar Jul 19 '22 17:07 kakohari

I'm using 1.33 and have the same issue with one file, I've downloaded the file in the issue and it has opened correctly and now my file also open correctly (although it show wrong characters for ñ and tilde vowels).

Could it be that when it first open a file with a non ascii character it have the error but then it ignore it?

PhoneixS avatar Aug 22 '22 06:08 PhoneixS

I'm using 1.33 and have the same issue with one file, I've downloaded the file in the issue and it has opened correctly and now my file also open correctly (although it show wrong characters for ñ and tilde vowels).

Could it be that when it first open a file with a non ascii character it have the error but then it ignore it?

No, if the same version of xCHM crashes the first time when opening a certain file, it should always crash on opening that file. Maybe you've upgraded your wxWidgets library in the meantime, or installed additional fonts on your machine?

rzvncj avatar Aug 22 '22 06:08 rzvncj

No, if the same version of xCHM crashes the first time when opening a certain file, it should always crash on opening that file. Maybe you've upgraded your wxWidgets library in the meantime, or installed additional fonts on your machine?

No, it was only minutes apart.

PhoneixS avatar Aug 22 '22 06:08 PhoneixS

Is there any cache or something similar?

PhoneixS avatar Aug 22 '22 06:08 PhoneixS

What OS are you using? What wxWidgets version are you using? Is it built with Unicode support? Can you post the CHM file that crashed the application?

rzvncj avatar Aug 22 '22 06:08 rzvncj

Is there any cache or something similar?

There is no cache.

rzvncj avatar Aug 22 '22 06:08 rzvncj