- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个用于气象站的长时间运行的 python 脚本。该脚本从天气传感器捕获数据并将它们上传到 mySql 数据库以及地下天气。
我遇到的问题是脚本将运行多天然后在没有回溯的情况下崩溃。我已经对此进行了数周的故障排除,但无济于事。我最初是在 IDLE 中运行脚本。我也在终端中运行了它。我“认为”的最新更新是真正的问题是我在 Visual Studio Code 中运行了脚本,当它崩溃时它发布了:munmap_chunk() invalid pointer in the terminal。
我的理解是 munmap_chunk 是一个 C 问题,所以它很可能是由我导入的模块生成的。我也明白,当一个指针传递给 free() 而不是通过 malloc() 获得时,就会抛出这个错误。
话虽如此,我不知道如何缩小实际产生问题的范围,以便我可以更正它。
在看到 munmap_chunk 错误之前,我以为可能是某个地方发生了内存泄漏。我手动调用了垃圾收集器,在几乎所有情况下你都不应该这样做。这允许脚本在最终再次崩溃之前运行更长时间。
我试图确定的主要事情是如何将问题的来源归零,因为脚本刚刚崩溃并且我没有得到任何回溯信息或抛出的异常。
#!/usr/bin/python3
from gpiozero import Button
import time
import math
import Wind_Direction
import statistics
import Database
import requests
import sys
import logging
import board
from adafruit_bme280 import basic as adafruit_bme280
logging.basicConfig(format='%(asctime)s **%(levelname)4s** - %(module)s: %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p', filename='/home/testa/testb/testc.txt', filemode = 'w', level=logging.DEBUG)
logging.debug("The program has started")
print ("\nWeather_Station_BYO: The program has started")
i2c = board.I2C() # uses board.SCL and board.SDA
# ------- WU URL and credentials ---------
WUurl = "https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?"
WUid = "TESTEST" # add your WS ID
WUpwd = "TESTEST" # add your password
WUcreds = "ID=" + WUid + "&PASSWORD="+ WUpwd
wind_count = 0 # Count how many half-rotations of the anemometer
radius_in = 3.54 # Radius of your anemometer in inches (9 cm)
wind_interval = 5 # How often (secs) to report speed
interval = 300 # 5*60 seconds = 5 minutes = 300 seconds
inches_in_mile = 63360
SECS_IN_AN_HOUR = 3600
ADJUSTMENT = 1.18 # Anemometer adjustment
BUCKET_SIZE = 0.011 # Rain gauge tips once when (.2794 mm = .011 in) of rain falls
rain_count = 0
store_speeds = []
store_directions = []
def spin():
"""Counts the number of every half-rotation of the anenmometer and returns that count"""
global wind_count
wind_count = wind_count + 1 # Every half-rotation, add 1 to count
# print("spin" + str(wind_count))
def calculate_speed(time_sec):
"""Uses the number of half-rotations stored in the global variable wind_count and the time used to count the rotations and generates a final wind speed"""
global wind_count
circumference_in = (2 * math.pi) * radius_in
rotations = wind_count / 2.0
dist_in = (circumference_in * rotations) / inches_in_mile # Calculate distance travelled by a cup in inches
mile_per_sec = dist_in / time_sec
mph = mile_per_sec * SECS_IN_AN_HOUR
final_speed = mph * ADJUSTMENT
# print("final speed" + str(final_speed))
return final_speed
def bucket_tipped():
"""Counts the number of times the rain gauge bucket filled and tipped"""
global rain_count
rain_count = rain_count + 1
# print(rain_count * BUCKET_SIZE)
def reset_rainfall():
"""Resets the global rain_count variable set in the bucket_tipped function"""
global rain_count
rain_count = 0
def reset_wind():
"""Resets the global wind_count variable set in the spin function"""
global wind_count
wind_count = 0
def read_all():
"""Reads bme280 (temp, humididty, pressure) values converts them to proper units and calculates the dewpoint"""
bme280 = adafruit_bme280.Adafruit_BME280_I2C(i2c)
bme280.sea_level_pressure = 1013.25 # change this to match the location's pressure (hPa) at sea level
humidity = bme280.humidity # % Relative humidity
pressure = bme280.pressure * 100 / 3386 # Pascals converted to inHg
ambient_temperature = bme280.temperature * 9/5 + 32 # Convert to fahrenheit rounded
b = 17.62
c = 243.12
gamma = (b * bme280.temperature /(c + bme280.temperature)) + math.log(bme280.humidity / 100.0)
dewpoint = (c * gamma) / (b - gamma)
return humidity, pressure, ambient_temperature, dewpoint
wind_speed_sensor = Button(5)
wind_speed_sensor.when_pressed = spin # Whenever the wind sensor magnet closes the reed switch then add 1 to the number of rotations
# temp_probe = ds18b20_therm.DS18B20()
rain_sensor = Button(6)
rain_sensor.when_pressed = bucket_tipped
db = Database.weather_database()
i = 1
while db.wxlogin() != True:
time.sleep(30)
i = i + 1
if (i>5):
logging.debug("Could not establish a connection to the mysql database and program will be terminated.")
time.sleep(5)
sys.exit("Could not establish connection") # Exit the script after i amount of connection attempts
logging.debug("Initial connection to database was successful!")
print("\nWeather_Station_BYO: Initial connection to database was successful!")
# Loop to measure wind speed at 300-second intervals
while True:
try:
start_time = time.time()
while time.time() - start_time <= interval:
# print("In loop 1")
wind_start_time = time.time()
reset_wind()
while time.time() - wind_start_time <= wind_interval:
# print("In loop 2")
store_directions.append(Wind_Direction.get_value(wind_interval)) # wind_interval is how long to take measuremennts for wind direction
final_speed = calculate_speed(wind_interval) # Add this speed to the list & wind_interval is how long to take measurements for wind speed
store_speeds.append(final_speed)
logger = logging.getLogger(__name__)
logger.debug("Wind speed and direction obtained")
# print("Out of both loops")
# print("stored directions " + str(store_directions))
# print("stored speeds " + str(store_speeds))
wind_dir = Wind_Direction.get_average(store_directions)
wind_gust = max(store_speeds)
wind_speed = statistics.mean(store_speeds)
rainfall = rain_count * BUCKET_SIZE
reset_rainfall()
store_speeds = []
store_directions = []
humidity, pressure, ambient_temp, dewpoint = read_all()
logger.debug("Humidity, pressure, ambient_temp and dewpoint obtained")
# print(wind_dir)
if 348.75 <= wind_dir or wind_dir <= 11.25:
wind_direction = 'N'
elif 11.26 <= wind_dir <= 33.75:
wind_direction = 'NNE'
elif 33.76 <= wind_dir <= 56.25:
wind_direction = 'NE'
elif 56.26 <= wind_dir <= 78.75:
wind_direction = 'ENE'
elif 78.76 <= wind_dir <= 101.25:
wind_direction = 'E'
elif 101.25 <= wind_dir <= 123.75:
wind_direction = 'ESE'
elif 123.76 <= wind_dir <= 146.25:
wind_direction = 'SE'
elif 146.26 <= wind_dir <= 168.75:
wind_direction = 'SSE'
elif 168.76 <= wind_dir <= 191.25:
wind_direction = 'S'
elif 191.26 <= wind_dir <= 213.75:
wind_direction = 'SSW'
elif 213.76 <= wind_dir <= 236.25:
wind_direction = 'SW'
elif 226.26 <= wind_dir <= 258.75:
wind_direction = 'WSW'
elif 258.76 <= wind_dir <= 281.25:
wind_direction = 'W'
elif 281.26 <= wind_dir <= 303.75:
wind_direction = 'WNW'
elif 303.76 <= wind_dir <= 326.25:
wind_direction = 'NW'
elif 326.25 <= wind_dir <= 348.75:
wind_direction = 'NNW'
else: wind_direction = ''
#print('',wind_direction, 'Wind Direction \n',round(wind_speed,1), 'Wind Speed (mph) \n', round(wind_gust,1),'Wind Gust (mph) \n', round(rainfall,1), 'Rainfall (in) \n',
# round(humidity,1), '% Relative Humidity \n', round(dewpoint,1), 'Dew Point F \n', round(pressure,2), 'Barometric Pressure (inHg) \n', round(ambient_temp,1), 'Temperature F \n')
i = 1
while db.check_connection() != True:
time.sleep(30)
i = i + 1
if (i>5):
logger.debug("Connection to the mysql database was disconnected and connection could not be restablished. Program will be terminated.")
time.sleep(5)
sys.exit("Could not re-establish connection") # Exit the script after i amount of connection attempts
db.wxlogin()
db.insert(1,round(ambient_temp,1), 0, 0, round(pressure,2), round(humidity,1), round(dewpoint,1), wind_direction, round(wind_speed,1), round(wind_gust,1), round(rainfall,1)) # 10 items
# Weatherunderground
# print("Uploading to Weather Underground")
f_date = "&dateutc=now"
f_humid = "&humidity=" + str(humidity) # % Relative humidity
f_wspeed = "&windspeedmph=" + str(wind_speed) # mph
f_gust = "&windgustmph=" + str(wind_gust) # mph
f_airtemp = "&tempf=" + str(ambient_temp) # degrees F
f_rain = "&rainin=" + str(rainfall) # inches
f_press = "&baromin=" + str(pressure) # inches
# f_groundtemp = "&soiltempf=" + str(ground_temp_f) # degrees F
f_winddir = "&winddir=" + str(wind_dir) # degrees
f_action = "&action=updateraw"
try:
r = requests.get(WUurl+WUcreds+f_date+f_humid+f_wspeed+f_winddir+f_gust+f_airtemp+f_rain+f_press+f_action, timeout = 30)
print("\nReceived " + str(r.status_code) + " " + str(r.text) + " from WU")
except requests.ConnectionError as e:
logger.debug("HTTP Error - Connection Error. Make sure you are connected to the internet. Technical details given below.\n")
logger.debug(str(e))
print("\nHTTP Error - Connection Error. Make sure you are connected to internet. Technical details given below.\n")
print(str(e))
continue
except requests.Timeout as e:
logger.debug("HTTP Error - Timeout Error")
logger.debug(str(e))
print("\nHTTP Error - Timeout Error")
print(str(e))
continue
except requests.RequestException as e:
logger.debug("HTTP Error - General Error")
logger.debug(str(e))
print("\nHTTP Error - General Error")
print(str(e))
continue
except KeyboardInterrupt:
print("\nSomeone closed the program")
if (str(r.status_code) != '200'):
logger.debug("Upload to Weather Underground was not sucessful. HTTP Response Code: " + str(r.status_code) + " " + str(r.text))
except Exception:
logger.exception("Unhandled exception in the script!", exc_info = True)
VSCode 中故障处理程序的回溯:
munmap_chunk(): invalid pointer
Fatal Python error: Aborted
Thread 0xb0fa5440 (most recent call first):
File "/usr/lib/python3.7/threading.py", line 300 in wait
File "/usr/lib/python3.7/threading.py", line 552 in wait
File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 539 in held
File "/usr/lib/python3.7/threading.py", line 865 in run
File "/usr/lib/python3.7/threading.py", line 917 in _bootstrap_inner
File "/usr/lib/python3.7/threading.py", line 885 in _bootstrap
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py", line 1054 in __call__
Thread 0xb27ff440 (most recent call first):
File "/usr/lib/python3.7/threading.py", line 300 in wait
File "/usr/lib/python3.7/threading.py", line 552 in wait
File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 543 in held
File "/usr/lib/python3.7/threading.py", line 865 in run
File "/usr/lib/python3.7/threading.py", line 917 in _bootstrap_inner
File "/usr/lib/python3.7/threading.py", line 885 in _bootstrap
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydev_bundle/pydev_monkey.py", line 1054 in __call__
Thread 0xb31ff440 (most recent call first):
File "/usr/lib/python3.7/threading.py", line 300 in wait
File "/usr/lib/python3.7/threading.py", line 552 in wait
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 246 in _on_run
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py", line 46 in run
File "/usr/lib/python3.7/threading.py", line 917 in _bootstrap_inner
File "/usr/lib/python3.7/threading.py", line 885 in _bootstrap
Thread 0xb3bff440 (most recent call first):
File "/usr/lib/python3.7/threading.py", line 300 in wait
File "/usr/lib/python3.7/threading.py", line 552 in wait
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd.py", line 200 in _on_run
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py", line 46 in run
File "/usr/lib/python3.7/threading.py", line 917 in _bootstrap_inner
File "/usr/lib/python3.7/threading.py", line 885 in _bootstrap
Thread 0xb45ff440 (most recent call first):
File "/usr/lib/python3.7/threading.py", line 296 in wait
File "/usr/lib/python3.7/threading.py", line 552 in wait
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py", line 43 in _on_run
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py", line 46 in run
File "/usr/lib/python3.7/threading.py", line 917 in _bootstrap_inner
File "/usr/lib/python3.7/threading.py", line 885 in _bootstrap
Thread 0xb4fff440 (most recent call first):
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py", line 219 in _read_line
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py", line 237 in _on_run
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py", line 46 in run
File "/usr/lib/python3.7/threading.py", line 917 in _bootstrap_inner
File "/usr/lib/python3.7/threading.py", line 885 in _bootstrap
Thread 0xb599b440 (most recent call first):
File "/usr/lib/python3.7/threading.py", line 300 in wait
File "/usr/lib/python3.7/queue.py", line 179 in get
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py", line 382 in _on_run
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_daemon_thread.py", line 46 in run
File "/usr/lib/python3.7/threading.py", line 917 in _bootstrap_inner
File "/usr/lib/python3.7/threading.py", line 885 in _bootstrap
Current thread 0xb6f34b40 (most recent call first):
File "/usr/lib/python3/dist-packages/gpiozero/spi_devices.py", line 85 in _words_to_int
File "/usr/lib/python3/dist-packages/gpiozero/spi_devices.py", line 220 in _read
File "/usr/lib/python3/dist-packages/gpiozero/spi_devices.py", line 157 in value
File "/home/pi/Liberty Ridge WX Reduced/Wind_Direction.py", line 97 in get_value
File "/home/pi/Liberty Ridge WX Reduced/Liberty_Ridge_WX.py", line 199 in <module>
File "/usr/lib/python3.7/runpy.py", line 85 in _run_code
File "/usr/lib/python3.7/runpy.py", line 96 in _run_module_code
File "/usr/lib/python3.7/runpy.py", line 263 in run_path
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285 in run_file
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444 in main
File "/home/pi/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/__main__.py", line 45 in <module>
File "/usr/lib/python3.7/runpy.py", line 85 in _run_code
File "/usr/lib/python3.7/runpy.py", line 193 in _run_module_as_main
来自终端故障处理程序的回溯:
munmap_chunk(): invalid pointer
Fatal Python error: Aborted
Thread 0xb44ff440 (most recent call first):
File "/usr/lib/python3.7/threading.py", line 300 in wait
File "/usr/lib/python3.7/threading.py", line 552 in wait
File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 539 in held
File "/usr/lib/python3.7/threading.py", line 865 in run
File "/usr/lib/python3.7/threading.py", line 917 in _bootstrap_inner
File "/usr/lib/python3.7/threading.py", line 885 in _bootstrap
Thread 0xb4eff440 (most recent call first):
File "/usr/lib/python3.7/threading.py", line 300 in wait
File "/usr/lib/python3.7/threading.py", line 552 in wait
File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 539 in held
File "/usr/lib/python3.7/threading.py", line 865 in run
File "/usr/lib/python3.7/threading.py", line 917 in _bootstrap_inner
File "/usr/lib/python3.7/threading.py", line 885 in _bootstrap
Current thread 0xb6f53b40 (most recent call first):
File "/usr/lib/python3/dist-packages/gpiozero/spi_devices.py", line 85 in _words_to_int
File "/usr/lib/python3/dist-packages/gpiozero/spi_devices.py", line 220 in _read
File "/usr/lib/python3/dist-packages/gpiozero/spi_devices.py", line 157 in value
File "/home/pi/Liberty Ridge WX Reduced/Wind_Direction.py", line 97 in get_value
File "/home/pi/Liberty Ridge WX Reduced/Liberty_Ridge_WX.py", line 189 in <module>
Aborted
最佳答案
我在我的 Raspberry Pi 气象站上运行非常相似的代码,并且在几天后从命令行或 Thonny 运行时出现 munmap_chunk() 错误。
像你一样,除了 munmap_chunk() 行之外,我没有得到任何信息。这让我认为错误不在 Python 中,因为它肯定会提供跟踪信息。所以,它可能来自 Python 使用的库,或者来自操作系统中进行内存管理的部分。
这是我认为是错误发生位置的源代码,注释很有趣...
static void
munmap_chunk (mchunkptr p)
{
INTERNAL_SIZE_T size = chunksize (p);
assert (chunk_is_mmapped (p));
/* Do nothing if the chunk is a faked mmapped chunk in the dumped
main arena. We never free this memory. */
if (DUMPED_MAIN_ARENA_CHUNK (p))
return;
uintptr_t block = (uintptr_t) p - prev_size (p);
size_t total_size = prev_size (p) + size;
/* Unfortunately we have to do the compilers job by hand here. Normally
we would test BLOCK and TOTAL-SIZE separately for compliance with the
page size. But gcc does not recognize the optimization possibility
(in the moment at least) so we combine the two values into one before
the bit test. */
if (__builtin_expect (((block | total_size) & (GLRO (dl_pagesize) - 1)) != 0, 0))
malloc_printerr ("munmap_chunk(): invalid pointer");
atomic_decrement (&mp_.n_mmaps);
atomic_add (&mp_.mmapped_mem, -total_size);
/* If munmap failed the process virtual memory address space is in a
bad shape. Just leave the block hanging around, the process will
terminate shortly anyway since not much can be done. */
__munmap ((char *) block, total_size);
}
关于Python 脚本崩溃(munmap_chunk 无效指针),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70823482/
我有 powershell 脚本。通过调度程序,我运行 bat 文件,该文件运行 PS1 文件。 BAT文件 Powershell.exe -executionpolicy remotesigned
什么更快? 或者 $.getScript('../js/SOME.js', function (){ ... // with $.ajaxSetup({ cache: true });
需要bash脚本来显示文件 #!/bin/bash my_ls() { # save current directory then cd to "$1" pushd "$1" >/dev/nu
我有一个输入 csv 文件,实际上我需要在输入文件中选择第 2 列和第 3 列值,并且需要转换两个值的时区(从 PT 到 CT),转换后我需要替换转换后的时区值到文件。 注意: 所有输入日期值都在太平
我正在使用/etc/init.d/httpd 作为 init.d 脚本的模板。我了解文件中发生的所有内容,但以下行除外: LANG=$HTTPD_LANG daemon --pidfile=${pid
我有以下选择: python runscript.py -O start -a "-a "\"-o \\\"-f/dev/sda1 -b256k -Q8\\\" -l test -p maim\""
我对 shell 脚本完全陌生,但我需要编写一个 shell 脚本来检查文件是否存在,然后移动到另一个位置 这是我写的: 一旦设备崩溃,我就会在/storage/sdcard1/1 中收集日志 #!/
我正在使用 bash 脚本从文本文件中读取数据。 数据: 04:31 Alex M.O.R.P.H. & Natalie Gioia - My Heaven http://goo.gl/rMOa2q
这是单击按钮时运行的 javascript 的结尾 xmlObj.open ('GET', /ajax.php, true); xmlObj.send (''); } 所以这会执行根目录中的php脚本
关闭。这个问题需要debugging details .它目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and th
我需要将文件转换为可读流以通过 api 上传,有一个使用 fs.createReadStream 的 Node js 示例。任何人都可以告诉我上述声明的 python 等价物是什么? 例子 const
我有一个 shell 脚本 cron,它从同一目录调用 python 脚本,但是当这个 cron 执行时,我没有从我的 python 脚本中获得预期的输出,当我手动执行它时,我的 python 脚本的
如何使 XMLHttpRequest (ajax) 调用的 php 脚本安全。 我的意思是,不让 PHP 文件通过直接 url 运行,只能通过脚本从我的页面调用(我不想向未登录的用户显示数据库结果,并
我正在尝试添加以下内容 我正在使用经典的 asp。但我不断收到的错误是“一个脚本 block 不能放在另一个脚本 block 内。”我尝试了此处的 document.write 技术:Javasc
如何从另一个 PHP 脚本(如批处理文件)中运行多个 PHP 脚本?如果我了解 include 在做什么,我认为 include 不会起作用;因为我正在运行的每个文件都会重新声明一些相同的函数等。我想
我想创建具有动态内容的网页。我有一个 HTML 页面,我想从中调用一个 lua 脚本 如何调用 lua 脚本? ? ? 从中检索数据?我可以做类似的事情吗: int xx = 0; xx
我删除了我的第一个问题,并重新编写了更多细节和附加 jSfiddle domos。 我有一个脚本,它运行查询并返回数据,然后填充表。表中的行自动循环滚动。所有这些工作正常,并通过使用以下代码完成。然而
我尝试使用 amp 脚本,但收到此错误: “[amp-script] 脚本哈希未找到。amp-script[script="hello-world"].js 必须在元[name="amp-script
我有一个读取输入的 Shell 脚本 #!/bin/bash echo "Type the year that you want to check (4 digits), followed by [E
我正在从 nodejs 调用 Lua 脚本。我想传递一个数组作为参数。我在 Lua 中解析该数组时遇到问题。 下面是一个例子: var script = 'local actorlist = ARGV
我是一名优秀的程序员,十分优秀!