benkuper / Chataigne

Artist-friendly Modular Machine for Art and Technology
https://benjamin.kuperberg.fr/chataigne
GNU General Public License v3.0
1.21k stars 58 forks source link

Custom HTTP Module causes crash during multiple sendPOST #154

Open odulkanberoglu opened 1 year ago

odulkanberoglu commented 1 year ago

Environment

Describe the bug When an HTTP type custom module script performs local.sendPOST calls in quick succession, it causes Chataigne to crash. The same behaviour is not observed when making the same HTTP POST request the native HTTP Module.

To Reproduce Steps to reproduce the behavior:

  1. Create a simple custom module with one Menu command
  2. Define a default base address to a well-known API. For example: https://httpbin.org/post
  3. Define a simple Menu item. No parameters are necessary
  4. Write Javascript for the callback function. Make a sendPOST call to the base address configured
  5. Start Chataigne and add the custom module
  6. In the inspector panel, use command tester to invoke the command of the module
  7. Enable logging for the module
  8. Click Trigger button and observe any logs
  9. Click on the Trigger button continuously in quick succession
  10. Observe that eventually Chataigne stops responding

Expected behavior Chataigne should not become unresponsive.

odulkanberoglu commented 1 year ago

The following module can also be used to reproduce the issue. CrashTest-Module.zip