Cubic IDE / HW4C and DebugPrint ()

Discuss anything about the Hollywood plugins for Cubic IDE and Codebench here
Post Reply
User avatar
JurassicC
Posts: 36
Joined: Fri May 25, 2012 9:48 pm

Cubic IDE / HW4C and DebugPrint ()

Post by JurassicC »

A question aimed at those using H4WC IDE

Is there a way to redirect the DebugPrint() output to a standard AmigaDOS Console, rather than the CUBIC output area at the bottom of the IDE.
Reason I ask is I can crash cubic with this little code snippet

Code: Select all

Senddata (1,"CWD ".."directory"..\r\n)
ftpdata$ = ReceiveData(1, #RECIEVEALL)
DebugPrint (ftpdata$)
All other FTP commands I'm using seem to work OK so this must be getting something back from the ftpserver thats crashing the Cubic console??

Or would you suggest moving away from Cubic to say CodeBench ???

I'd be interested to read how people are getting on with CodeBench and Hollywood too ?
AmigaOne X1000 - RadeonHD 7870, 4GB RAM - AmigaOS 4.1ß
AmigaOne X5000 - Radeon R7 250, 2GB RAM - AmigaOS 4.1ß
User avatar
JurassicC
Posts: 36
Joined: Fri May 25, 2012 9:48 pm

Re: Cubic IDE / HW4C and DebugPrint ()

Post by JurassicC »

Edit its not the CWD Command its the ftp LIST command.
I believe there is too much data coming in with RECIEVEALL all from the server into ftpdata$, which then ends up in Cubics Console that causes GoldED to crash.
I have stopped using DebugPrint() and replaced it with a logfile in ram using a simple:-

WriteLine(1,GetTime().." "..ftpdata$)
AmigaOne X1000 - RadeonHD 7870, 4GB RAM - AmigaOS 4.1ß
AmigaOne X5000 - Radeon R7 250, 2GB RAM - AmigaOS 4.1ß
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Cubic IDE / HW4C and DebugPrint ()

Post by airsoftsoftwair »

Yes, this could be a buffer overflow although this should not happen. Unfortunately, it is currently not possible to redirect DebugPrint()'s at runtime. This can only be done during startup using -debugdevice. But of course you can just write to a console using OpenFile(1, "CON:.....") or something.
Post Reply