Topic: Plugins in MyPlugins_Direct crash PEBakery when trying 2 edit with pencil button  (Read 2032 times)

bob.omb

  • Code Baker
  • Grand Chef
  • *****
  • Location: USA
  • Date Registered: Jul 2017
  • Posts: 1261

0scar

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2013
  • Posts: 309
Another way to crash PABakery.
If in  Button1 the  SectionToRun is Main PABakery crashes just after clicking over the name of the script.
No need to run the script.
I am trying to run an Util script with a button Goooo in the plugin instead of clicking the pencil.


Button1=Goooo,1,8,361,27,98,25,Main,0,True

Homes32

  • Code Baker
  • Chef
  • ***
  • Date Registered: Dec 2010
  • Posts: 177
Main is a special section reserved for the script definition. It should never contain code or be called directly.

If you want to run with a button, then call the process section.
Code: [Select]
Button1=Goooo,1,8,361,27,98,25,Process,0,True
« Last Edit: March 15, 2018, 02:10:52 AM by Homes32 »

0scar

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2013
  • Posts: 309
Thanks Homes32

BTW, there is a difference  running a plugin with a button, if PEBakery stops with error there is not PEBakery Log Viewer, no way to know what error it was.

ied206

  • Moderator,
  • Chef
  • *****
  • Location: South Korea
  • Date Registered: Jan 2014
  • Posts: 257
In current version, PEBakery disables logging in interface for performance. I will find out how to preserve log without too much performance impact.

Homes32

  • Code Baker
  • Chef
  • ***
  • Date Registered: Dec 2010
  • Posts: 177
Thanks Homes32

BTW, there is a difference  running a plugin with a button, if PEBakery stops with error there is not PEBakery Log Viewer, no way to know what error it was.

Interface logging is OFF by default, but you can turn it on with the following setting.
ila_rendered

0scar

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2013
  • Posts: 309
Thanks  :thumbsup:
It works, PEBakery Log Viewer doesn't pop-up but the log is there.

ied206

  • Moderator,
  • Chef
  • *****
  • Location: South Korea
  • Date Registered: Jan 2014
  • Posts: 257
Another way to crash PABakery.
If in  Button1 the  SectionToRun is Main PABakery crashes just after clicking over the name of the script.
No need to run the script.
I am trying to run an Util script with a button Goooo in the plugin instead of clicking the pencil.


Button1=Goooo,1,8,361,27,98,25,Main,0,True

I patched PEBakery to log an error instead of crashing when trying to access Main section as a code section.
Try this nightly build : link
« Last Edit: March 17, 2018, 03:17:38 PM by ied206 »

0scar

  • Code Baker
  • Chef
  • ***
  • Date Registered: Jan 2013
  • Posts: 309
Running script with button Gooo error is logged correctly but for the script line number cero.
Code: [Select]
[Error] Section [Main] is not a valid code section (Line 0)

Running script with Pencil error is not logged, the script starts and finishes doing nothing.
Code: [Select]
- PEBakery System Log -
[2018-03-17 06:50:55 PM] [Info] Build [main test New Plugin Creator - Run] started
[2018-03-17 06:51:03 PM] [Info] Build [main test New Plugin Creator - Run] finished

Regards

 

Powered by EzPortal