Leaving a function not returning back.
  • Caterpillar
    Caterpillar
    AmiDARK
    Posts: 38 from 2011/10/29
    From: South France
    Hi All,

    In the AmiDARK Engine, I have developed a multi-camera system.
    Here is the part of the function that refresh camera(s) if they exist :

    for ( CLoop = 0; CLoop < 8; CLoop++ ){
    printf( "DarkCamera %i Step #00\n", 0 );
    BTest = BitTest( CameraMASK, CLoop );
    CExist = DECameraExist( CLoop );
    if ( CExist != 0 ){
    if ( BTest != 0 ){
    DESyncCamera( CLoop );
    }
    }
    }
    In the DESyncCamera() function, I have added "printf()" to trace what happen.

    It run the DESyncCamera() function entirely (the last printf positionned as last function in the DESynCamera() function show me the function work.

    if I put a printf() just after the DESyncCamera in the source code showned here, the printf() is not outputed and my app said "application is meditating" ...

    Can someone help me concerning this issue ?

    Kindest Regards,
    AmiDARK
  • »12.11.11 - 19:19
    Profile Visit Website
  • Moderator
    Kronos
    Posts: 2240 from 2003/2/24
    Without acces to the called functions and detailed debug-log it's really down to stabbing in the dark...

    My guess would be that one of the functions does something really nasty like accesing an array past it's size and therefore trashes memory.

    If this happens on stack (read with an array defined in the function) it might even kille the return address.

    Solution:
    Clean out those functions till they do nothing at all (or your code stops crashing).

    And remember 99.9% of all computer-errors are between keyboard and monitor :-/
  • »12.11.11 - 20:33
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12081 from 2003/5/22
    From: Germany
    > 99.9% of all computer-errors are between keyboard and monitor

    Yeah, this damn bottle of booze is to blame for sure ;-)
  • »12.11.11 - 20:38
    Profile
  • Caterpillar
    Caterpillar
    AmiDARK
    Posts: 38 from 2011/10/29
    From: South France
    @Kronos :
    You're right.
    What's make me crazy is that the same code run perfectly under AmigaOS 4.1 :p
    Hope to find a fix for this soonly :)

    Thank you all for your answer
  • »12.11.11 - 23:33
    Profile Visit Website