SketchUp / api-issue-tracker

Public issue tracker for the SketchUp and LayOut's APIs
https://developer.sketchup.com/
38 stars 10 forks source link

Returning a large value from HtmlDialog action callback crashes SU #754

Open thomthom opened 2 years ago

thomthom commented 2 years ago

https://forums.sketchup.com/t/htmldialog-bug/187172/6?u=tt_su

Relates to #753

dlg = UI::HtmlDialog.new({
                           dialog_title: "test"
                         })
dlg.add_action_callback('say'){|context, params|
  p params['a'].to_i # this returns the Integer, which will crash (SU21Win #336997)
  # Return nil or a string or a smaller int will work
}
dlg.set_html(%Q{
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
  sketchup.say({a:'2220166733'})
</script>
</body>
</html>
             })
dlg.show
sketchupbot commented 2 years ago

Logged as: SKEXT-3314