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

Segmentation fault #5

Open
sabetAI opened this issue Aug 22, 2018 · 7 comments
Open

Segmentation fault #5

sabetAI opened this issue Aug 22, 2018 · 7 comments

Comments

@sabetAI
Copy link

sabetAI commented Aug 22, 2018

I'm trying to generate remapping for the Theta S with 1280x720 resolution images from dual fish eye cameras. I'm getting a segmentation fault when I run:

./projection -x xmap_thetaS.pgm -y ymap_thetaS.pgm -h 720 -w 1280 -r 640 -c 1280 -b 75 -m thetas

which is confusing. I thought projection was supposed to generate the .pgm files, not use pre-existing ones. What am I missing here?

@raboof
Copy link
Owner

raboof commented Aug 22, 2018

You are correct projection should generated the .pgm files. Looks like a bug.

@sabetAI
Copy link
Author

sabetAI commented Aug 24, 2018

Any luck?

@raboof
Copy link
Owner

raboof commented Aug 26, 2018

Sorry, I haven't had any free time to devote to this lately. Does running this command via gdb and looking at the backtrace reveal anything interesting?

@josephduchesne
Copy link

josephduchesne commented Jul 15, 2019

It's crashing on line 500 of the fork I've got:

image_x[(cfg.height - 1) - y][x + cfg.cols / 2] =(int)round(o.y) + cfg.crop + cfg.width / 2;

indices: 719, 640
x,y = 0,0
cfg.height = 720
cfg.cols = 1280

Works fine if you tweak the output size:

./projection -x xmap_thetaS.pgm -y ymap_thetaS.pgm -h 720 -w 1280 -r 720 -c 1440 -b 75 -m thetas

@raboof
Copy link
Owner

raboof commented Jul 16, 2019

Would you be up for creating a PR to fix the issue?

@josephduchesne
Copy link

I'm afraid not at the moment, I was looking into this for work and changing the output parameters as a workaround was fine to let me proceed. I didn't get a chance to dig into how the function works enough to figure out why it's crashing (i.e.. what bounds checks are missing maybe).

@raboof
Copy link
Owner

raboof commented Jul 18, 2019

Great that the workaround has unblocked you!

I was looking into this for work

Allocating some time to fix the bug would be a great way to give back!

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

No branches or pull requests

3 participants