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 pointer #1

Open
tobiasBora opened this issue Oct 23, 2016 · 3 comments
Open

Invalid pointer #1

tobiasBora opened this issue Oct 23, 2016 · 3 comments

Comments

@tobiasBora
Copy link

Hello,

First, thank you for your program. However, when I try to run your example with "make test && ./SimpleExample.native" (after choosing the good tty), I got the error:

./SimpleExample.native 
*** Error in `./SimpleExample.native': free(): invalid pointer: 0x000000000107a148 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x70bcb)[0x7ff6775d7bcb]
/lib/x86_64-linux-gnu/libc.so.6(+0x76fa6)[0x7ff6775ddfa6]
/lib/x86_64-linux-gnu/libc.so.6(+0x7779e)[0x7ff6775de79e]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_+0x87)[0x7ff678141547]
./SimpleExample.native[0x429ba0]
./SimpleExample.native[0x428917]
./SimpleExample.native[0x40702d]
./SimpleExample.native[0x405210]
./SimpleExample.native[0x405317]
./SimpleExample.native[0x402959]
./SimpleExample.native[0x440186]
./SimpleExample.native[0x44079d]
./SimpleExample.native[0x40277c]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7ff6775872b1]
./SimpleExample.native[0x4027ba]
======= Memory map: ========
00400000-00457000 r-xp 00000000 fe:01 25069340                           /home/leo/Informatique/Programmation/Arduino/Ocaml/firmata/_build/examples/SimpleExample.native
00656000-00657000 r--p 00056000 fe:01 25069340                           /home/leo/Informatique/Programmation/Arduino/Ocaml/firmata/_build/examples/SimpleExample.native
00657000-0066e000 rw-p 00057000 fe:01 25069340                           /home/leo/Informatique/Programmation/Arduino/Ocaml/firmata/_build/examples/SimpleExample.native
0066e000-0067b000 rw-p 00000000 00:00 0 
0101c000-0107b000 rw-p 00000000 00:00 0                                  [heap]
7ff670000000-7ff670021000 rw-p 00000000 00:00 0 
7ff670021000-7ff674000000 ---p 00000000 00:00 0 
7ff676fa3000-7ff677567000 rw-p 00000000 00:00 0 
7ff677567000-7ff6776fc000 r-xp 00000000 fe:00 792114                     /lib/x86_64-linux-gnu/libc-2.24.so
7ff6776fc000-7ff6778fb000 ---p 00195000 fe:00 792114                     /lib/x86_64-linux-gnu/libc-2.24.so
7ff6778fb000-7ff6778ff000 r--p 00194000 fe:00 792114                     /lib/x86_64-linux-gnu/libc-2.24.so
7ff6778ff000-7ff677901000 rw-p 00198000 fe:00 792114                     /lib/x86_64-linux-gnu/libc-2.24.so
7ff677901000-7ff677905000 rw-p 00000000 00:00 0 
7ff677905000-7ff67791b000 r-xp 00000000 fe:00 786606                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff67791b000-7ff677b1a000 ---p 00016000 fe:00 786606                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff677b1a000-7ff677b1b000 r--p 00015000 fe:00 786606                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff677b1b000-7ff677b1c000 rw-p 00016000 fe:00 786606                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7ff677b1c000-7ff677b1e000 r-xp 00000000 fe:00 792122                     /lib/x86_64-linux-gnu/libdl-2.24.so
7ff677b1e000-7ff677d1e000 ---p 00002000 fe:00 792122                     /lib/x86_64-linux-gnu/libdl-2.24.so
7ff677d1e000-7ff677d1f000 r--p 00002000 fe:00 792122                     /lib/x86_64-linux-gnu/libdl-2.24.so
7ff677d1f000-7ff677d20000 rw-p 00003000 fe:00 792122                     /lib/x86_64-linux-gnu/libdl-2.24.so
7ff677d20000-7ff677e23000 r-xp 00000000 fe:00 792124                     /lib/x86_64-linux-gnu/libm-2.24.so
7ff677e23000-7ff678022000 ---p 00103000 fe:00 792124                     /lib/x86_64-linux-gnu/libm-2.24.so
7ff678022000-7ff678023000 r--p 00102000 fe:00 792124                     /lib/x86_64-linux-gnu/libm-2.24.so
7ff678023000-7ff678024000 rw-p 00103000 fe:00 792124                     /lib/x86_64-linux-gnu/libm-2.24.so
7ff678024000-7ff678195000 r-xp 00000000 fe:00 1180732                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7ff678195000-7ff678395000 ---p 00171000 fe:00 1180732                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7ff678395000-7ff67839f000 r--p 00171000 fe:00 1180732                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7ff67839f000-7ff6783a1000 rw-p 0017b000 fe:00 1180732                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7ff6783a1000-7ff6783a5000 rw-p 00000000 00:00 0 
7ff6783a5000-7ff6783c8000 r-xp 00000000 fe:00 787092                     /lib/x86_64-linux-gnu/ld-2.24.so
7ff6784bb000-7ff678582000 rw-p 00000000 00:00 0 
7ff6785c3000-7ff6785c7000 rw-p 00000000 00:00 0 
7ff6785c7000-7ff6785c8000 r--p 00022000 fe:00 787092                     /lib/x86_64-linux-gnu/ld-2.24.so
7ff6785c8000-7ff6785c9000 rw-p 00023000 fe:00 787092                     /lib/x86_64-linux-gnu/ld-2.24.so
7ff6785c9000-7ff6785ca000 rw-p 00000000 00:00 0 
7fff648b7000-7fff648d8000 rw-p 00000000 00:00 0                          [stack]
7fff648f3000-7fff648f5000 r--p 00000000 00:00 0                          [vvar]
7fff648f5000-7fff648f7000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Abandon

Do you know why ?

Thank you !

@modlfo
Copy link
Owner

modlfo commented Oct 24, 2016

Seems like my last commit produces the error. You can revert the last commit by checking out this commit ac2e154 . Meanwhile I can fix the error.

Thanks for the report.

@modlfo
Copy link
Owner

modlfo commented Oct 24, 2016

I think I have fixed the error in b569d3e. It works for me without issues.

Let me know if if it's fixed or you still have problems.

Thanks!

@tobiasBora
Copy link
Author

Thank you for your update. Now I have a segfault if I give a wrong serial port. Maybe a clearer explanation would be interesting...

And I have one more question (which is a bit out of topic) : where could I find an equivalent between the pin number here: "http://letsmakerobots.com/files/field_primary_image/NanoAnalogPinChanges.resized.jpg" and in the print information display ?

Thank you !

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

2 participants