镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Image.new segfaults on win-amd64 #2772

Closed

Description

@cgohlke

Using current git master (007adc3) on win-amd64-py3.6, Image.new("1", (100, 100)) segfaults at Fill.c#L53. This was working with yesterday's git master. All tests pass on win32-py3.6.

Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import faulthandler
>>> faulthandler.enable()
>>> from PIL import Image
>>> Image.new("1", (100, 100))
Windows fatal exception: access violation

Current thread 0x00000544 (most recent call first):
  File "D:\Build\Pillow\Pillow-git\PIL\Image.py", line 2287 in new
  File "<stdin>", line 1 in <module>

Call Stack:

 	vcruntime140.dll!00007fff1e54c840()	Unknown	Non-user code. Cannot find or open the PDB file.
>	_imaging.cp36-win_amd64.pyd!ImagingFill(ImagingMemoryInstance * im, const void * colour) Line 53	C	Symbols loaded.
 	_imaging.cp36-win_amd64.pyd!_fill(_object * self, _object * args) Line 617	C	Symbols loaded.
 	python36.dll!_PyCFunction_FastCallDict(_object * func_obj, _object * * args, __int64 nargs, _object * kwargs) Line 236	C	Symbols loaded.
 	[Inline Frame] python36.dll!_PyCFunction_FastCallKeywords(_object *) Line 294	C	Symbols loaded.
 	python36.dll!call_function(_object * * * pp_stack, __int64 oparg, _object * kwnames) Line 4809	C	Symbols loaded.
 	python36.dll!_PyEval_EvalFrameDefault(_frame * f, int throwflag) Line 3297	C	Symbols loaded.
 	[Inline Frame] python36.dll!PyEval_EvalFrameEx(_frame *) Line 718	C	Symbols loaded.
 	python36.dll!_PyEval_EvalCodeWithName(_object * _co, _object * globals, _object * locals, _object * * args, __int64 argcount, _object * * kwnames, _object * * kwargs, __int64 kwcount, int kwstep, _object * * defs, __int64 defcount, _object * kwdefs, _object * closure, _object * name, _object * qualname) Line 4139	C	Symbols loaded.
 	[Inline Frame] python36.dll!fast_function(_object * stack, _object * *) Line 4950	C	Symbols loaded.
 	python36.dll!call_function(_object * * * pp_stack, __int64 oparg, _object * kwnames) Line 4830	C	Symbols loaded.
 	python36.dll!_PyEval_EvalFrameDefault(_frame * f, int throwflag) Line 3297	C	Symbols loaded.
 	[Inline Frame] python36.dll!PyEval_EvalFrameEx(_frame *) Line 718	C	Symbols loaded.
 	python36.dll!_PyEval_EvalCodeWithName(_object * _co, _object * globals, _object * locals, _object * * args, __int64 argcount, _object * * kwnames, _object * * kwargs, __int64 kwcount, int kwstep, _object * * defs, __int64 defcount, _object * kwdefs, _object * closure, _object * name, _object * qualname) Line 4139	C	Symbols loaded.
 	python36.dll!PyEval_EvalCodeEx(_object * _co, _object * globals, _object * locals, _object * * args, int argcount, _object * * kws, int kwcount, _object * * defs, int defcount, _object * kwdefs, _object * closure) Line 4166	C	Symbols loaded.
 	python36.dll!PyEval_EvalCode(_object * co, _object * globals, _object * locals) Line 701	C	Symbols loaded.
 	python36.dll!run_mod(_mod * mod, _object * filename, _object * globals, _object * locals, PyCompilerFlags * flags, _arena * arena) Line 981	C	Symbols loaded.
 	python36.dll!PyRun_InteractiveOneObject(_iobuf * fp, _object * filename, PyCompilerFlags * flags) Line 234	C	Symbols loaded.
 	python36.dll!PyRun_InteractiveLoopFlags(_iobuf * fp, const char * filename_str, PyCompilerFlags * flags) Line 114	C	Symbols loaded.
 	python36.dll!PyRun_AnyFileExFlags(_iobuf * fp, const char * filename, int closeit, PyCompilerFlags * flags) Line 74	C	Symbols loaded.
 	python36.dll!run_file(_iobuf * fp, const wchar_t * filename, PyCompilerFlags * p_cf) Line 338	C	Symbols loaded.
 	python36.dll!Py_Main(int argc, wchar_t * * argv) Line 809	C	Symbols loaded.
 	[External Code]		Annotated Frame

Locals:

		c	0	int
		cc	0 '\0'	unsigned char
		colour	0x000000dbc7def0e0	const void *
		cookie	0x000002c49433de70	void *
-		im	0x000002c4943b19e0 {mode=0x000002c4943b19e0 "1" type=0 depth=0 ...}	ImagingMemoryInstance *
+		mode	0x000002c4943b19e0 "1"	char[7]
		type	0	int
		depth	0	int
		bands	1	int
		xsize	100	int
		ysize	100	int
+		palette	0x0000000000000000 <NULL>	ImagingPaletteInstance *
+		image8	0x000002c496820c70 {0x00000000968517b0 <Error reading characters of string.>}	unsigned char * *
+		image32	0x0000000000000000 {???}	int * *
+		image	0x000002c496820c70 {0x00000000968517b0 <Error reading characters of string.>}	char * *
+		block	0x0000000000000000 <NULL>	char *
+		blocks	0x000002c49433a200 {ptr=0x000002c4968517b0 "pð†–Ä\x2" size=10000 }	ImagingMemoryBlock *
		pixelsize	1	int
		linesize	100	int
		destroy	0x00007ffefcd071a0 {_imaging.cp36-win_amd64.pyd!ImagingDestroyArray(ImagingMemoryInstance *)}	void(*)(ImagingMemoryInstance *)
		x	708	int
		y	0	int

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions