Segfault with custom `argparse` types
See original GitHub issueSystem information
Key | Value |
---|---|
Nuitka version | 1.2.1 |
Commercial | None |
Python | 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] |
Flavor | Unknown |
Executable | C:\…\venv\Scripts\python.exe |
OS | Windows |
Arch | x86_64 |
WindowsRelease | 10 (Build: 2009.19044) |
How did you install Nuitka and Python?
python -m venv venv
source ./venv/Scripts/activate
pip install nuitka ordered-set
deactivate
The specific PyPI names and versions
Nuitka==1.2.1
ordered-set==4.1.0
Reproducible application
nuitka-argparse-segfault.zip Outputs of the application (all of them were ran in a Git Bash window; Git for Windows v2.38.1) :
# ./venv/Scripts/python.exe App.py -d "2022-01-01"
Got arguments: Namespace(date=datetime.datetime(2022, 1, 1, 0, 0))
# ./venv/Scripts/python.exe App.py -d "2022-01-01 .. 2022-01-31"
Got arguments: Namespace(date=(datetime.datetime(2022, 1, 1, 0, 0), datetime.datetime(2022, 1, 31, 0, 0)))
# App.exe -d "2022-01-01"
Got arguments: Namespace(date=datetime.datetime(2022, 1, 1, 0, 0))
# App.exe -d "2022-01-01 .. 2022-01-31"
Segmentation fault
Nuitka build command
python -m nuitka \
--mingw64 \
--standalone \
--warn-implicit-exceptions \
--warn-unusual-code \
--prefer-source-code \
--follow-stdlib \
--remove-output \
--disable-bytecode-cache \
--disable-ccache \
--disable-dll-dependency-cache \
--show-scons \
--show-progress \
--python-flag='-O' \
--enable-plugin=anti-bloat \
--enable-plugin=multiprocessing \
--noinclude-pytest-mode=nofollow \
--noinclude-setuptools-mode=nofollow \
--output-dir='C:\nuitka-compile' \
--windows-company-name='Nuitka' \
--windows-product-name='App' \
--windows-product-version='1.0.0' \
--windows-file-description='App :: Description.' \
App.py
Possible regression?
I’m unsure about that as I never wrote that logic for another Nuitka version.
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
C++ 11 Segfault with several bools in initialization list
First, "I get a weird segfault right in the beginning" is not even close to an error description. So please post the exact...
Read more >Fatal Python Error: Segmentation fault - Raspberry Pi Forums
I have an error when i run my custom voice assistant program on Raspberry Pi 3B ... import argparse import locale import logging...
Read more >How to create custom argparse types in Python? - Medium
To achieve this we will use a custom type that uses the datetime library to validate that the argument is a valid 24hr...
Read more >List of issues - Python tracker - Issue Tracker
__sizeof__ cause a segfault on del, open, xxm. argparse: add_argument(... nargs='+', metavar=<tuple>) does not work with positional arguments.
Read more >Random segfaults for python rqt plugin - ROS Answers
setObjectName('SimControl') # Process standalone plugin command-line arguments from argparse import ArgumentParser parser = ArgumentParser() ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is part of the hotfix release 1.2.2 that I just made.
Thanks for your report, this is fixed on the factory branch, which is a development version under rapid development. You can try it out by going here: https://nuitka.net/doc/factory.html
Feedback if this is working is very welcome, just please do not share plans of doing it, but rather confirmations or denials of it working.
This is very likely to lead to a hotfix 1.2.2, with a rebase once this is proven stable.