https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • yeah, im seeing the exact same thing
    b

    bright-gpu-74537

    04/10/2023, 2:28 PM
    yeah, im seeing the exact same thing
  • nice, i thought i was doing something silly 😄
    a

    ambitious-knife-25690

    04/10/2023, 2:28 PM
    nice, i thought i was doing something silly 😄
  • it is more "reliable" with a timer, in that all the requests go through but it seems like timer + threaded http call does not work together *at all*
    a

    ambitious-knife-25690

    04/10/2023, 2:29 PM
    it is more "reliable" with a timer, in that all the requests go through but it seems like timer + threaded http call does not work together at all
  • yeah, i mean, this _could_ all be because of the threading, but it seems bizarrely consistent
    b

    bright-gpu-74537

    04/10/2023, 2:30 PM
    yeah, i mean, this could all be because of the threading, but it seems bizarrely consistent
  • it is
    a

    ambitious-knife-25690

    04/10/2023, 2:30 PM
    it is
  • i had assumed it was something to do with the data i was getting back from the site
    a

    ambitious-knife-25690

    04/10/2023, 2:30 PM
    i had assumed it was something to do with the data i was getting back from the site
  • but the data seemed to all be "okay" and nothing seemed to be empty
    a

    ambitious-knife-25690

    04/10/2023, 2:30 PM
    but the data seemed to all be "okay" and nothing seemed to be empty
  • at least on first glance
    a

    ambitious-knife-25690

    04/10/2023, 2:31 PM
    at least on first glance
  • mine consistently freezes on the 4th
    a

    ambitious-knife-25690

    04/10/2023, 2:31 PM
    mine consistently freezes on the 4th
  • Does this only occur in a HaxeUI app, or can you reproduce it in a standalone test case?
    p

    powerful-morning-89

    04/10/2023, 2:40 PM
    Does this only occur in a HaxeUI app, or can you reproduce it in a standalone test case?
  • not sure yet, currently its a haxeui app, ill try to repro it in a non haxeui app when i get a little more understanding of whats going on
    b

    bright-gpu-74537

    04/10/2023, 2:41 PM
    not sure yet, currently its a haxeui app, ill try to repro it in a non haxeui app when i get a little more understanding of whats going on
  • this is the line it freezes on: `api.writeBytes(buf, 0, len);`
    b

    bright-gpu-74537

    04/10/2023, 2:42 PM
    this is the line it freezes on:
    api.writeBytes(buf, 0, len);
  • Hmm. I seem to remember running into weird freezing stuff with sockets when I was trying to make an async socket...
    p

    powerful-morning-89

    04/10/2023, 2:43 PM
    Hmm. I seem to remember running into weird freezing stuff with sockets when I was trying to make an async socket...
  • sounds pretty similar
    b

    bright-gpu-74537

    04/10/2023, 2:46 PM
    sounds pretty similar
  • But iirc it was a bug in `haxe.io.Input`'s readAll implementation, not in writeBytes.
    p

    powerful-morning-89

    04/10/2023, 2:50 PM
    But iirc it was a bug in `haxe.io.Input`'s readAll implementation, not in writeBytes.
  • right, defo could be that here also i think... not sure... it does seem to get bytes, but then hangs somewhere after that... really hard to debug this too
    b

    bright-gpu-74537

    04/10/2023, 2:51 PM
    right, defo could be that here also i think... not sure... it does seem to get bytes, but then hangs somewhere after that... really hard to debug this too
  • ```haxe trace("11111111199999999999999999999", pos, len, pos + len); for (i in pos...pos + len) b.push(b2[i]); trace("22222222222222299999999999999999999"); ```
    b

    bright-gpu-74537

    04/10/2023, 3:07 PM
    Copy code
    haxe
            trace("11111111199999999999999999999", pos, len, pos + len);
            for (i in pos...pos + len)
                b.push(b2[i]);
            trace("22222222222222299999999999999999999");
  • the second trace never appears (from BytesBuffer.hx)
    b

    bright-gpu-74537

    04/10/2023, 3:07 PM
    the second trace never appears (from BytesBuffer.hx)
  • I would suggest using a debugger and digging deeper. (A real debugger, not that hxcpp thing that'll give up the moment you reach native code.)
    p

    powerful-morning-89

    04/10/2023, 3:12 PM
    I would suggest using a debugger and digging deeper. (A real debugger, not that hxcpp thing that'll give up the moment you reach native code.)
  • yeah, might what it through visual studio, see what (if anything) it comes up with
    b

    bright-gpu-74537

    04/10/2023, 3:13 PM
    yeah, might what it through visual studio, see what (if anything) it comes up with
  • so, i actually think its this code in core/http: https://github.com/core-haxe/http/blob/main/src/http/providers/DefaultHttpProvider.hx#L28-L44
    b

    bright-gpu-74537

    04/10/2023, 3:51 PM
    so, i actually think its this code in core/http: https://github.com/core-haxe/http/blob/main/src/http/providers/DefaultHttpProvider.hx#L28-L44
  • i can make it work _alot_ more consistently by NOT calling resolve from the thread and instead having a timer pull "resolves" off of an array and call them from the main thread
    b

    bright-gpu-74537

    04/10/2023, 3:51 PM
    i can make it work alot more consistently by NOT calling resolve from the thread and instead having a timer pull "resolves" off of an array and call them from the main thread
  • b

    bright-gpu-74537

    04/10/2023, 3:51 PM

    https://cdn.discordapp.com/attachments/565569107701923852/1095013297952149514/image.pngâ–¾

  • (first time ive seen that)
    b

    bright-gpu-74537

    04/10/2023, 3:52 PM
    (first time ive seen that)
  • You indeed shouldn't call callbacks on the worker thread.
    p

    powerful-morning-89

    04/10/2023, 3:53 PM
    You indeed shouldn't call callbacks on the worker thread.
  • yeah, feels obvious now... i threw that together in 10 mins... should have thought about it a little more and wouldnt have spend the day debugging something pretty simple
    b

    bright-gpu-74537

    04/10/2023, 3:54 PM
    yeah, feels obvious now... i threw that together in 10 mins... should have thought about it a little more and wouldnt have spend the day debugging something pretty simple
  • b

    bright-gpu-74537

    04/10/2023, 3:54 PM

    https://cdn.discordapp.com/attachments/565569107701923852/1095014035965091930/image.pngâ–¾

  • very consistently "right" now
    b

    bright-gpu-74537

    04/10/2023, 3:55 PM
    very consistently "right" now
  • > basic threaded request, which allows for async programming, could / should be greatly > improved by using a thread pool, but for a preliminary impl its better than the > standard (sync) behaviour of haxe std http Note that there's a thread pool implementation in the std.
    p

    powerful-morning-89

    04/10/2023, 3:56 PM
    > basic threaded request, which allows for async programming, could / should be greatly > improved by using a thread pool, but for a preliminary impl its better than the > standard (sync) behaviour of haxe std http Note that there's a thread pool implementation in the std.
  • oh yeah, forgot about that... cool - will check it out... at the moment i just wanna fix the bad impl that is there - cheers for the headsup
    b

    bright-gpu-74537

    04/10/2023, 3:56 PM
    oh yeah, forgot about that... cool - will check it out... at the moment i just wanna fix the bad impl that is there - cheers for the headsup
1...162916301631...1687Latest