Highlighted

CTD when accessing projectItem of sourceMonitor after dropping clip in source monitor

Community Beginner ,
Jun 22, 2020

Copy link to clipboard

Copied

Hey folks!

 

I am experiencing a severe problem while working with the sourceMonitor.projectItem, if a clip or image was "manually" dropped into the sourceMonitor or opened by the sourceMonitor object from qe or the app object.


Scenario:

Open a new empty project.
Open the source monitor view.

Drag & drop an item from the desktop into the source monitor view.
Try to access app.sourceMonitor.getProjectItem().nodeId (from Extendscript Toolkit or from the app object in jsx).


=> Premiere crashes to desktop.

PP2019 just crashes (Extendscript Toolkit might raise a "send crash report" dialog).
PP2020 shows the "send crash report" dialog, even without the Toolkit opened.

The crash report includes EXCEPTION_ACCESS_VIOLATION and says something about ram not accessible for write.

 

I was not able to try-catch anything there...


This does not happen when I open an item from a bin using the context dialog "open in source monitor".

It also does not happen when I try to identify the sourceMonitor.projectItem by its name - instead of the nodeId.

So this is working: 

 

var test = app.sourceMonitor.getProjectItem().name;

 

And this forces the crash:

 

var test = app.sourceMonitor.getProjectItem().nodeId;

 


The System is:
Windows 10 Enterprise v1809
Intel Xeon E3-1240

32GB RAM

NVIDIA NVS 310

using renderer: Mercury Playback Engine Software
PPro 2019 v13.1.5, PPro 2020 v14.2.0

 

But it happens on other windows machines too (with better hardware)...

Is there any workaround which might be of help?

Regards,

Guntram

Soooooooo, communication with @Bruce Bullis did not show me why I could not get a clue that we could check if the item is somewhere in the project and then not do the ``nodeId`` check.

Following that option, I could manage to work around the CTD!

The recursive function looks like this:

var findProjectItemByName = function findProjectItemByName(currentItem, name) {
  var index;
  var currentChild;
  var result;
  if (name == currentItem.name) {
    return currentItem;
  } else {
    if (currentItem && currentItem.children) {
      for (index = 0; index < currentItem.children.numItems; index++) {
        currentChild = currentItem.children[index];
        result = findProjectItemByName(currentChild, name);
        if (result !== false) {
          return result;
        }
      }
    }
    return false;
  }
}

var theItemWhichShouldNotBeFound = findProjectItemByName(app.project.rootItem, 'a name which is not in the project');

``theItemWhichShouldNotBeFound`` will contain false or the ``projectItem``. If it is ``false``, we do not check for ``nodeId``.

 

Thanks alot for this idea!!! 🙂

 

Regards, Guntram

TOPICS
Crash, Error or problem, SDK

Views

137

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

CTD when accessing projectItem of sourceMonitor after dropping clip in source monitor

Community Beginner ,
Jun 22, 2020

Copy link to clipboard

Copied

Hey folks!

 

I am experiencing a severe problem while working with the sourceMonitor.projectItem, if a clip or image was "manually" dropped into the sourceMonitor or opened by the sourceMonitor object from qe or the app object.


Scenario:

Open a new empty project.
Open the source monitor view.

Drag & drop an item from the desktop into the source monitor view.
Try to access app.sourceMonitor.getProjectItem().nodeId (from Extendscript Toolkit or from the app object in jsx).


=> Premiere crashes to desktop.

PP2019 just crashes (Extendscript Toolkit might raise a "send crash report" dialog).
PP2020 shows the "send crash report" dialog, even without the Toolkit opened.

The crash report includes EXCEPTION_ACCESS_VIOLATION and says something about ram not accessible for write.

 

I was not able to try-catch anything there...


This does not happen when I open an item from a bin using the context dialog "open in source monitor".

It also does not happen when I try to identify the sourceMonitor.projectItem by its name - instead of the nodeId.

So this is working: 

 

var test = app.sourceMonitor.getProjectItem().name;

 

And this forces the crash:

 

var test = app.sourceMonitor.getProjectItem().nodeId;

 


The System is:
Windows 10 Enterprise v1809
Intel Xeon E3-1240

