cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

ProEngineerEnd() causes creo crash

Ketan_Lalcheta
19-Tanzanite

ProEngineerEnd() causes creo crash

Hello

 

I am using batch file to start Creo from command prompt. In user_initialize(); I am just opening model from path using proMdlLoad(). Update one parameter's value and save model. Till this time, it works fine. Post this, ProEngineerEnd() causes Creo to crash. 

 

Any idea would be of great help.

 

Regards

Ketan

13 REPLIES 13

What has changed since the last time it successfully ran?

OS upgrade?

Creo version upgrade?

System patches?

Visual C/C++ runtime changes?

 

Start looking at those changes to determine what may have changed.

Nothing... This is new development and just addition of this API into code either crashes or hangs Creo... I am having Creo 4.0 M030

I just commented all code. From command prompt also, not passing any argument. Kept only one API into user_initialize and that API is ProEngineerEnd(). 

 

This also leads to crashing of creo randomly and traceback log suggest EXCEPTION_ACCESS_VIOLATION error.

 

Another line which could be helpful into traceback log is :

ERROR: Module information could not be found, GetLastError: 1114 (Address: 0000000000000000)

 

Any idea on how to proceed further? 

You call this in asynchronous mode?
Ketan_Lalcheta
19-Tanzanite
(To:RPN)

Yes it is... Created exe for batch processing but Creo was crashing just at ProEngineerEnd API... Finally come to know that even if entire code is commented out, this single API causes Creo to crash...

Command line Creo argument is used to open Creo and user_initialize takes two arguments one is path for model and another is value for parameter...

Once Creo is open, first API is to load model , then display it , update parameter value, save model and close Creo... Rest all was working fine and commented also, but only ProEngineerEnd is causing crash.

Hmm, sorry but you start Creo or connect to Creo via a Toolkit call?
Using a bat and starting Creo and using user_initalize is not asyn, you need an event loop.

If don’t use the connect or start call, you will crash, because you have no handle.

In batch mode only some event loop commands are necessary, because you want to exit after code has been completed.
Ketan_Lalcheta
19-Tanzanite
(To:RPN)

That's the good idea.. would try to implement that way... Create simple exe which would accept one argument for parameter value and another for path of model. All this would be done in user_initialize along with starting Creo and closing creo with Proengineerend.

This could be a definite solution and would definitely give it a try... Thanks for this solution but I still doubt about Creo crash with Proengineerend API... Why I feel so :??

I have seen that there are so many applications running like the way i mentioned in query... Those applications are in production environment. It was developed on Creo 3.0 M120 as well as Creo 2.0 M080.

Additionally, API Proengineerend don't require any argument and I guess document also does not mention that you can close Creo session which was started with toolkit API.

Still I would give a try what you mention... But ground line is that methodology I mentioned earlier was working with Creo 2.0 and Creo 3.0 with so many apps.

Yes, sorry, you are right, you can use this call in both modes. In this case you may have to search for a memory leak. But you can still try the asynchronous mode, because this may help to figure out the status.

Ketan_Lalcheta
19-Tanzanite
(To:RPN)

correct.... You are right...I also thought for memory leak , but git confused with code I have... I removed entire code and only kept Proengineerend into user_initialize()...so, could not understand what could be issue for memory... ? Also this crash is observed randomly twice or thrice in five times application run.

Additionally, I tried to do asynchronous mode... My exe has two argument and those argument doesn't launch creo... I changed extern "c" user_initialize to int main and inside main, only two API Proengineerstart and Proengineerend are kept. Removed user_terminate also. But new exe could not be executed as it mentioned some error. Could not get when exe execute without error...? Could you please help me on this ?

And yes , appreciate your time and response on this issue. Many thanks...

You need to set PRO_COMM_MSG, please check for the correct name, without this you can’t start Creo. For your batch stuff a EventProcess call before or after each toolkit call should be enough.

 

Hello Ketan_Lalcheta,

 

If RPN's response answers your question, you could mark that post as an Accepted Solution. Doing this could greatly help other community members with the same question find their answer quickly. Thank you both your participation on the PTC Community!

I tried and it didn't work.... Frequency of crash got reduced but still I am able to observe crash issue...

Moreover I tried for config option something related to graphics, but that also does not help much.
Announcements


Top Tags