User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 29

Thread: ReturnFloat() crashes

  1. #1
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    ReturnFloat() crashes

    I'm trying to use ReturnFloat() but for some reason, it crashes. Are there any specific reasons it would crash? Probably something common that I don't know about.

    If you want some of the code I got plenty here. I get no warnings or errors on compile.
    Working as fast as I can on Fusion 3

  2. #2
    Forum Moderator Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    USA
    Posts
    461
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ReturnFloat() crashes

    You need to set the flag first. I'm using this:

    // Set the "Float" flag
    rdPtr->rHo.hoFlags |= HOF_FLOAT;

    // Return the float
    float fResult = 0.2123;

    return *((long*)&fResult);
    -Mokhtar M. Khorshid

  3. #3
    Clicker Multimedia Fusion 2
    Retriever2's Avatar
    Join Date
    Jun 2006
    Location
    United States
    Posts
    502
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ReturnFloat() crashes

    rSDK ReturnFloat() sets the float flag.

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: ReturnFloat() crashes

    Yes, I am using the rSDK, sorry I forgot to mention that.
    Working as fast as I can on Fusion 3

  5. #5
    Forum Moderator Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    USA
    Posts
    461
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ReturnFloat() crashes

    I'm using the rSDK as well.
    -Mokhtar M. Khorshid

  6. #6
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: ReturnFloat() crashes

    So you mean I should avoid ReturnFloat() and instead do it the way you posted?
    Working as fast as I can on Fusion 3

  7. #7
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: ReturnFloat() crashes

    Mokhtar, I did it the way you suggested, but it did not make any difference. It still crashes, same way, same spot.

    I made a test expression that was just a ReturnFloat(0.123456789); and it did not crash; it worked fine. (It returned 0.123457)

    So why else would it crash?
    Working as fast as I can on Fusion 3

  8. #8
    Forum Moderator Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    USA
    Posts
    461
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ReturnFloat() crashes

    Maybe it's not the return that's causing this. Perhaps you're accessing an array index out of bounds?
    -Mokhtar M. Khorshid

  9. #9
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: ReturnFloat() crashes

    I think it must be corruption. I put debug messages and it doesn't crash until the ReturnFloat() line, so I must be giving it some bad data. I haven't changed the code much since the pastebin I linked above..
    Working as fast as I can on Fusion 3

  10. #10
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ReturnFloat() crashes

    Quote Originally Posted by LB
    I think it must be corruption.
    Is this the PC of yours with the bad ram? Because bad ram can cause some really fun errors...

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. A = A * 0.8 crashes the app
    By MetalGeo in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 25th July 2011, 07:25 AM
  2. .Exe Crashes
    By weka in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 21st May 2009, 12:15 AM
  3. Crashes with R248
    By Hordolur in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 28th July 2008, 10:41 AM
  4. Crashes
    By Benicle in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 29th June 2007, 08:15 AM
  5. Crashes
    By BenMo in forum File Archive
    Replies: 3
    Last Post: 17th January 2007, 11:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •