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

Invalid type 'Q' in pack at <...> #11

Open
alexander-potemkin opened this issue Nov 8, 2012 · 9 comments
Open

Invalid type 'Q' in pack at <...> #11

alexander-potemkin opened this issue Nov 8, 2012 · 9 comments
Assignees

Comments

@alexander-potemkin
Copy link

Hi,

are there any suggestions (how to get rid of) of any plans to get rid of the following warning:

Invalid type 'Q' in pack at <...>MessagePack/PP.pm line 20.

at 32bit platforms?

I understand the reason for this warning, but what about catching it inside SIG{'WARN'} inside the same BEGIN block, to avoid false issue reporting? Or there is some special reason not to do this?

Thanks,
Alexander.

@ghost ghost assigned makamaka Nov 9, 2012
@gfx
Copy link
Member

gfx commented Nov 9, 2012

Hi,

Can you paste perl -V on your environment?

@alexander-potemkin
Copy link
Author

Hi,

apologize for the delay, here it is:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\> C:\strawberry\perl\bin\perl.exe -V
Summary of my perl5 (revision 5 version 16 subversion 1) configuration:

  Platform:
    osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
    uname='Win32 strawberry-perl 5.16.1.1 #1 Thu Aug  9 09:54:46 2012 i386'
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags =' -s -O2 -DWIN32  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT
_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields',
    optimize='-s -O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='4.6.3', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++.exe', ldflags ='-s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib"'
    libpth=C:\strawberry\c\lib C:\strawberry\c\i686-w64-mingw32\lib
    libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32
 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion
 -lodbc32 -lodbccp32 -lcomctl32
    perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladva
pi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lver
sion -lodbc32 -lodbccp32 -lcomctl32
    libc=, so=dll, useshrplib=true, libperl=libperl516.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib"'


Characteristics of this binary (from libperl):
  Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
                        PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
                        PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PL_OP_SLAB_ALLOC
                        USE_ITHREADS USE_LARGE_FILES USE_LOCALE
                        USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
  Built under MSWin32
  Compiled at Aug  9 2012 10:03:09
  @INC:
    C:/strawberry/perl/site/lib
    C:/strawberry/perl/vendor/lib
    C:/strawberry/perl/lib
    .


That is, basically, just a latest portable Strawberry Perl 5.16, 32 bit.

@makamaka
Copy link
Member

I wrote the eval-trapping code because I thank that that code don't show the warning.
Would you show the sample code?

@alexander-potemkin
Copy link
Author

I can't reproduce on the sample code for now - let me double-verify on what could cause eval to fail and come back to you, if reproduced.

Thank you for the prompt response.

@alexander-potemkin
Copy link
Author

Got it reproduced - please, get the source code from here: http://dl.dropbox.com/u/3556694/test.tar

Any clue?

@syohex
Copy link
Collaborator

syohex commented Nov 16, 2012

Localize signal handler

package Handler;

local $SIG{__DIE__} = sub {
        print "Caught die: @_";
};

# any code

1;

or change order of importing modules

use Data::MessagePack;
use Handler;
use strict;
use warnings;

exit 0;

@alexander-potemkin
Copy link
Author

Got it, thank you!

@makamaka
Copy link
Member

As syohex said, there are some way to solve the probblem.
But I think that localizing $SIG{DIE} in MessagePack::PP is more proper.

@makamaka makamaka reopened this Nov 16, 2012
@syohex
Copy link
Collaborator

syohex commented Nov 16, 2012

Blog about $SIG{__DIE__} and eval in Japanese.

http://perl.g.hatena.ne.jp/Cormorant/20080919/1221842240

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

4 participants