Skip to main content
Lee DeRaud
Inspiring
September 14, 2014
Answered

VS2012 Express/PSSDK Anomaly

  • September 14, 2014
  • 1 reply
  • 380 views

Ok, I'm 0-for-5 so far getting questions answered, but hope springs eternal...

Situation is this: an automation plugin, fairly simple, set as 'Persistent', that listens for a particular filter plugin to execute and then does some processing. All of this is in 'Master.cpp'. The processing functions are down at the bottom of Master.cpp, with prototypes up at the top. So far, so good: everything compiles/links clean, start up PS, execute the 'trigger' plugin, the processing churns through, spike the ball, the crowd goes wild. In the course of getting to this point, I've run it under the VS debugger multiple times, using the 'Attach to process...' method, setting breakpoints, single-stepping, all the usual stuff...works good either in or out of the debugger.

At this point it occurs to me that I'll be using those processing functions again in other projects, so I move the prototypes to 'AutoUtil.h', move the functions to 'AutoUtil.cpp', compile/link/execute...and nothing works. The notify hook function (still in Master.cpp) gets started, but never sees the trigger plugin execute. Note that none of the functions that got moved to in AutoUtil.cpp have even been called yet. So I try to debug it...and I can't even hit a breakpoint: the debugger thinks the module hasn't been loaded yet.

Apparently whatever is getting screwed up happens at compile/link time, since the functions that got moved haven't been called. The only thing that's been changed is that a couple of functions moved from one compile unit to another, but for some reason that broke unrelated functionality.

Any thoughts?

This topic has been closed for replies.
Correct answer Lee DeRaud

Got around the problem by including the offending functions inline in Debug mode and in separate file in Release mode. That was 10 days ago.

Went back and looked at it again today (many changes to the whole project later) and everything works as expected, Release and Debug with everything in a separate compile unit. I have absolutely no idea what was happening and have no desire to go back and try to recreate the problem, so I'm declaring victory.

Do I get the 10 points if I answer my own question?

1 reply

Lee DeRaud
Inspiring
September 14, 2014

Things just got a whole lot weirder: the problem goes away if the project is rebuilt in 'Release' mode.

I got nothin'.

Lee DeRaud
Lee DeRaudAuthorCorrect answer
Inspiring
September 25, 2014

Got around the problem by including the offending functions inline in Debug mode and in separate file in Release mode. That was 10 days ago.

Went back and looked at it again today (many changes to the whole project later) and everything works as expected, Release and Debug with everything in a separate compile unit. I have absolutely no idea what was happening and have no desire to go back and try to recreate the problem, so I'm declaring victory.

Do I get the 10 points if I answer my own question?