pyfa-org / Pyfa

Python fitting assistant, cross-platform fitting tool for EVE Online
GNU General Public License v3.0
1.61k stars 408 forks source link

Crash on opening fit / searching market #598

Closed blitzmann closed 7 years ago

blitzmann commented 8 years ago

Some folks are experiencing random crashes in Windows. If you're experiencing these issues, please post here and subscribe to the thread - I may have you try to test a few things.

EDIT:

WORKAROUND:

IndianaJars commented 8 years ago

Crashes within 10 Seconds of opening a fit, tried different fits, tried uninstalling and reinstalling

Zagor24 commented 8 years ago

I've been experiencing crashes as well. Every time i open an already fitted ship, or if i try to fit modules on a blank fit, the client crashes. If i open a new fit with no modules, the client remains stable, i can check ship stats, change character profiles etc... but as soon as i open some module category in the market section and look at individual modules, it crashes. I know for a fact that it started out of the blue, before i installed the citadel update. Previous version was working fine, then i havent used it for some time, and wanted to check something around the time citadel went live, and it started crashing. I thought updating to the latest version would fix it (i even deleted the client completely, and made a fresh install), but it didnt help. Tried multiple ships and fits, same thing. I'm running Win 10 64bit.

blitzmann commented 8 years ago

Did you guys try the Citadel pre-release? If so, were you experiencing crashes on that build? If you haven't, please download and test it out (on the Releases page) - it should use a separate test database so you current fits shouldn't be affected.

locten commented 8 years ago

can confirm importing a fit crashes both Preview: Character Implants build and singularity-1027729: Citadel Pre-Release build after around 5-10 seconds.

aran-hotchkiss commented 8 years ago

Someone commented on the EvE-o forums about running the program in administrator mode.... I tried that and it seems to have resolved all issues for me - hasn't crashed once since I did that. Suggest you fellas try it and see if it works.

locten commented 8 years ago

ok so apparently running as admin fixed the problem could have sworn i had already tried that its usually the 1st thing i try if something crashes but guess i dident.

blitzmann commented 8 years ago

What the literal fuck... That makes no sense. BUT, gives me more information so yay. Updating the OP

Zagor24 commented 8 years ago

Confirmed, its working in admin mode.

blitzmann commented 8 years ago

Can you guys try the Character Implant Preview and let me know if that build crashes?

https://github.com/pyfa-org/Pyfa/releases/tag/preview_char_implants To prevent database corruption, I wouldn't modify your chars while running that build, as it currently uses your current user database and I'm not sure how it will react with this older version.

blitzmann commented 8 years ago

Also, take a peek in event viewer and post the info it has on pyfa:

Quick and dirty: http://www.cyberlink.com/support/faq-content.do?id=10449

Zagor24 commented 8 years ago

Here's the info from the Event Viewer:

Faulting application name: pyfa.exe, version: 1.15.1.0, time stamp: 0x549debdc Faulting module name: COMCTL32.dll, version: 6.10.10586.0, time stamp: 0x5632d2bf Exception code: 0xc000041d Fault offset: 0x0007dc89 Faulting process id: 0x2848 Faulting application start time: 0x01d1a5c88c324ce4 Faulting application path: C:\Program Files (x86)\pyfa\pyfa.exe Faulting module path: C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10586.0_none_d3c2e4e965da4528\COMCTL32.dll Report Id: 4fb54582-797e-464e-8c69-24641e8f45fb Faulting package full name: Faulting package-relative application ID:

blitzmann commented 8 years ago

@zagor thanks. Can you also try the character implant preview release and let me know if that crashes as well? I'm just trying to narrow down which changes may have caused the offending crash

EDIT: pretty sure this relates to something in the GUI. The module that fails is Windows Common Controls, which I believe is where wxwidgets gets it's UI elements from.

locten commented 8 years ago

so i tried the character implant preview and it dident crash opened event viewer to try and get that for you turned auto use admin mode off and now it docent crash even if i don't run as admin...

locten commented 8 years ago

even deleting all associated files and reinstalling and running without admin it docent crash any more so im super confused now lol

ullerrm commented 8 years ago

One reproducable crash: Open a fit in a tab, then delete the fit from the Ships pane.

blitzmann commented 8 years ago

For those experiencing the crash, please send me your database file (%userprofile%/.pyfa/saveddata.db). Email is in README.

Can I get others to confirm that it doesn't crash when running the character preview build? Getting more confirmation will help narrow it down.

@ullerrm that is a different issue that's been known about. See #164

blitzmann commented 8 years ago

Can anyone else confirm the above?

digitalwolf commented 8 years ago

I have the crash, even in the preview build, unless I run as administrator.

ErinOswell commented 8 years ago

Confirming this; crashes when I have a fitting open and search for a module in market tab, oddly it works fine searching in the market tab with no fittings open. Will try running as admin.

EDIT: Confirmed running as admin solved the crash issue for now.

Ecnav commented 8 years ago

I am having the exact same issue as ErinOswell and running as administrator seems to have worked for me as well.

mrnsnp commented 8 years ago

Crash occurs shortly after I switch over to market tab to start ship fitting. Win10 Pro

•System ◦Provider [ Name] Windows Error Reporting ◦EventID 1001 [ Qualifiers] 0 Level 4 Task 0 Keywords 0x80000000000000 ◦TimeCreated [ SystemTime] 2016-05-07T15:42:19.247618900Z EventRecordID 1255 Channel Application Computer DELLONE-PC Security •EventData 108127056753 1 APPCRASH Not available 0 pyfa.exe 1.15.1.0 549debdc COMCTL32.dll 6.10.10586.0 5632d2bf c0000005 0007dc89 C:\Users\DELL ONE\AppData\Local\Temp\WER4EA7.tmp.WERInternalMetadata.xml C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_pyfa.exe_cb32231e4999c411fdf6dbbd71d651675f20ab_971b30ad_dd577048 0 169a3bf8-4255-46ae-84e9-6e9d5da189e4 0 3a41bcf74eaf715fbe0cecd144234446

blitzmann commented 8 years ago

@digitalwolf when you say preview release, do you mean the citadel preview or the character implant preview? I want to make sure that the crash is / is not happening with this one: https://github.com/pyfa-org/Pyfa/releases/tag/preview_char_implants

aaronmallen commented 8 years ago

+1

blitzmann commented 8 years ago

Alright guys, I have a favor to ask of you. Can you please download and run each of these builds and note if the crashing happens? Try each build two or three times. Make sure they stay separate (do not overwrite one build install with another, keep them separate after extracting).

When done, please post results here (which builds worked, which builds failed. Each build archive is prefixed with a number that you can use to identify each one). This is extremely important in trying to narrow down which change causes the crashing, because after looking through the relevant code there is no reason to require admin privileges.

It should also be noted that these builds should be using their own test database, so it shouldn't affect your user user database with fits.

http://dl.eve-files.com/media/1605/1-pyfa-20160508-dc55db-win.zip http://dl.eve-files.com/media/1605/2-pyfa-20160508-ca34d7-win.zip http://dl.eve-files.com/media/1605/3-pyfa-20160508-48b45b-win.zip http://dl.eve-files.com/media/1605/4-pyfa-20160508-443c91-win.zip http://dl.eve-files.com/media/1605/5-pyfa-20160508-80e47d-win.zip http://dl.eve-files.com/media/1605/6-pyfa-20160508-ca91f6-win.zip http://dl.eve-files.com/media/1605/7-pyfa-20160508-0d41cb-win[1].zip

Aarondorn2 commented 8 years ago

Also happening for me about 10-20 seconds after launching the app. Tried uninstalling, reinstalling, previous versions, different fits, etc.

blitzmann commented 8 years ago

What do you mean by different versions? Others have stated that 1.20 seems to work. Is that not the case for you? Can you also look at my previous comments and test out those builds that I provided

TeophanuTivianne commented 8 years ago

First of all - I get the constant crashes in 1.21, but only if I remove modules from a fit or close a few tabs with fits in them, or open the settings (unless I delete the settings folder, in which case this is not an issue), this is all fixed by running the app in admin mode. 1.20 crashes the second I start it up for me.

Now (for whatever reason) even my main Pyfa install (latest release) crashes as soon as I open it, unless run as admin.

For the 7 builds: None of those builds work for me. Build 1 complains that it can't find module "pyfamain" and doesn't start at all Build 2 crashes when I search the market for mods (after a few seconds, but without adding any module to any fits), but ONLY when I actually have a fit open, UNLESS I actually open a module (or whatever) market group, then it crashes even without any open fits. It does however not crash when I remove modules, or open the settings, or close opened fits. Build 3 behaves (as far as I have tested) just like 2. Build 4 is basically the same as 2&3 (as far as I can tell) Build 5 is the same as the ones before Build 6 exactly as before Build 7 again the same

I'm on Windows 10, 64 bit.

blitzmann commented 8 years ago

