Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browse Files menu in ReEvaluation causes program to crash #20

Closed
dnorgaard-usgs opened this issue Dec 13, 2017 · 5 comments

Comments

Projects
None yet
1 participant
@dnorgaard-usgs
Copy link
Contributor

commented Dec 13, 2017

Analysis -> Re Evaluate -> (Scans tab) -> Browse Files...

Trying to browse for files in Open files dialog from here causes the program to crash.

@dnorgaard-usgs

This comment has been minimized.

Copy link
Contributor Author

commented Dec 13, 2017

Seems to also be issue with other file browsing options (e.g. File -> Split/Merge PakFiles, File->Import). Except for Add Reference.

@dnorgaard-usgs dnorgaard-usgs self-assigned this Dec 13, 2017

@dnorgaard-usgs

This comment has been minimized.

Copy link
Contributor Author

commented Dec 13, 2017

For some reason it throws a null pointer exception in CFECFileDialog::OnFileNameChange() where ever there is a reference to GetParent(). E.g.:

UINT nfiles = CommDlg_OpenSave_GetSpec(GetParent()->m_hWnd, &dummy_buffer, 1);

Passing in 'this' for parent in fileDialog constructor did not help. Changed GetParent()->m_hWnd to just m_hWnd and that seemed to do the trick.

@dnorgaard-usgs

This comment has been minimized.

Copy link
Contributor Author

commented Dec 13, 2017

Also fixed the funny char that shows up in file type drop down by modifying the pak file filters to:

TCHAR filter[] = _T("Pak Files|.pak|All Files|.*||");

@dnorgaard-usgs

This comment has been minimized.

Copy link
Contributor Author

commented Dec 13, 2017

fixed

dnorgaard-usgs referenced this issue in dnorgaard-usgs/NOVACProgram Dec 13, 2017

@dnorgaard-usgs dnorgaard-usgs reopened this Jan 5, 2018

@dnorgaard-usgs

This comment has been minimized.

Copy link
Contributor Author

commented Jan 5, 2018

Seems the fix will work only for a small number of files. The CommDlg functions return 0 when m_hWnd is used instead of GetParent()->m_hWnd. Yet, the latter cannot be done. This article has some useful info:

http://codexpert.ro/blog/2013/05/19/file-open-dialog-with-multiple-selection-part-1-old-style/
http://codexpert.ro/blog/2013/05/20/file-open-dialog-with-multiple-selection-part-2-vista-style/

dnorgaard-usgs added a commit that referenced this issue May 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.