Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Endless loop caused by javascript?

Hi,

In the recent script I have solved the difficult issues (see the post:Challenges to conduct the randomized memory trials between the primary task trials.), I designed a self-restart loop for practice. The loop will restart once the participant made one error. This loop works well in the local, but it never stop when it was on OSWEB. The original algorithm was from a python code. Here is the .osexp with the practice loop only.


Comments

  • Hi @CSC,

    If it works locally in OpenSesame, but not in osweb, then it is likely a bug in osweb that still needs to be resolved. I checked your experiment and it all looks ok what you did. I remember there still being some problems with break_if statements of loops not being properly evaluated in osweb, so that might be what you are facing here.

    I also noticed that your Prac_list2 loop immediately follows your Prac_list1 loop, without any display in between. It may be that the Prac_list1 loop successfully ends, but you don't notice this because you immediately continue to Prac_list2. I assume you have checked if this happens too and it isn't part of the problem?

    Buy Me A Coffee

  • Hi @Daniel

    I randomly selected one of practice lists before the experimental session. A "Run if" parameter [PList] decided which list will be ran for this participation. Below picture shows how I decided the value of [PList] in the procedure.


  • Right, I missed that. I have to look a little bit deeper into why this doesn't work and sadly I am a bit strained on time at the moment. I can reiterate though that if it works in OpenSesame and not in osweb, it is probably a bug in osweb, as the two should have behaviorial parity. Likely the problem lies in the break_if evaluation of osweb, so that's a place where I'll start looking once I get to it.

    If you can create a minimal reproducible example, you can post an issue on osweb's issue board: https://github.com/open-cogsci/osweb/issues (an also check if a similar issue hasn't already been reported there)

    Buy Me A Coffee

  • Hi both,

    I've had the exact same problem; for some reason in OSWeb the loop item doesn't correctly validate the break-if statement. Perhaps it expects java code (although I tried a lot of variations without success).

    Here's my own temporary solution: give all items in the loop a run-if statement that is the opposite of your break-if statement. When your break condition is met, the loop will continue running until its final cycle, but it's simply not running any items anymore - so it's almost as if you broke out of the loop.

    Cheers

    Josh

  • I've also learned just now that the space and return keys (which may have been pressed following a keyboard item) cannot be used for run-if and break-if statements. Return is a reserved keyword in java and cannot be used as identifier. The space triggers a scroll-down action in your browser (in Chrome at least), and isn't registered in the experiment.

    When switching these keys for random other keys in my if-statements, everything worked fine..

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games