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

Error: Process finished with exit code -1073741819 (0xC0000005) #45

Open
mansoorfayyaz opened this issue Jun 15, 2017 · 6 comments
Open

Comments

@mansoorfayyaz
Copy link

mansoorfayyaz commented Jun 15, 2017

Im getting following error while trying the sample code provided in pyCharm CE. Plz advise how to resolve this.

Process finished with exit code -1073741819 (0xC0000005)

during debug i found that execution stucks at init.py at line 13

InputSource        = jpype.JClass('org.xml.sax.InputSource')

Im using the following sample code:

from boilerpipe.extract import Extractor

extractor = Extractor(extractor='ArticleExtractor', url='http://edition.cnn.com/2017/05/31/asia/kabul-explosion-hits-diplomatic-area/index.html')
extractor = Extractor(extractor='KeepEverythingWithMinKWordsExtractor', url=your_url, kMin=20)

extracted_text = extractor.getText()
extracted_html = extractor.getHTML()

Thanks.

@tuxdna
Copy link
Collaborator

tuxdna commented Jun 15, 2017

@mansoorfayyaz This issue looks specific to PyCharm setup. Can you create a python script that reproduces the same issue from command line ?

@mansoorfayyaz
Copy link
Author

@tuxdna
yes tried the same thru command line and got the following windows msg.

"Python has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if s solution is available."

and then no solution was suggested.

@tuxdna
Copy link
Collaborator

tuxdna commented Jun 16, 2017

@mansoorfayyaz Can you share the script ?

@mansoorfayyaz
Copy link
Author

mansoorfayyaz commented Jun 16, 2017

@tuxdna Im using the same sample usage script provided in the package description. Here it is.

from boilerpipe.extract import Extractor
#url = 'http://edition.cnn.com/2017/05/31/asia/kabul-explosion-hits-diplomatic-area/index.html'
extractor = Extractor(extractor='ArticleExtractor', url='http://edition.cnn.com/2017/05/31/asia/kabul-explosion-hits-diplomatic-area/index.html')
extracted_text = extractor.getText()
extracted_html = extractor.getHTML()
print("extracted text: " + extracted_text)
print("extracted html: " + extracted_html)

Did some digging into this error and i think it has to do with the java virtual machine installed but cant figure out the exact cause n remedy. I confirmed that python 3.6 and java runtime installed in windows 10 are 32 bit . Ive also tried the following script found at #https://stackoverflow.com/questions/23430466/jpype-class-not-found
This script again generated the same error - Process finished with exit code -1073741819 (0xC0000005).

import jpype
#jpype.startJVM("C:\Program Files (x86)\Java\jre1.8.0_121\bin\client\jvm.dll",'-ea' )
jpype.startJVM(jpype.getDefaultJVMPath(), "-ea")
util = jpype.JPackage("java.util")
al = util.ArrayList()
al.add(1)
al.add(2)
print(al.size())
jpype.shutdownJVM()

@tuxdna
Copy link
Collaborator

tuxdna commented Jun 20, 2017

In the following snippet, at which line does the process finish?

import jpype
#jpype.startJVM("C:\Program Files (x86)\Java\jre1.8.0_121\bin\client\jvm.dll",'-ea' )
jpype.startJVM(jpype.getDefaultJVMPath(), "-ea")
util = jpype.JPackage("java.util")
al = util.ArrayList()
al.add(1)
al.add(2)
print(al.size())
jpype.shutdownJVM()

Based on your earlier report I guess it is at util = jpype.JPackage("java.util"). Can you confirm ?

If that is the case then surely there is something breaking between jpype and JVM

@mansoorfayyaz
Copy link
Author

error occurs at jpype.startJVM()

jpype.startJVM(jpype.getDefaultJVMPath(), "-ea")

Error: Process finished with exit code -1073741819 (0xC0000005)

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

No branches or pull requests

2 participants