I am using dcmtk on android, So far C-ECHO, C-STORE works fine with the use of the DcmSCU from the Lib version 3.6.5.
Since i have included all module of dcmtk, This class will be also part going to be part of my single so file. https://github.com/DCMTK/dcmtk/blob/DCM ... src/scu.cc
I am using the C-FIND request like below:-
Code: Select all
class DcmClient : public DcmSCU
{
public:
DcmClient() {
}
~DcmClient() {
}
};
Code: Select all
DcmClient mDcmScu;
OFLog::configure(OFLogger::DEBUG_LOG_LEVEL);
mDcmScu.setAETitle(thorAeTitle);
mDcmScu.setPeerHostName(pacsIpAddress);
mDcmScu.setPeerPort(pacsHostPort);
mDcmScu.setPeerAETitle(pacsAeTitle);
mDcmScu.setDIMSEBlockingMode(DIMSE_NONBLOCKING);
mDcmScu.setDIMSETimeout(60);
mDcmScu.setMaxReceivePDULength(ASC_DEFAULTMAXPDU);
mDcmScu.setVerbosePCMode(OFTrue);
OFList<OFString> ts;
ts.emplace_back(UID_LittleEndianExplicitTransferSyntax);
ts.emplace_back(UID_BigEndianExplicitTransferSyntax);
ts.emplace_back(UID_LittleEndianImplicitTransferSyntax);
mDcmScu.addPresentationContext(UID_FINDModalityWorklistInformationModel, ts);
mDcmScu.initNetwork();
mDcmScu.negotiateAssociation();
T_ASC_PresentationContextID presID = mDcmScu.findPresentationContextID(UID_FINDModalityWorklistInformationModel, "");
OFList<QRResponse*> *findResponses;
findResponses=new OFList<QRResponse*>();
//Below is the line where my android app crash with native dump which is hard to find the root cause.
cond = mDcmScu.sendFINDRequest(presID, &req, findResponses);
Crash strace from android: Since sendFINDRequest is part of libdcmtk.so , I am not getting any logs from scu class.
Code: Select all
--------- beginning of crash
2020-07-18 21:35:00.277 4142-4218/com.xxx.yyyy A/libc: Fatal signal 5 (SIGTRAP), code 1 in tid 4218 (DefaultDispatch), pid 4142 (xxx.yyyy)
2020-07-18 21:35:00.326 789-789/? E/HWComposer: getLayerReleaseFence: Invalid display
2020-07-18 21:35:00.326 789-789/? E/HWComposer: getLayerReleaseFence: Invalid display
2020-07-18 21:35:00.365 4276-4276/? I/crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2020-07-18 21:35:00.365 1291-1291/? I//system/bin/tombstoned: received crash request for pid 4142
2020-07-18 21:35:00.366 4276-4276/? I/crash_dump64: performing dump of process 4142 (target tid = 4218)
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: Build fingerprint: 'Android/msm8998/msm8998:8.1.0/1.0.42/42:user/test-keys'
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: Revision: '0'
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: ABI: 'arm64'
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: pid: 4142, tid: 4218, name: DefaultDispatch >>> com.xxx.yyyy <<<
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr 0x781805f064
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: x0 0000000000000020 x1 373bed87a9cac858 x2 0000000000000004 x3 0000000000000008
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: x4 0000000000000000 x5 000000781afff588 x6 000000781afff588 x7 000000781afff588
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: x8 0000000000000042 x9 373bed87a9cac858 x10 373bed87a9cac858 x11 373bed87a9cac858
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: x12 373bed87a9cac858 x13 0000000000000000 x14 373bed87a9cac858 x15 373bed87a9cac858
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: x16 000000781afff588 x17 00000078c93fee6c x18 373bed87a9cac858 x19 000000781eb27800
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: x20 000000784706fea0 x21 000000781eb27800 x22 000000781affd99c x23 000000782ecf8ae9
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: x24 000000000000000c x25 000000781afff588 x26 000000781eb278a0 x27 0000000000000003
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: x28 0000000000000004 x29 000000781affc720 x30 000000781805f064
2020-07-18 21:35:00.368 4276-4276/? A/DEBUG: sp 000000781affc6f0 pc 000000781805f064 pstate 0000000060000000
2020-07-18 21:35:00.370 4276-4276/? A/DEBUG: backtrace:
If i use this cpp class into my own code in android then build above code , In this case it works fine. https://github.com/DCMTK/dcmtk/blob/DCM ... src/scu.cc
Any clue why i have to add again scu.cc in my own so file, Because its' already presented into the libdcmtk.so. Also if i am using scu.cc class as it is will that cause any license issue?