Access violation when importing MSG
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 978
- Forks
- 170
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 5
Description
I am trying to import MSG file(s) into a folder of an Internet Folders store (an IMAP account). When I open the target folder and execute Folder > Import > From MSG... with Load message into current folder style, MFCMapi throws access violation at:
with the following call stack:
PSTPRX32.DLL!CImapSyncManager::HrSyncFolder(struct _feid *,struct IMAPIProgress *,int,int,unsigned long *)
PSTPRX32.DLL!CIMAPFolderProxy::EmIIMAPFolder::OnFolderChanged(void)
PSTPRX32.DLL!CIMAPMessageProxy::OnFolderChanged(void)
PSTPRX32.DLL!CIMAPMessageProxy::EmIIMAPMessage::CheckPoint(unsigned long)
PSTPRX32.DLL!CIMAPMessageProxy::SaveChanges(unsigned long)
MFCMapi.exe!file::LoadFromMSG::__l14::<lambda_2>::operator()()
MFCMapi.exe!file::LoadFromMSG(const std::wstring & szMessageFile={...}, IMessage * lpMessage=0x000002788542cb08, HWND__ * hWnd=0x00000000000f0c20)
MFCMapi.exe!dialog::CFolderDlg::OnLoadFromMSG::__l18::<lambda_2>::operator()()
Interestingly the message does actually appear in the store and I can see it in the Outlook, however, restarting MFCMapi and logging into a session after each file is slightly inconvenient, as I have thousands files to import.
Anything I can do? I tried to pass various flags to SaveChanges but it did not help.
(I can drag & drop the MSG files into the folder using Outlook, however, they will have received dates of the import, not of the original files.)
MFCMAPI version 16.0.0.1044
Outlook Version: 16.0.16811.20004
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at core/mapi/mapiFile.cpp line 128 and trace file::LoadFromMSG through SaveChanges using the provided call stack. Reproduce the import into an IMAP folder with “Load message into current folder” and compare behavior with Outlook drag-and-drop. Done means importing multiple MSG files without an access violation or restarting MFCMAPI, while retaining the original message dates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100