Problem with compress function on CSPro 7.3

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
provogrammer
Posts: 11
Joined: June 11th, 2018, 4:52 pm

Problem with compress function on CSPro 7.3

Post by provogrammer »

Hi,

Just trying update my application to 7.3, it seems that there is problem with function compresss(), it crash all the time, here is debug output:

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Xiaomi/natrium/natrium:8.0.0/OPR1.170623.032/9.6.27:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 25752, tid: 25774, name: Messenger >>> gov.census.cspro.csentry <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'terminating with uncaught exception of type std::nullptr_t'
x0 0000000000000000 x1 00000000000064ae x2 0000000000000006 x3 0000000000000008
x4 fefeff72fe7a836f x5 fefeff72fe7a836f x6 fefeff72fe7a836f x7 7f7f7f7fff7fff7f
x8 0000000000000083 x9 34be06e127d369cb x10 0000000000000000 x11 0000000000000001
x12 ffffffffffffffff x13 0000000000000001 x14 002aeb7b832972a9 x15 0000afe92994351f
x16 000000741e0e12f8 x17 000000741e082e50 x18 0000000000000000 x19 0000000000006498
x20 00000000000064ae x21 00000073ff2894a8 x22 ffffff80ffffffc8 x23 00000073ff289560
x24 00000073ff289440 x25 00000073ff289480 x26 0000000000000000 x27 00000073ff289a84
x28 0000000000000004 x29 00000073ff2893b0 x30 000000741e036f64
sp 00000073ff289370 pc 000000741e082e58 pstate 0000000060000000

backtrace:
#00 pc 0000000000069e58 /system/lib64/libc.so (tgkill+8)
#01 pc 000000000001df60 /system/lib64/libc.so (abort+88)
#02 pc 0000000000512060 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so
#03 pc 00000000005121dc /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so
#04 pc 000000000050f224 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so
#05 pc 000000000050e908 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so
#06 pc 000000000050e888 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (__cxa_throw+120)
#07 pc 0000000000351154 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN8CZipZlib8AddFilesEPKwiPK7CStdStrIwES5_bP12CProgressDlgii+1356)
#08 pc 000000000025e660 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN10CIntDriver10excompressEi+1636)
#09 pc 00000000001d71c4 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN10CIntDriver4exeqEi+92)
#10 pc 00000000001f8bb8 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN10CIntDriver4exifEi+200)
#11 pc 00000000001d2ce0 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN10CIntDriver24ExecuteProgramStatementsEi+92)
#12 pc 00000000001f8bf4 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN10CIntDriver4exifEi+260)
#13 pc 00000000001d2ce0 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN10CIntDriver24ExecuteProgramStatementsEi+92)
#14 pc 00000000001f8bf4 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN10CIntDriver4exifEi+260)
#15 pc 00000000001d2b10 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN10CIntDriver18ExecuteSymbolProcsEPKN5Logic6SymbolE8ProcType+568)
#16 pc 00000000001d2ed4 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN10CIntDriver14ExecuteProcVarEi8ProcType+96)
#17 pc 0000000000196de0 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN8CsDriver13RunEventProcsEib+1648)
#18 pc 00000000001946e8 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN8CsDriver14SolveNextFieldEb+636)
#19 pc 0000000000192b70 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN8CsDriver11DriverBrainEv+708)
#20 pc 00000000001b6350 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN10CEntryIFaz17CallCsDriverBrainEv+116)
#21 pc 00000000001b7020 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN10CEntryIFaz11C_GoToFieldEi+132)
#22 pc 00000000002411c8 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN12CRunAplEntry9NextFieldEibb+248)
#23 pc 00000000001798dc /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/lib/arm64/libCSEntry.so (_ZN24CoreEntryEngineInterface9NextFieldEv+48)
#24 pc 000000000007eb24 /data/app/gov.census.cspro.csentry-CXZYwgLgjEvky_GP_ntvKw==/oat/arm64/base.odex (offset 0x38000)

Perhaps the developers could check it,

Thanks,
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Problem with compress function on CSPro 7.3

Post by josh »

We saw this crash recently however we are not able to reproduce it ourselves. Based on the code it seems that it should only happen when the compress functions fails to add a file to the zip archive but it is not clear why that would fail. It would most likely be because of a bad file or bad path. Could you post your application here or send it to us at cspro@lists.census.gov so that we can reproduce it?
provogrammer
Posts: 11
Joined: June 11th, 2018, 4:52 pm

Re: Problem with compress function on CSPro 7.3

Post by provogrammer »

josh wrote: October 2nd, 2019, 4:50 am We saw this crash recently however we are not able to reproduce it ourselves. Based on the code it seems that it should only happen when the compress functions fails to add a file to the zip archive but it is not clear why that would fail. It would most likely be because of a bad file or bad path. Could you post your application here or send it to us at cspro@lists.census.gov so that we can reproduce it?
Hi Josh, attached is a simple android app to test compress function, here are the steps:
1. Put .pen and .pff file in folder csentry\testent on Android
2. Create folder csentry\testzip and put some files to compress
3. Try test it on android, just enter 0-9 to test in the ID variable.
4. if it success, it will create file test.zip under csentry folder
test2.zip
(3.87 KiB) Downloaded 188 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Problem with compress function on CSPro 7.3

Post by josh »

Thanks for the test application. We are able to reproduce the problem pretty easily. Working on a fix.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Problem with compress function on CSPro 7.3

Post by josh »

In the meantime you could work around the bug by using dirlist to get the list of files and passing the list to compress():
list string filestozip;
dirlist(filestozip, pathconcat(csentry,"testzip"), "*.*");
if compress(pathconcat(csentry,"test.zip"),filestozip)=default then
    errmsg
("Compress failed");
else
    errmsg
("Compress test.zip success");
endif;
provogrammer
Posts: 11
Joined: June 11th, 2018, 4:52 pm

Re: Problem with compress function on CSPro 7.3

Post by provogrammer »

josh wrote: October 2nd, 2019, 4:54 pm In the meantime you could work around the bug by using dirlist to get the list of files and passing the list to compress():
Ok Josh, Thanks!
Post Reply