indigo-astronomy / indigo

INDIGO is a system of standards and frameworks for multiplatform and distributed astronomy software development designed to scale with your needs.
http://www.indigo-astronomy.org
Other
139 stars 64 forks source link

Crash in generation of preview image #515

Closed tail-feather closed 5 months ago

tail-feather commented 6 months ago

Crashes when RAW16 setting and preview generation is enabled.

Camera: ZWO ASI294MM Pro CCD_MODE = RAW 16 8288x5644 CCD_PREVIEW = Enabled

Crashes do not occur for RAW8 settings.

Oddly enough, this problem is less likely to occur with fewer pixels cameras (e.g. ASI120MM Mini). But, it does occur rarely.

polakovic commented 6 months ago

Hm, maybe JPEG is larger than RAW, @rumengb, what do you think?

rumengb commented 6 months ago

I have been trying to reproduce the issue for several hours now with no success. On what OS are you running Indigo? If Linux can you try running it through valgrind:

valgrind indigo_server -- -v [drivers] >indigo_valgrind.log 2>&1

reproduce the crash and send us indigo_valgrind.log

Rumen

On Sun, Jan 7, 2024 at 1:44 PM Peter Polakovic @.***> wrote:

Hm, maybe JPEG is larger than RAW, @rumengb https://github.com/rumengb, what do you think?

— Reply to this email directly, view it on GitHub https://github.com/indigo-astronomy/indigo/issues/515#issuecomment-1880034716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5EZBONYCCNYEL3R7KZTVDYNKDDVAVCNFSM6AAAAABBQGOTL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGAZTINZRGY . You are receiving this because you were mentioned.Message ID: @.***>

tail-feather commented 5 months ago

I got the log. It appears that it is trying to allocate a size that exceeds INT_MAX.

08:39:18.135027 indigo_server: indigo_ccd_asi[asi_read_pixels:403]: ASIGetDataAfterExp(0) = 0
==1587== Warning: silly args (-256206080,1) to calloc()
indigo_server: /indigo-2.0-264/indigo_libs/indigo/indigo_bus.h:797: indigo_safe_malloc: Assertion `pointer != NULL' failed.
--1587-- WARNING: unhandled syscall: 407

Is this a problem here? https://github.com/indigo-astronomy/indigo/blob/f828273bb3b6846fdfa508a6116477eb71566194/indigo_libs/indigo_ccd_driver.c#L938-L940

rumengb commented 5 months ago

can you please provide the complete log please!

On Mon, Jan 8, 2024 at 10:54 AM tail-feather @.***> wrote:

I got the log. It appears that it is trying to allocate a size that exceeds INT_MAX.

08:39:18.135027 indigo_server: indigo_ccd_asi[asi_read_pixels:403]: ASIGetDataAfterExp(0) = 0 ==1587== Warning: silly args (-256206080,1) to calloc() indigo_server: /indigo-2.0-264/indigo_libs/indigo/indigo_bus.h:797: indigo_safe_malloc: Assertion `pointer != NULL' failed. --1587-- WARNING: unhandled syscall: 407

Is this a problem here?

https://github.com/indigo-astronomy/indigo/blob/f828273bb3b6846fdfa508a6116477eb71566194/indigo_libs/indigo_ccd_driver.c#L938

— Reply to this email directly, view it on GitHub https://github.com/indigo-astronomy/indigo/issues/515#issuecomment-1880594468, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5EZBMDQV2RG6SDOX7QRLDYNOX53AVCNFSM6AAAAABBQGOTL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGU4TINBWHA . You are receiving this because you were mentioned.Message ID: @.***>

tail-feather commented 5 months ago

Sure. indigo_valgrind.log

rumengb commented 5 months ago

Thanks a lot. Are you running it on 32 bit Raspberry Pi OS with 64 bit kernel? as valgrind reports a lot of nonsense which it does in this wired new raspberry pi os configuration.

so I would ask you to provide a RAW file that provokes this crash. Just stop jpeg preview and set format to indigo raw. and save this raw file and send it to me. Thank you!

On Mon, Jan 8, 2024 at 10:58 AM tail-feather @.***> wrote:

Sure. indigo_valgrind.log https://github.com/indigo-astronomy/indigo/files/13857991/indigo_valgrind.log

— Reply to this email directly, view it on GitHub https://github.com/indigo-astronomy/indigo/issues/515#issuecomment-1880599430, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5EZBKMWJ7ZQGWOGSCLDXLYNOYK7AVCNFSM6AAAAABBQGOTL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGU4TSNBTGA . You are receiving this because you were mentioned.Message ID: @.***>

tail-feather commented 5 months ago

Sorry I forgot report that. I used INDIGO Sky (armhf) & Raspberry Pi 4.

35f1106c415d4379e8eda50340915ca8a50a120e  RAW16.raw
28a2fc60c726a3c99d0e6b3ba604d90319e81b16  RAW8.raw
rumengb commented 5 months ago

fixed with commit #3e3568249f220afd19a187bc6b6ce813a82910d1 but please note this version is a work in progress and it has some issues that need to be taken care of

tail-feather commented 5 months ago

I built 3e3568249f220afd19a187bc6b6ce813a82910d1 and confirmed that no problems occurred. Thank you!