WagicProject / wagic

Wagic the Homebrew
Other
347 stars 76 forks source link

Add check for NULL this pointer in is_open #1055

Closed Ryan1729 closed 3 years ago

Ryan1729 commented 3 years ago

I was getting crashes on windows, so I ran it under the VS 2010 debugger, and I got an Unhandled Exception in zstream.h's is_open method. The debugger said the this pointer was NULL, so I added a check for that, returning false if that is the case.

Screenshot 2021-03-06 114651

Vitty85 commented 3 years ago

Actually the error cannot be fully solved in that way i guess, if "this" pointer is null while you are accessing its isOpen() method probably there was a memory corruption before that point, maybe the program couldn't load correctly some zip file because of file corruption or something like that.

When you break the exception, can you check the zip file it was trying to open following the stack?

In any case i will take a look if with null check the crashes will be reduced or not.

Vitty85 commented 3 years ago

I close this request because i tried a different solution for those random crashes. You can download the new release from the official links.

Ryan1729 commented 3 years ago

I gave that version a try and it seems to be working so far. Cool.

Vitty85 commented 3 years ago

Nice to hear that, let me know if other problems occur, see you.

-- Inviato da iPhone

Il giorno 10 mar 2021, alle ore 07:46, Ryan Wiedemann @.***> ha scritto:

 I gave that version a try and it seems to be working so far. Cool.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.