32GB RAM

NVIDIA NVS 310

using renderer: Mercury Playback Engine Software
PPro 2019 v13.1.5, PPro 2020 v14.2.0

 

But it happens on other windows machines too (with better hardware)...

Is there any workaround which might be of help?

Regards,

Guntram

Soooooooo, communication with @Bruce Bullis did not show me why I could not get a clue that we could check if the item is somewhere in the project and then not do the ``nodeId`` check.

Following that option, I could manage to work around the CTD!

The recursive function looks like this:

var findProjectItemByName = function findProjectItemByName(currentItem, name) {
  var index;
  var currentChild;
  var result;
  if (name == currentItem.name) {
    return currentItem;
  } else {
    if (currentItem && currentItem.children) {
      for (index = 0; index < currentItem.children.numItems; index++) {
        currentChild = currentItem.children[index];
        result = findProjectItemByName(currentChild, name);
        if (result !== false) {
          return result;
        }
      }
    }
    return false;
  }
}

var theItemWhichShouldNotBeFound = findProjectItemByName(app.project.rootItem, 'a name which is not in the project');

``theItemWhichShouldNotBeFound`` will contain false or the ``projectItem``. If it is ``false``, we do not check for ``nodeId``.

 

Thanks alot for this idea!!! 🙂

 

Regards, Guntram

TOPICS
Crash, Error or problem, SDK

Views

138

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 22, 2020 1
Adobe Employee ,
Jul 06, 2020

Copy link to clipboard

Copied

Hi Guntram,


I think you're running into the fact that not every item that's open in the Source monitor, corresponds to an actual projectItem. [The Source monitor can preview media that's not contained in any project.]

0. Launch PPro.

1. New, empty project.

2. Drag media into Source monitor.

3. Execute this script:

 

var testItem = app.sourceMonitor.getProjectItem(); // this works, but should probably fail if the media opened in the Source monitor isn't in any open project.

var name = testItem.name; // succeeds, because a projectItem's Name defaults to the file name...

var nodeID = testItem.nodeID; // fails, because no nodeID exists.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 06, 2020 0
Community Beginner ,
Jul 06, 2020

Copy link to clipboard

Copied

Hey Bruce,
thanks for the info.

The problem is, that we want to preview media which is not inside the project.
We do not want to import the item which should be previewed.
So when previewing an item which is not inside some bin, is it impossible if we need to check the projectItem's nodeId?

Usually I would expect some response like "unedfined is not an object" or a similar message.

Requesting the nodeId does not only fail, but Premiere is crashing with this ram access error...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 06, 2020 0
Community Beginner ,
Nov 05, 2020

Copy link to clipboard

Copied

Soooooooo, communication with @Bruce Bullis did not show me why I could not get a clue that we could check if the item is somewhere in the project and then not do the ``nodeId`` check.

Following that option, I could manage to work around the CTD!

The recursive function looks like this:

var findProjectItemByName = function findProjectItemByName(currentItem, name) {
  var index;
  var currentChild;
  var result;
  if (name == currentItem.name) {
    return currentItem;
  } else {
    if (currentItem && currentItem.children) {
      for (index = 0; index < currentItem.children.numItems; index++) {
        currentChild = currentItem.children[index];
        result = findProjectItemByName(currentChild, name);
        if (result !== false) {
          return result;
        }
      }
    }
    return false;
  }
}

var theItemWhichShouldNotBeFound = findProjectItemByName(app.project.rootItem, 'a name which is not in the project');

``theItemWhichShouldNotBeFound`` will contain false or the ``projectItem``. If it is ``false``, we do not check for ``nodeId``.

 

Thanks alot for this idea!!! 🙂

 

Regards, Guntram

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 05, 2020 0
Community Beginner ,
Nov 05, 2020

Copy link to clipboard

Copied

Ohhhh... be careful about the double equals! It is a copy paste typo 😉 Should be 3 (===)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 05, 2020 0
Adobe Employee ,
Nov 05, 2020

Copy link to clipboard

Copied

Glad it worked! Let's give Andre the credit for the idea, for re-asking your questions in an interesting way. 🙂

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 05, 2020 0