bruderstein / PythonScript

Python Script plugin for Notepad++
http://npppythonscript.sourceforge.net/
GNU General Public License v2.0
351 stars 66 forks source link

Access Violation when click Show Console (1.2) #102

Open Benur21 opened 6 years ago

Benur21 commented 6 years ago

Hello. I just installed Notepad++ x86 on my computer, and then I installed PythonScript 1.2.

But the first time I click on Show Console, on PythonScript menu, I get the message "Access Violation" with the title "PluginsManager::runPluginCommand Exception". The next times just display an empty console. But after I restart notepad++, when I click Show Console I get the error again.

The same message appears when I click to run any script (startup.py or some sample), but the message title only says "Exception".

Any ideas on what might be wrong? Thank you.

chcg commented 6 years ago

@Benur21
How is this related to #100 ? Is the x64 version working for you and just the 32bit x86 version shows this exception messages? I haven't observed this yet.

Benur21 commented 6 years ago

Yes x64 is fine (EDIT: I'm not really sure about this, I will check it on x64 and update this post soon), x86 is not, and this is not related to #100. Why do you think it is? :/

UPDATE: x64 has this same problem too: image

chcg commented 6 years ago

@Benur21 Was just wondering why this should be a x86 only problem. Maybe is related to #21 Where is the plugin dll located in your case? At %APPDATA% or under ProgramFiles ?

Benur21 commented 6 years ago

@chcg Hmm, I edited the title, it's not x86 only anymore. And I can't see how #21 is related to this. It says #21 would be solved at 1.0.8. and this problem is at 1.2.

I can reproduce this issue. Is there anything I can do to find more details about it?

Benur21 commented 6 years ago

@chcg I just saw your edit. The plugin dll is in the Notepad++ installation folder, which you can see in the screenshoot above. I installed Notepad++ in a folder in my desktop. The plugins are going to Notepad++\plugins.

Benur21 commented 6 years ago

Is it normal that the console shows up empty and doesn't react to these commands? image This is what happens when I open the console after the Access Violation error

contrail12 commented 6 years ago

Did anyone figure out what's going on here? Really missing my PythonScript scripts.

Benur21 commented 6 years ago

@contrail12 As far as I know, nope. :(

sasumner commented 6 years ago

@contrail12 Sure, nobody likes waiting on a fix, but if you are missing your scripts, have you tried downgrading to PS 1.1.0.0 or 1.0.8.0?

contrail12 commented 6 years ago

@sasumner thanks for the suggestion! I feel silly for not having thought of that...

contrail12 commented 6 years ago

OK, I went to downgrade and much to my surprise; I found that I was already running PythonScript 1.0.8.0 and was having the same problem identified in the OP. I then upgraded to PythonScript 1.2.0.0, now everything works, and I'm elated!

Here's some more info about my setup in case my observation will help a real dev fix the OP:

Thanks again for the suggestion @sasumner! Also, PythonScript makes my job a LOT easier to do, and I supper appreciate all of the dev effort that everyone contributes to make it a reality. Thank you everyone!

chcg commented 6 years ago

@Benur21 You should see something like:

Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)] Initialisation took 4156ms Ready.

help Type help() for interactive help, or help(object) for help about object. test Traceback (most recent call last): File "", line 1, in NameError: name 'test' is not defined

on starting the console window. Seems python27.dll is not found at the right place.

Benur21 commented 5 years ago

Just saying v1.3 (updated using plugin manager) still has this problem. Maybe it has to do with the "DON'T USE %APPDATA%" thing when installing notepad++ (I check that box)?

Benur21 commented 5 years ago

Hi, I'm back. It was still giving error, so I did following: Tried: Fully uninstalled notepad++. (checked instalation folder and appdata and ensured they were empty) Reinstalled notepad++ 7.6.1 with all default options (like Next, Next, Next, Install...) Installed PythonScript_1.3.0.0.msi. (again Next, Next, Next...) Opened notepad++. Clicked Plugins button. ????

image

Then tried: Fully uninstalled notepad++. (checked instalation folder and appdata and ensured they were empty) Reinstalled notepad++ 7.5.9 with default options (like Next, Next, Next, Install...) Executed PythonScript_1.3.0.0.msi. Clicked Remove because it looked like I didn't uninstall it much correctly. Executed PythonScript_1.3.0.0.msi second time. (Next, Accept, Next, Next, Install....) Opened notepad++. Clicked Plugins button, PythonScript, Show Console. Yes!

image

Then tried: Correctly Remove PythonScript via PythonScript_1.3.0.0.msi. (yay didn't forget it!) Fully uninstalled notepad++. (checked instalation folder and appdata and ensured they were empty) Reinstalled notepad++ 7.5.9, now only with Don't use %APPDATA%. For some reason it still put some xml files in appdata. Installed PythonScript_1.3.0.0.msi, all default options. Show Console is working again!


Next: Correctly Remove PythonScript via PythonScript_1.3.0.0.msi. Fully uninstalled notepad++. (checked instalation folder and appdata and ensured they were empty) Reinstalled notepad++ 7.5.9, to custom location (same location as the first screenshot in this issue). (everything else is default options) Installed PythonScript_1.3.0.0.msi, all default options except location which is the same as notepad++. Opened notepad++. Tried it. Raged.

image But now we know where's the problem. It doesn't work well on custom install location. The ç and õ in the installation path may be breaking it as well.

sasumner commented 5 years ago

Nice trail of debugging! Wish that all/most could be that thorough...

The ç and õ in the installation path may be breaking it as well.

Possibly related to #112 ?

Benur21 commented 5 years ago

Now I reinstalled to \Instalacoes\ instead and the console indeed worked. Yes it seems to be related to #112.

chcg commented 5 years ago

@Benur21 Thanks for tracking down the issue to be a duplicate of #112. Interestingly the number of the emergency call ;-)

@sasumner https://en.wikipedia.org/wiki/112_(emergency_telephone_number)#E112

amibct commented 5 years ago

I was able to activate the plugin as below:

  1. Install latest NPP on D: ( A drive other than system drive ) to be able to check "do not use App Data..."
  2. Install old Plugin Manager plugin in NPP( the updater folder containing "gpup.exe" must be copied manually then )
  3. Install Python Script plugin by using Plugin Manager
  4. Open npp\plugins folder and move PythonScript.dll to the folder PythonScript already there.

Now it's fine working

andry81 commented 5 years ago

Open npp\plugins folder and move PythonScript.dll to the folder PythonScript already there.

OMG, why is the latest release still suggest broken zip file? https://github.com/bruderstein/PythonScript/releases/tag/v1.3.0 https://github.com/bruderstein/PythonScript/releases/download/v1.3.0/PythonScript_Full_1.3.0.0.zip

<root>
 |
 +- plugins
     |
     +- PythonScript
     |
     +- PythonScript.dll

I spent hours to figure out that the dll must be placed inside the <root>/plugins/PythonScript instead of <root>/plugins. Just great. -.-

sasumner commented 5 years ago

OMG, why is the latest release still suggest broken zip file?

Broken zip file? Sigh.

So Notepad++ comes out with a new required folder structure for plugins AFTER PS 1.3.0.0 is released, and that is somehow Pythonscript's fault?

andry81 commented 5 years ago

So Notepad++ comes out with a new required folder structure for plugins AFTER PS 1.3.0.0 is released, and that is somehow Pythonscript's fault?

Yes, because related to this topic (Access Violation). At least it should be addressed in the file name like PythonScript_Full_1.3.0.0_before_npp7.6.0.zip or something like that.

sasumner commented 5 years ago

@andry81 Contact @chcg and let him know that you have extra time and are willing to take on such administrative duties as renaming files to keep the world happy.

vsrawat commented 5 years ago

When someone is saying something, it is improper to cut him short, retort to him, taunt him, mock him, put burden on him, etc. so that he is silenced.

This is a help group, and people write here when they have a problem, mostly they have not already zeroed in the cause of the problem. They are giving vent to their frustration when a working thing suddenly stops working and their work suffers.

Thanks. -- Rawat

On 3/20/2019 1:06 AM, sasumner wrote:

@andry81 https://github.com/andry81 Contact @chcg https://github.com/chcg and let him know that you have extra time and are willing to take on such administrative duties as renaming files to keep the world happy.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bruderstein/PythonScript/issues/102#issuecomment-474545526, or mute the thread https://github.com/notifications/unsubscribe-auth/AISGl9RE_4VHjqtW2vEcCZhIBR8PRv9fks5vYTw5gaJpZM4WZmnK.

sasumner commented 5 years ago

@vsrawat And if people are going to vent their frustration, they really should have their facts in order before doing so.

andry81 commented 5 years ago

@sasumner This is not a court to represent facts, this is open source platform to find facts on your own and make an argument. If you doubt in something just make an opposite argument to enlight your position.

sasumner commented 5 years ago

@andry81 I can't seem to pull any value out of those 2 sentences. Gives up...

vsrawat commented 5 years ago

he faced a problem and he offered a solution that changing naming system of file would make it very clear and people will not face such confusion in future.

That seems a good easy workable solution.

It should be implemented, without bothering about other things that he said.

Thanks. -- Rawat

On 3/20/2019 2:06 AM, sasumner wrote:

@vsrawat https://github.com/vsrawat And if people are going to vent their frustration, they really should have their facts in order before doing so.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bruderstein/PythonScript/issues/102#issuecomment-474573397, or mute the thread https://github.com/notifications/unsubscribe-auth/AISGlxNbvxmpwvulpZN9W7-FRQjOyzoDks5vYUpDgaJpZM4WZmnK.

daveSkr commented 5 years ago

OK, so this little forum spat seems to have died down, only it still IMPOSSIBLE to install PythonScript in Notepad++ and get it to run; first you need to manually extract files to different locations and when you're done and have double-checked everything, it refuses to run on an "Access violation" error.

Any idea when, if ever, this will be fixed? Because I really liked using PythonScript in Notepad++ ...

chcg commented 5 years ago

See https://github.com/bruderstein/PythonScript/releases/tag/v1.5.2 for a version compatible with the current N++ 7.8 release. Pythonscript will be also available again with the next N++ release from PluginAdmin.