ThierryHFR / scangearmp2

This project is a sane backend for the canon's scanner, based on the source code of scangearmp2.
Other
78 stars 17 forks source link

"floating point exception" when trying to use 1200 resolution #65

Open gregoiredx opened 1 month ago

gregoiredx commented 1 month ago

Hey, thanks a lot for this project which nicely improves the original scangear app!

It works well, except when I try to use the 1200 resolution, which I believe my scanner can handle (Canon Pixma TS6051). image The program crashes with floating point exception (core dumped).

I tried to run with gdb and I get the following error:

Thread 1 "scangearmp2" received signal SIGFPE, Arithmetic exception.
0x000055555555af8b in CIJSC_start ()

Do you think this is a bug that could be fixed?

ThierryHFR commented 1 month ago

Sorry for the delay in replying. https://github.com/ThierryHFR/scangearmp2/commit/d422484cd73f9db0a8a821268da3bcfbdec2b34b I stand corrected. Can you tell me which distribution you use?

gregoiredx commented 1 month ago

Thanks for answering, nothing urgent. I'm on arch, I installed from the aur

gregoiredx commented 1 month ago

I see you made a fix, thanks! I'll try this later today

gregoiredx commented 1 month ago

Hello. Sorry for the delay, it took me longer than expected to retry this. I tried again but I have a new problem now, it's failing with another message but I don't have any log, only this alert: image I don't know how to get more details on the underlying problem.

Note: from MacOS it's possible to scan in 1200.

gregoiredx commented 1 month ago

Let me know if I can build/run the program with other options to get more details.

edit:

Here are the logs I have with debug:


[ui_dialog_save_scan_start] scan start(1) ->
[ui_dialog_save_scan_create_file]  created file [/home/xxx/Desktop/test.jpg]
[CIJSC_start] 
[cmt_network_keep_session] ->
[CIJSC_start] error in canon_set_parameter/canon_set_parameter_ex()
[ui_dialog_save_scan_start] Error in CIJSC_start 
[ui_dialog_save_scan_start] backend errCode = 151
[CIJSC_cancel] 
[ui_dialog_save_scan_dispose_file]  delete file [/home/xxx/Desktop/test.jpg]
[CIJSC_UI_error_show] ->
[CIJSC_UI_error_show] errorCode = 151
[CIJSC_UI_error_show] index_id = 33
[CIJSC_UI_error_show] index_mes = 13
ThierryHFR commented 1 month ago

@gregoiredx The zoom factor for resolution 1200 is missing, added in the commit below : https://github.com/ThierryHFR/scangearmp2/commit/219de521feef669c126215849bb0471c0ad374fa. Can you test, I don't have a Canon device (at the moment) that uses scangearmp2?

gregoiredx commented 2 weeks ago

Sorry for the late response again. I still have the same error 151 when calling canon_set_parameter_ex :disappointed: I'm starting to wonder if the lib can actually accept the 1200 resolution

ThierryHFR commented 1 week ago

Yes, the lib supports the 1200, I don't have a device to set it up. As soon as I get one, I'll fix it.