Coder Social home page Coder Social logo

READ BAD ADDRESS about icsim HOT 20 CLOSED

zombiecraig avatar zombiecraig commented on July 27, 2024
READ BAD ADDRESS

from icsim.

Comments (20)

r3n0zzz avatar r3n0zzz commented on July 27, 2024 2

I probably should had tried a little more troubleshooting but I was able to fix for both Kali and Parrot on Virtualbox. All I had to do was create symlinks for all the SDL .h files to /usr/include/SDL2/ then recompile icsim.

gcc -I/usr/include/SDL2 -o icsim-new icsim.c lib.o -lSDL2 -lSDL2_image

I'm able to generate CAN traffic and things seem to work as normal.

from icsim.

collin80 avatar collin80 commented on July 27, 2024 2

I'm going to try to be a bit more diplomatic than the previous person but... you're going have a LOT to learn. You can't run icsim because it doesn't exist as a filename. It doesn't exist as a filename because you have not compiled the source code into an executable. You need to run make in the directory. Before you run make you have to be sure you've installed the compiler and all the relevant libraries. You're in for a bit of a learning curve.

from icsim.

r3n0zzz avatar r3n0zzz commented on July 27, 2024 1

So you are either missing SDL entirely from your system or its just in a different path than where it's looking for it. I'd try 'find / -name SDL.h 2>/dev/null" and then you can symlink if found. If no dice, you can download SDL https://www.libsdl.org/download-2.0.php and then configure, make, make install then symlink. Or get it through apt (libsdl2). Just be aware that you'll have to symlink all of the .h files from the SDL2 folder you just installed or found to /usr/include/SDL2/.

from icsim.

jrmessiah avatar jrmessiah commented on July 27, 2024

stop using a virtualbox or vmware to run it

from icsim.

tcswp avatar tcswp commented on July 27, 2024

I am also getting this error. After executing ./controls vcan0, icsim closes and gives the error read: Bad address. I am not using any virtualization software.

from icsim.

zombieCraig avatar zombieCraig commented on July 27, 2024

What distribution are you using? Can you use cansend and candump to see CAN packets via the terminal?

from icsim.

tcswp avatar tcswp commented on July 27, 2024

I am using Arch. Yes, I can see CAN packets in the terminal using cansend and candump.

from icsim.

r3n0zzz avatar r3n0zzz commented on July 27, 2024

