go-qml / qml

QML support for the Go language
Other
1.96k stars 189 forks source link

qt5.21 minwg error:panic: invalid memory address or nil pointer dereference #51

Closed raiscui closed 10 years ago

raiscui commented 10 years ago

env:

F:\baiduyun\backup\gopath\src\gopkg.in\v0\qml\examples\customtype>go env set GOARCH=386 set GOBIN= set GOCHAR=8 set GOEXE=.exe set GOHOSTARCH=386 set GOHOSTOS=windows set GOOS=windows set GOPATH=F:\baiduyun\backup\gopath set GORACE= set GOROOT=C:\Go set GOTOOLDIR=C:\Go\pkg\tool\windows_386 set TERM=dumb set CC=gcc set GOGCCFLAGS=-g -O2 -m32 -mthreads set CXX=g++ set CGO_ENABLED=1

error for all examples:

F:\baiduyun\backup\gopath\src\gopkg.in\v0\qml\examples\customtype>go run customt ype.go panic: invalid memory address or nil pointer dereference fatal error: panic during malloc [signal 0xc0000005 code=0x0 addr=0x20 pc=0x41b8ea]

runtime stack: runtime.panic(0x4f17c0, 0x66c56f) C:/Users/ADMINI~1/AppData/Local/Temp/2/makerelease529514319/go/src/pkg/r untime/panic.c:233 +0x2b runtime: unexpected return pc for runtime.sigpanic called from 0x749af4fc

goroutine 4 [syscall]: runtime.cgocall(0x48b47b, 0x3d57c4) C:/Users/ADMINI~1/AppData/Local/Temp/2/makerelease529514319/go/src/pkg/r untime/cgocall.c:149 +0x10c fp=0x3d57b8 gopkg.in/v0/qml._CfuncidleTimerInit(0x674090) C:/Users/ADMINI~1/AppData/Local/Temp/go-build364249083/gopkg.in/v0/qml/ obj/_cgo_defun.c:229 +0x33 fp=0x3d57c4 gopkg.in/v0/qml.guiLoop() F:/baiduyun/backup/gopath/src/gopkg.in/v0/qml/bridge.go:38 +0x41 fp=0x3d 57cc runtime.goexit() C:/Users/ADMINI~1/AppData/Local/Temp/2/makerelease529514319/go/src/pkg/r untime/proc.c:1394 fp=0x3d57d0 created by gopkg.in/v0/qml.Init F:/baiduyun/backup/gopath/src/gopkg.in/v0/qml/qml.go:44 +0x8c

goroutine 1 [semacquire]: sync.runtime_Semacquire(0x6740cc) C:/Users/ADMINI~1/AppData/Local/Temp/2/makerelease529514319/go/src/pkg/r untime/sema.goc:199 +0x33 sync.(*Mutex).Lock(0x6740c8) C:/Users/ADMINI~1/AppData/Local/Temp/2/makerelease529514319/go/src/pkg/s ync/mutex.go:66 +0xcd gopkg.in/v0/qml.Init(0x0) F:/baiduyun/backup/gopath/src/gopkg.in/v0/qml/qml.go:45 +0x9c main.run(0x1, 0xffffffff) F:/baiduyun/backup/gopath/src/gopkg.in/v0/qml/examples/customtype/custom type.go:30 +0x2a main.main() F:/baiduyun/backup/gopath/src/gopkg.in/v0/qml/examples/customtype/custom type.go:10 +0x20

goroutine 3 [syscall]: runtime.goexit() C:/Users/ADMINI~1/AppData/Local/Temp/2/makerelease529514319/go/src/pkg/r untime/proc.c:1394 exit status 2

F:\baiduyun\backup\gopath\src\gopkg.in\v0\qml\examples\customtype>

raiscui commented 10 years ago

GCC env:

F:\baiduyun\backup\gopath\src\gopkg.in\v0\qml\examples\customtype>gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=c:/qt/qt5.2.1/tools/mingw48_32/bin/../libexec/gcc/i686-w64-m ingw32/4.8.0/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: ../../../src/gcc-4.8.0/configure --host=i686-w64-mingw32 --buil d=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/t emp/x32-480-posix-dwarf-r2/mingw32 --enable-shared --enable-static --disable-mul tilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable- threads=posix --enable-libgomp --enable-lto --enable-graphite --enable-checking= release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --d isable-sjlj-exceptions --with-dwarf2 --disable-isl-version-check --disable-cloog -version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-boots trap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --d isable-symvers --with-gnu-as --with-gnu-ld --with-arch=i686 --with-tune=generic --with-host-libstdcxx='-static -lstdc++' --with-libiconv --with-system-zlib --wi th-gmp=/temp/mingw-prereq/i686-w64-mingw32-static --with-mpfr=/temp/mingw-prereq /i686-w64-mingw32-static --with-mpc=/temp/mingw-prereq/i686-w64-mingw32-static - -with-isl=/temp/mingw-prereq/i686-w64-mingw32-static --with-cloog=/temp/mingw-pr ereq/i686-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='rev2, Built by MinGW-builds project' --with-bugurl=http://sourceforge.net/projects/mi ngwbuilds/ CFLAGS='-O2 -pipe -I/temp/x32-480-posix-dwarf-r2/libs/include -I/temp /mingw-prereq/x32-zlib/include -I/temp/mingw-prereq/i686-w64-mingw32-static/incl ude' CXXFLAGS='-O2 -pipe -I/temp/x32-480-posix-dwarf-r2/libs/include -I/temp/min gw-prereq/x32-zlib/include -I/temp/mingw-prereq/i686-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/temp/x32-480-posix-dwarf-r2/libs/lib -L/temp/mingw- prereq/x32-zlib/lib -L/temp/mingw-prereq/i686-w64-mingw32-static/lib -L/temp/x32 -480-posix-dwarf-r2/mingw32/opt/lib' Thread model: posix gcc version 4.8.0 (rev2, Built by MinGW-builds project)

niemeyer commented 10 years ago

Thanks for the report.

This looks like a dup from #19, which is now fixed.