So 1.20 doesn't work for you? What is the latest stable released on the releases page that does work for you? I wonder if that's a separate issue as someone said1.20 worked for them... =(

Aarondorn2 commented 8 years ago

1.20 is not currently working for me; it was working previously without any issues. I installed 1.21, started experiencing the crashes, rolled back to 1.20 and am still experiencing them.

Thanks for the hard work - this is such an amazing tool. I'll try the builds listed above.

Aarondorn2 commented 8 years ago

my results from the builds above: builds 1 & 4 fail to launch (different errors), the rest crash with the same behavior as 1.21 (typically immediately after attempting to fit a module to a ship).

blitzmann commented 8 years ago

Can you try, in order, 1.17.1, 1.18, 1.19.1?

It doesn't make any sense to me to have 1.20 work, but not work upon downgrade, unless it's a database issue. Can you mail me your saveddata.db file to the email listed on the readme?

blitzmann commented 8 years ago

Also, if you're feeling adventurous... this might help a lot:

https://github.com/pyfa-org/Pyfa/wiki/Setting-Up-Development-Environment

Follow those steps to get a very minimal dev environment set up and run pyfa directly from source. This might print out errors that are otherwise lost. All python stuff is contained within the python install directory, so it's easy to uninstall when it's no longer useful (simply delete the directory)

I have tried a variety of computer at my disposal, none of which are having this issue =(

Another thing: do these crashes happen with both the installed version (.exe) and the extracted version (.zip)?

Aarondorn2 commented 8 years ago

I tried 1.17.1, 18, and 1.19.1 - all same error. I've been using PYFA for about 7 months, so these versions have worked for me before.

I sent you my saveddata.db - there are also 4 saveddata_migration and a saveddata-test file in that folder.

Thanks!

blitzmann commented 8 years ago

Thanks for the info, and the database. =)

The fact the older versions also no longer work makes me believe it's something environmental - something going on with the system. The fact that it started happening with the latest version is curious though. Fuck if I know.

Honestly I'm out of ideas apart from trying to run pyfa through the python interpreter as stated before. I'll continue to look around and see if I can find any answers, but for now running as admin may be the only way to resolve this. =/

Aarondorn2 commented 8 years ago

Thanks for looking into it!

Running as admin hasn't crashed yet! So I'll use that for now, thanks!

mrnsnp commented 8 years ago

Admin level operation works for me. I'm wondering if windows isn't wanting to allow read/write access to database and crashing out. Seams like the most likely culprit as Admin doesn't crash, so its a privilege error.

blitzmann commented 8 years ago

I don't understand why though. The user database is written to ~/.pyfa/ which the user should always have write access to. The eve database is installed wherever pyfa is installed - default is Program Files, which is restricted - I can see this happening if we were writing to the EVE DB, but that's not the case as far as I'm aware. We only read from it. And then the fact that this just started happening, and is now apparently being applied retroactively to older versions that never had an issue. I am lost.

It would be nice if there was a way to determine why it needs admin - like what operations is it trying to do that determine it, but I don't know how to test for that.

narthollis commented 8 years ago

If it is a file read/write issue then sysinternals process monitor is the tool to use. Sadly it's a bit involved getting useful info from it. On 10 May 2016 7:19 a.m., "Ryan Holmes" notifications@github.com wrote:

I don't understand why though. The user database is written to ~/.pyfa/ which the user should always have write access to. The eve database is installed wherever pyfa is installed - default is Program Files, which is restricted - I can see this happening if we were writing to the EVE DB, but that's not the case as far as I'm aware. We only read from it. And then the fact that this just started happening, and is now apparently being applied retroactively to older versions that never had an issue. I am lost.

It would be nice if there was a way to determine why it needs admin - like what operations is it trying to do that determine it, but I don't know how to test for that.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/pyfa-org/Pyfa/issues/598#issuecomment-218000664

blitzmann commented 8 years ago

@narthollis thanks! I'll try to get that up and running this week and see if I notice anything on my end even if I can't reproduce. Otherwise I may have to put up a little how-to here for others to try.

blitzmann commented 8 years ago

As a side note, I really don't believe it is a file read/write issue, considering the error comes from windows CommonControls. I strongly believe this is some sort of error being thrown at the wxWidgets layer (similar to #441)

mrnsnp commented 8 years ago

Faulting application name: pyfa.exe, version: 1.15.1.0, time stamp: 0x549debdc Faulting module name: COMCTL32.dll, version: 6.10.10586.0, time stamp: 0x5632d2bf Exception code: 0xc0000005 Fault offset: 0x0007dc89 Faulting process id: 0x11e4 Faulting application start time: 0x01d1aae421275b5d Faulting application path: C:\Users\DELL ONE\Documents\pyfa\pyfa.exe Faulting module path: C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.10586.0_none_d3c2e4e965da4528\COMCTL32.dll Report Id: 97a34004-1fbf-4026-b083-494f7e43c399 Faulting package full name: Faulting package-relative application ID:

PYFA is experiencing an access violation in the comctl32.dll on my system if I have a fit loaded and open the market browser.

Figure this site might help you as it lists everything comctl32.dll is linked to in Win10: http://windows10dll.nirsoft.net/comctl32_dll.html

This is making me want to learn programming

blitzmann commented 8 years ago

This is making me want to learn programming

Please do! It's frustrating at times, but very rewarding if you can solve the problem. :)

Also thanks for the report. Can you guys try to run sfc /scannow at an admin command prompt? Apparently theres been some issues online with Explorer.exe crashing with COMCTL32.dll, and this is something frequently suggested. Maybe it will help?

mrnsnp commented 8 years ago

I ran sfc /scannow admin lvl on my home computer with no issues found, same crashes as my work laptop which are my earlier posts. I'll run same thing on work laptop and post if it finds a problem. I'm wondering if the issue is somewhere in the stack for GUI.

Update 5/11: Had SysInternals running on my work laptop with PYFA open. Loaded a fit, no problems. Opened market browser with fit open, browsed drones, fighter, and selected light fighters, pyfa crashed. Result according to SysInternals - Buffer Overflow. Six buffer overflow in a row. Appears to occur when you get to were you can view modules. The appears to be four more buffer overflows as the system is finish closing PYFA, related to the regqueryvalue. Further update, with SysInternals running, launched PYFA as admin, had no errors loading a fit and browsing the market. However, upon closing PYFA, Registry Buffer Overflow as admin. Finished running SFC /SCANNOW admin console on work laptop, no issues found.

If python doesn't have a natural buffer overflow protection, might I recommend checking on seeing if it has one you can add to prevent buffer overflow from the market arrays in the database?

hom3gr0wn commented 8 years ago

Pyfa Loads but when i click on a ship fit it locks up and crashes

blitzmann commented 8 years ago

@mrnsnp excellent info, thank you! Is there a way to export the results of sysinternals, or take a screenshot with as much relevant info as you can?

Can you also try these versions and tell me if sysinternals gives the same information for the crash: https://github.com/pyfa-org/Pyfa/releases/tag/v1.17.1 https://github.com/pyfa-org/Pyfa/releases/tag/v1.18.0 https://github.com/pyfa-org/Pyfa/releases/tag/v1.19.1

mrnsnp commented 8 years ago

There is however I didn't have my usb drive at work, so anything submitted for the next 36 hrs is going to be based off of my home system. I'll update this post based on relevant info for the listed releases. This is interesting, I launched PYFA with my sysinternals suite active on my home device and its not crashing using PYFA build 1.21.1

Sent you some log files. All generated using pyfa 1.21.1, since this is where the errors started occurring. Wondering if me running Sysinternals and Visual Studios loaded since this morning made a system change that's stopped the crash.

Downloaded PYFA 1.17.1, 1.18.0, and 1.19.1. No issues to report on my machine in terms of crashes.

PYFA 1.17.1 - Generated a large number of buffer overflow calls. All Related to RegQueryValue, QuerySecurityFile, QueryAllInformationFile, RegEnumValue. PYFA 1.18.0 - Generated a large number of Buffer Overflow calls. All related to RegEnumValue, RegQueryValue, PYFA 1.19.1 - Generated a large number of buffer overflow calls. All related to QueryAllinformationFile and RegQueryValue, RegEnumValue,

90% of the QueryAllInformationFile tend to be from imgs.zip and pyfa\settings. Not sure if python has anything designed to handle responses that overflow the starting buffer.

I know that buffer overflow on the stack can cause programs to do weird things do to loss information its expecting.

If someone else would be willing on a Windows sytem, install Visual Studio Community 2015 with Update 2 - Free. VS Community 2015 has support for python, so perhaps, there is a DLL or something from it that has stopped the crash. I wont be able to verify with my work machine until 5/13.

blitzmann commented 8 years ago

Yeah, whenever you can please provide comprehensive evaluation of the versions listed (as well as current release of course) along with exported data / screenshots. That's the next best thing to being able to reproduce it myself.

blitzmann commented 8 years ago

@mrnsnp I see you update your post. I'll take a look at it when I can and go from there. In the future though please make a new post to the thread - I don't receive notifications for post edits like I do for new posts, and it'll be easy to miss. =)

blitzmann commented 8 years ago

Update: I also get buffer overflows. However, I don't believe these are errors (see http://superuser.com/questions/491597/process-monitor-entrys-with-buffer-overflow), and I don't think they are related to the problem here (which I would think would happen with or without admin rights).

@mrnsnp you stated that 1.17, 1.18, and 1.19 work fine without admin rights, correct? That contradicts what @Aarondorn2 said in his comment (https://github.com/pyfa-org/Pyfa/issues/598#issuecomment-217764937) so I'm not sure if there's another separate issue there.

I'll be posting to the wxpython group today to see if anyone has any ideas.

blitzmann commented 8 years ago

more info: the exception that causes the crash is one of these two:

Access violation seems to be most common (only one report of the first one)