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

The app crashes when i try to open the folder of an app (SimpleWall 3.6.2) #1224

Closed
nvn0 opened this issue Apr 30, 2022 · 13 comments
Closed
Labels

Comments

@nvn0
Copy link

nvn0 commented Apr 30, 2022

The app crashes when i try to open the folder(CTRL+ E) of an app in the apps menu
image

image

Then I get this message about the memory reference
If i close this window or click close simplewall shuts down.

Sry for send this prints in portuguese.

@nvn0 nvn0 changed the title The app crashes when i try to open the folder of an app The app crashes when i try to open the folder of an app (SimpleWall 3.6.2) Apr 30, 2022
@henrypp
Copy link
Owner

henrypp commented May 1, 2022

crashdump?

@henrypp henrypp added the bug label May 1, 2022
@nvn0
Copy link
Author

nvn0 commented May 1, 2022

this message appears saying that localization is not available (sry the portuguese)
but the same thing happens, the app closes
image

@henrypp
Copy link
Owner

henrypp commented May 1, 2022

Try to open manually

@nvn0
Copy link
Author

nvn0 commented May 1, 2022

I can't find it anywhere

@gettysburg
Copy link

Look for files with the file extension .dmp, if necessary search your entire hard drive.

Opening Event Viewer (open Start menu, then enter eventvwr.msc), then navigating to Windows Logs -> Application, and finding the crash entry for simplewall.exe might also provide valuable information (such as the fault address and module).

It is advised that you sort all Event Viewer entries by date and time, and then by severity.

@nvn0
Copy link
Author

nvn0 commented May 1, 2022

I couldn't find any .dmp file related to simplewall in my pc, the Henry++ folder doesn't even exist.
Event viewer does not show anything about simplewall. I even recreated the bug again and nothing was registered

@gettysburg
Copy link

I even recreated the bug again and nothing was registered.

That is likely because he registers his own exception handler, but please be advised that without a .dmp file we will not be able to figure out why simplewall crashes.

If you have any experience with debugging Windows applications, you could try to attach a free debugger like x64dbg to simplewall, then trigger the crash and see where the exception is thrown - a screenshot (including the call-stack) would already help us.

@nvn0
Copy link
Author

nvn0 commented May 1, 2022

I do not have much experience... but is this?
image
image

@gettysburg
Copy link

Thanks.

I took a short look using IDA, and it seems like ultimately a function responsible for freeing heap allocated memory crashes while dereferencing a pointer / argument passed through parameters, the function that ended up calling this function opens Windows Explorer and selects file (caller of crashing function is screenshot #1, crashing function is #2):

image
image

Highlighted parts of IDA pseudo-code are execution-flow / location of crash in second screenshot.

This makes sense, because you mentioned in your first post that simplewall crashes while you try to open the folder containing the binary of a user rule, and this feature would highlight the binary, which you can do if you pass /select argument to Explorer:

/select <object> Open a window view with the specified folder, file or application selected.

@henrypp

By the way, I just tried to use this option, and it causes the same crash on my system (Windows Server 2019 LTSC), crash dump also does not get created properly (because you try to write file to non-existent folder hierarchy, you have to create Henry++ folder in "AppData\Roaming" first, then "crashdumps" folder, and then you can write your crash dump file).

I hope my analysis helps to fix the problem, I could not find the two functions above in your public code-base but it is only 06:00 AM where I live and I did not have a coffee yet :-)

@Pandaa-P
Copy link

Pandaa-P commented May 7, 2022

@gettysburg what steps did you took to crash the app? opening the folder of an app from app menu does not crash the app for me.

Also I do have AppData\Roaming\Henry++\simplewall in AppData\Roaming when I installed simplewall. Closing simplewall, deleting the folder "Henry++" and restarting simplewall and from the menu choosing "open containing folder" does not crash the app either.

And we both run windows 10 enterprise ltsc with the same Kernel version.

Edit: clarifying my comment a bit

@gettysburg
Copy link

@Pandaa-P

I didn't crash it, the screenshot number 2 from nuno-source provided enough information for me to reverse-engineer it.

Closing the app, deleting it and restarting the app and from the menu choosing "open containing folder" does not crash the app either.

Weird, I'm guessing that it's some isolated bug here as well.

Also I do have AppData\Roaming\Henry++\simplewall in AppData\Roaming.

I don't have an AppData\Roaming\Henry++\simplewall , yet it works fine.

Seems like the folder hierarchy / crash dumps don't get created sometimes, this is also the reason I asked about the folder hierarchy because the Windows API will not create it for you if it doesn't exists, look at the winbase.h header and source files yourself.

@Pandaa-P
Copy link

Pandaa-P commented May 7, 2022

I don't have an AppData\Roaming\Henry++\simplewall , yet it works fine.

Maybe because it save profile.xml and simplewall.ini (which is what AppData\Roaming\Henry++\simplewall contain) to its installation folder as well.
in my system I have these two files on "AppData\Roaming\Henry++\simplewall" and on "C:\Program Files\simplewall"

@henrypp henrypp closed this as completed May 10, 2022
@gettysburg
Copy link

Confirmed fixed in Version 3.6.3, no crash.. but I initially did bamboozle myself:

I thought it was still broken when explorer.exe didn't launch, but that was due to me taking some unneeded permission away from simplewall:

image

So, all good, thanks for the fast fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants