Skip to content

Crash with access violation (exit code -1073741819 (0xC0000005)) on Windows 10 #32776

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

Closed
Mereep opened this issue Mar 17, 2020 · 6 comments · Fixed by #33267
Closed

Crash with access violation (exit code -1073741819 (0xC0000005)) on Windows 10 #32776

Mereep opened this issue Mar 17, 2020 · 6 comments · Fixed by #33267
Labels
good first issue Needs Tests Unit test(s) needed to prevent regressions

Comments

@Mereep
Copy link

Mereep commented Mar 17, 2020

# Your code here
import pandas as pd
pd.__version__
Out[3]: '0.24.2'
t1 = {'a': 1, 'b': 1}
t2 = {'a': 2, 'b': 2}
test = [t1, t2],  # note the errernous comma at the end of the line 
type(test)
Out[7]: tuple
test
Out[8]: ([{'a': 1, 'b': 1}, {'a': 2, 'b': 2}],)
pd.DataFrame(test)
Process finished with exit code -1073741819 (0xC0000005)

Short:

pd.DataFrame(tuple([[1],[2]]))
Process finished with exit code -1073741819 (0xC0000005)

Problem description

Problem was caused in my case by having an additional comma at the end of a line that caused
a list of dicts being a tuple of list of dicts which caused that behaviour.

Althought the argument should not be accepted by Pandas, Pandas should raise an appropriate Exception instead of tearing Python down.

@jbrockmendel
Copy link
Member

Can you try this on a newer version of pandas?

@jbrockmendel jbrockmendel added the Segfault Non-Recoverable Error label Mar 17, 2020
@mroeschke mroeschke added Needs Info Clarification about behavior needed to assess issue Windows Windows OS labels Mar 17, 2020
@Mereep
Copy link
Author

Mereep commented Mar 17, 2020

New version seems to fix that

t1 = {'a': 1, 'b': 1}
t2 = {'a': 2, 'b': 2}
test = [t1, t2],
pd.DataFrame(test)
 0                 1
{'a': 1, 'b': 1}  {'a': 2, 'b': 2}
pd.__version__
'1.0.2'

Latest version seems to fix it. However, I can reproduce the faulty behaviour in a fresh conda environment with the old pandas version.

The thread may be closed. However, it should be checked if this problem was intentionally fixed at some point or its fixed by chance.

@simonjayhawkins
Copy link
Member

Latest version seems to fix it. However, I can reproduce the faulty behaviour in a fresh conda environment with the old pandas version.

The thread may be closed. However, it should be checked if this problem was intentionally fixed at some point or its fixed by chance.

Thanks @Mereep for the report. I can confirm this issue is a duplicate of #25691 was fixed in #25731

9fbb9e7 is the first new commit
commit 9fbb9e7
Author: Tao He [email protected]
Date: Fri Apr 5 08:45:19 2019 +0800

BUG: Convert tuple to list before `_list_to_arrays` when construct DataFrame. (#25731)

@simonjayhawkins simonjayhawkins added good first issue Needs Tests Unit test(s) needed to prevent regressions and removed Needs Info Clarification about behavior needed to assess issue Segfault Non-Recoverable Error Windows Windows OS labels Apr 1, 2020
@simonjayhawkins simonjayhawkins added this to the Contributions Welcome milestone Apr 1, 2020
@BenjaminLiuPenrose
Copy link
Contributor

I just try to reproduce the bug.

For pandas<=0.24.2, running pd.DataFrame(tuple([[1],[2]])) will lead to python crash and exit
For pandas>=0.25.0, running pd.DataFrame(tuple([[1],[2]])) is fine as described by @Mereep

@BenjaminLiuPenrose
Copy link
Contributor

In pandas==0.24.2
cap1

In pandas==0.25.0
cap2

@BenjaminLiuPenrose
Copy link
Contributor

Guess this issue thread can be closed now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Needs Tests Unit test(s) needed to prevent regressions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants