Summary: | KMyMoney crashes when attempting on-line price update with suspect source parameters. | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | allan <agander93> |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | onet.cristian, stanislaw.szolkowski |
Priority: | NOR | ||
Version: | 4.6.4 | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | http://commits.kde.org/kmymoney/2f72c46e476e957070d7fd99030e21b46dd74229 | Version Fixed In: | |
Attachments: | A possibly more useful backtrace with kmymoney symbols. |
Description
allan
2013-10-27 13:49:34 UTC
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 |