Debug is installed but when KMM crashes, the only message is Warning: QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave. KCrash: Application 'kmymoney.exe' crashing... The program starts, the price update is selected, the update window opens and then the crash occurs. Reproducible: Always Steps to Reproduce: 1.Create a new investment. 2.Select TPE as the symbol. 3.Select GPW as the source. 4.Select online price update. Actual Results: Crashes, as above. Expected Results: a) Should not crash without a message. b) Should produce debug info.
I've now tried on 4.6.3 and do get some output - Application: KMyMoney (kmymoney.exe), signal: EXCEPTION_ACCESS_VIOLATION [unknown]!KiFastSystemCallRet() [[unknown] @ -1] at 0x7c90e514 [unknown]!Sleep() [[unknown] @ -1] at 0x7c802455 [unknown]!StringFromGUID2() [[unknown] @ -1] at 0x774fe3e3 [unknown]!GetModuleFileNameA() [[unknown] @ -1] at 0x7c80b729 [unknown]!KiFastSystemCallRet() [[unknown] @ -1] at 0x7c90e514 [unknown]!I_RpcBCacheFree() [[unknown] @ -1] at 0x77e76caf [unknown]!I_RpcBCacheFree() [[unknown] @ -1] at 0x77e76ad1 [unknown]!I_RpcBCacheFree() [[unknown] @ -1] at 0x77e76c97 [unknown]!GetModuleFileNameA() [[unknown] @ -1] at 0x7c80b729 [unknown]!QTextCodec::toUnicode() [[unknown] @ -1] at 0x6713d837 [unknown]![unknown]() [[unknown] @ -1] at 0x646717c2 [unknown]!KiFastSystemCallRet() [[unknown] @ -1] at 0x7c90e514 [unknown]!GetModuleFileNameA() [[unknown] @ -1] at 0x7c80b729 [unknown]!KiFastSystemCallRet() [[unknown] @ -1] at 0x7c90e514 [unknown]!WmiFreeBuffer() [[unknown] @ -1] at 0x77df8631 [unknown]!GetModuleFileNameA() [[unknown] @ -1] at 0x7c80b729 [unknown]!KiFastSystemCallRet() [[unknown] @ -1] at 0x7c90e514 [unknown]!GetModuleFileNameA() [[unknown] @ -1] at 0x7c80b729
Created attachment 83161 [details] A possibly more useful backtrace with kmymoney symbols.
OK, I see now, the problem is this line [1]. QTextCodec::codecForName is used wihtou checking if a codec is actually returned. This should be changed to QTextCodec * codec = QTextCodec::codecForName(prober.encoding()); if (!codec) codec = QTextCodec::codecForLocale(); codec->toUnicode(page); [1] https://projects.kde.org/projects/extragear/office/kmymoney/repository/revisions/4.6/entry/kmymoney/converter/webpricequote.cpp#L138
(In reply to comment #3) > OK, I see now, the problem is this line [1]. QTextCodec::codecForName is > used wihtou checking if a codec is actually returned. This should be changed > to > > QTextCodec * codec = QTextCodec::codecForName(prober.encoding()); > if (!codec) > codec = QTextCodec::codecForLocale(); > codec->toUnicode(page); > > [1] > https://projects.kde.org/projects/extragear/office/kmymoney/repository/ > revisions/4.6/entry/kmymoney/converter/webpricequote.cpp#L138 As this works without apparent problem in Linux, but not on Windows, does this suggest that the required codec is not available on Windows for some reason? There appears to have been no change to this code since pre 4.6, so the user can't revert. Is this a question of waiting for 4.7, or might there be a new Windows version earlier? That said, though, 4.6.3 at least crashes more gracefully.
This should be fixed since QTextCodec::codecForName. "Returns 0 if no codec matching the name name could be found."
Git commit 26a476404b103fb5020974a165fd64664eb67f1f by Cristian Oneț. Committed on 09/08/2014 at 20:04. Pushed by conet into branch 'master'. Avoid crashing if the detected codec does not exist. M +4 -1 kmymoney/converter/webpricequote.cpp http://commits.kde.org/kmymoney/26a476404b103fb5020974a165fd64664eb67f1f
Git commit 2f72c46e476e957070d7fd99030e21b46dd74229 by Cristian Oneț. Committed on 09/08/2014 at 20:04. Pushed by conet into branch 'frameworks'. Avoid crashing if the detected codec does not exist. (cherry picked from commit 26a476404b103fb5020974a165fd64664eb67f1f) M +4 -1 kmymoney/converter/webpricequote.cpp http://commits.kde.org/kmymoney/2f72c46e476e957070d7fd99030e21b46dd74229