I am running Virutalbox 6.1.2 with an updated version of Kali (Linux kali 5.4.0-kali3-amd64 #1 SMP Debian 5.4.13-1kali1 (2020-01-20) x86_64 GNU/Linux). I also did try with ParrotOS in Virtualbox and get the same error. I'm receiving the bad address error as soon as I launch ./controls vcan0 while ./icsim is running. Further, if I launch ./controls vcan0 I can see CAN traffic on the vcan0 interface but if I try to launch ./icsim vcan0 after then icsim will immediately crash and give the Bad address error.
root@kali:/opt/ICSim# ./icsim vcan0
Using CAN interface vcan0
read: Bad address

from icsim.

tcswp avatar tcswp commented on July 27, 2024

I figured out what the problem was in Arch. The sdl2_gfx library is required in addition to sdl2 and sdl2_image.

from icsim.

RobCasta avatar RobCasta commented on July 27, 2024

I probably should had tried a little more troubleshooting but I was able to fix for both Kali and Parrot on Virtualbox. All I had to do was create symlinks for all the SDL .h files to /usr/include/SDL2/ then recompile icsim.

gcc -I/usr/include/SDL2 -o icsim-new icsim.c lib.o -lSDL2 -lSDL2_image

I'm able to generate CAN traffic and things seem to work as normal.

How did you did that? I’ve tried the same but I get this error:
“In file included from icsim.c:20:
/usr/include/SDL2/SDL_image.h:27:10: fatal error: SDL.h: No such file or directory
27 | #include “SDL.h”
| ^~~~~~~

from icsim.

RobCasta avatar RobCasta commented on July 27, 2024

Worked! I just found all the missing files and moved to the SDL2 directory, then recompile and that’s all! Thanks!

from icsim.

zombieCraig avatar zombieCraig commented on July 27, 2024

Just to clarify. The issue was missing SDL2 libraries? My assumption was this was not compiling and the errors came from running a binary version. Is that accurate?

from icsim.

r3n0zzz avatar r3n0zzz commented on July 27, 2024

Yes sorry. It appears that the issue was just some missing SDL2 libraries but I'm not sure how that occurred.

from icsim.

RobCasta avatar RobCasta commented on July 27, 2024

In my case, the files were located in 2 different directories: /usr/include/SDL2, and /usr/include/x86_64-linux-gnu/SDL2

from icsim.

zombieCraig avatar zombieCraig commented on July 27, 2024

Ah great. Good to know. I would not have guessed it was a library issue based on that error message. Closing issue but it should still be searchable for others.

from icsim.

ananviji avatar ananviji commented on July 27, 2024

I probably should had tried a little more troubleshooting but I was able to fix for both Kali and Parrot on Virtualbox. All I had to do was create symlinks for all the SDL .h files to /usr/include/SDL2/ then recompile icsim.

gcc -I/usr/include/SDL2 -o icsim-new icsim.c lib.o -lSDL2 -lSDL2_image

I'm able to generate CAN traffic and things seem to work as normal.

I am still getting some undefined reference error
image

from icsim.

SajawalTeachMax avatar SajawalTeachMax commented on July 27, 2024

i can`t open ./icsim
it show file not available
how can i open icsim file plz teach me

from icsim.

jrmessiah avatar jrmessiah commented on July 27, 2024

i can`t open ./icsim
it show file not available
how can i open icsim file plz teach me

learn to use linux first.

file not availble says it all. U are in the wrong.......f...der

from icsim.

SajawalTeachMax avatar SajawalTeachMax commented on July 27, 2024

i can`t open ./icsim
it show file not available
how can i open icsim file plz teach me

learn to use linux first.

file not availble says it all. U are in the wrong.......f...der

85228756-10530800-b403-11ea-9482-17f50905a553

here is the list of files.

drwxrwxr-x 5 rajan rajan 4096 Jun 21 20:54 .
drwxr-xr-x 25 rajan rajan 4096 Jun 21 20:54 ..
drwxrwxr-x 2 rajan rajan 4096 Jun 21 20:48 art
-rw-rw-r-- 1 rajan rajan 20553 Jun 21 20:48 controls.c
drwxrwxr-x 2 rajan rajan 4096 Jun 21 20:48 data
drwxrwxr-x 8 rajan rajan 4096 Jun 21 20:48 .git
-rwxrwxr-x 1 rajan rajan 13598 Jun 21 20:48 icsim.c
-rw-rw-r-- 1 rajan rajan 14111 Jun 21 20:48 lib.c
-rw-rw-r-- 1 rajan rajan 8338 Jun 21 20:48 lib.h
-rw-rw-r-- 1 rajan rajan 13168 Jun 21 20:48 lib.o
-rw-rw-r-- 1 rajan rajan 35149 Jun 21 20:48 LICENSE
-rw-rw-r-- 1 rajan rajan 300 Jun 21 20:48 Makefile
-rw-rw-r-- 1 rajan rajan 3378 Jun 21 20:48 README.md
-rwxrwxr-x 1 rajan rajan 100 Jun 21 20:48 setup_vcan.sh

but it don't have icsim executable file. please fix it.

from icsim.

SajawalTeachMax avatar SajawalTeachMax commented on July 27, 2024

i can`t open ./icsim
it show file not available
how can i open icsim file plz teach me

learn to use linux first.

file not availble says it all. U are in the wrong.......f...der

so how i can open icsim file

from icsim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.