chengwill97 / Story-and-Image-Alignment

MIT License
0 stars 0 forks source link

Bug in servlet-side space images evenly #57

Open chengwill97 opened 5 years ago

chengwill97 commented 5 years ago

@Sreyasi I am getting a bug while using example articles 3.

I upload all 5 images and the text file, and then I choose the space images evenly checkbox, as well as only choosing up to 3 images, but I get a results page with no images and an alignments.txt that is empty. There is no error outputted from the server side.

When I choose all 5 images to be included, everything seems to work as normal.

Sreyasi commented 5 years ago

is this still a bug?

chengwill97 commented 5 years ago

is this still a bug?

Yes, this is still a bug.

chengwill97 commented 5 years ago

is this still a bug?

Yes, this is still a bug.

Sreyasi commented 5 years ago

I think once you make the changes in #55 this should be resolved

chengwill97 commented 5 years ago

@Sreyasi I made the changes in #55 but I still don't get what we expect.

I tried example 1, and I put in the number of images to include as 2, but I only get 1 image as a result.

Sreyasi commented 5 years ago

Did you commit the changes? where can I see the changes to #55?

chengwill97 commented 5 years ago

Did you commit the changes? where can I see the changes to #55?

It's in the bug-55 branch. I made the change in ILPBased.java

Sreyasi commented 5 years ago

@Sreyasi I made the changes in #55 but I still don't get what we expect.

I tried example 1, and I put in the number of images to include as 2, but I only get 1 image as a result.

I remember once we encountered this error before. If the image is being aligned to the last paragraph it wasn't displayed...are you sure it's not the same error?

Sreyasi commented 5 years ago

Oh I think there's a bug. Change numImages in lines 208 and 209 to imageName_tags.size()

208 double u = Math.ceil((double)(numParas - 1)/(double)(numImages - 1)); 209 double l = Math.floor((double)(numParas + 1)/(double)(numImages + 1));

chengwill97 commented 5 years ago

@Sreyasi This doesn't seem to resolve the issue. I kept the java server up with the changes you've suggested.

Sreyasi commented 5 years ago

can you please try to debug it? eclipse (if you're still using it for the java parts) has a nice debug environment. i can't see the reason for the error.

If you don't have enough time, just leave out the equal spacing option for now.

Sreyasi commented 5 years ago

We need to re-visit this.

Sreyasi commented 5 years ago

Any updates?

Sreyasi commented 4 years ago

Looks like we tried the feature which evenly spaces out images. The bug appears when user provides input for the number of images to be selected. Need to debug this.