JavaScript build_race_courses.js crashes opencpn #98
Replies: 2 comments
-
i've done a bit of debugging and if I comment out the second line in this dialogue ({type:"text", value:"Enter a pattern...) opencpn doesn't crash. however nothing happens at all. I'm expecting a couple of diaglogue boxes to open, correct? I focused on this line as I thought it might have an extra ''. config = [ Any thoughts or pointers on how to best debug this appeciated. |
Beta Was this translation helpful? Give feedback.
-
I moved this to be an issue but you seem to have managed to reply to it as the original discussion. So we have our wires crossed. Please see here. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I've recently installed the JavaScript plugin and loaded the build_race_courses.js script however when I run the script OpenCPN crashes immediately. I tailed the opencpn.log file at the time but no data was added to it. The JS console remains open. I've repeated the same exercise several times with the same result. Other javascripts run fine.
I'm running OpenCPN 5.8.4-1 on Linux openplotter 5.15.76-v8+, Raspberry Pi 4, I'm using VNC to access the pi.
pi@openplotter:~ $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
I'm new to javascript and the js plugin however I wrote a couple of scripts that worked fine.
This is the plugin diagnostic dump
JavaScript plugin version 3.0
JavaScript patch 0
JavaScript tools window DPI scaling factor 1.000000
Platform Linux 5.15.76-v8+ aarch64
wxWidgets version 3.2.1.0 or 3201
OCPN API version 1.18
Duktape version 20700
Not using svg
pJavaScript_pi->m_pconfig 0x00b2dc9d20
pJavaScript_pi->m_parent_window 0x00b34bbb90
pJavaScript_pi->m_floatOnTop false
pJavaScript_pi->mRememberToggleStatus false
favouriteFiles:
recentFiles:
N2K pgn registrations: none
pJavaScript_pi->mpFirstConsole 0x00b672b690
----------Console JavaScript----------
Console name: JavaScript
this: 0x00b672b690
mpNextConsole: nullptr
mStatus: (no status)
mRunningMain: false
m_time_to_allocate: 1000ms
m_timeout_check_counter: 0
mWaitingCached: true
mWaiting: false
mpMessageDialog: nullptr
isBusy(): false
isWaiting(): false
auto_run: false
position: screen x:-2 y:-2 DIP x:-2 y:-2
Size(): x:1024 y:740 DIP x:1024 y:740 MinSize() x:123 y:30
m_parked: true
isParked(): false
parked Location 100 27 size 125 31
notParked location 132 66 size 738 600
Messages callback table
OCPN_CORE_SIGNALK
OCPN_OPENGL_CONFIG
OpenCPN Config
m_timerActionBusy: false
Timers callback table
(empty)
Menus callback table
(empty)
m_dialog: None
m_alert: None
m_NMEAmessageFunction:
m_streamMessageCntlsVector
m_activeLegFunction:
m_exitFunction:
m_closeButtonFunction:
m_explicitResult: false
m_result:
mscriptToBeRun: false
No brief
mConsoleRepliesAwaited 0
m_remembered
wxFile ids - none
No Duktape context
pJavaScript_pi->mpBin nullptr
End of dump
Thanks in advance
Jeremy
Beta Was this translation helpful? Give feedback.
All reactions