Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Background App initialization #1030

Merged
merged 11 commits into from
Jan 8, 2025
Merged

FIX: Background App initialization #1030

merged 11 commits into from
Jan 8, 2025

Conversation

koubaa
Copy link
Collaborator

@koubaa koubaa commented Jan 7, 2025

Fixes #975

Also cleans up some of the special case handling for exit codes

@koubaa koubaa requested a review from a team as a code owner January 7, 2025 20:40
@koubaa koubaa changed the title Process return code fix: Process return code Jan 7, 2025
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jan 7, 2025
@dipinknair dipinknair changed the title fix: Process return code FIX: Background App initialization Jan 7, 2025
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 87.82%. Comparing base (ba8cc0d) to head (797d25e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1030      +/-   ##
==========================================
+ Coverage   83.73%   87.82%   +4.08%     
==========================================
  Files          35       36       +1     
  Lines        2269     2324      +55     
==========================================
+ Hits         1900     2041     +141     
+ Misses        369      283      -86     

@dipinknair
Copy link
Collaborator

@koubaa
Copy link
Collaborator Author

koubaa commented Jan 8, 2025

@dipinknair On docker I can reproduce that crash with 252 on the main branch of PyMechanical. I will proceed with the merge.

Please try to find out which build date of 252 the crash started to happen in

@koubaa koubaa merged commit b81bef2 into main Jan 8, 2025
109 of 127 checks passed
@koubaa koubaa deleted the process-return-code branch January 8, 2025 13:02
@dipinknair
Copy link
Collaborator

Please try to find out which build date of 252 the crash started to happen in

@koubaa
01/06/2025 14:16:06

build date for the 252 where failure has seen.

@koubaa
Copy link
Collaborator Author

koubaa commented Jan 8, 2025

@dipinknair to confirm, the failure is seen on the 1/6 build but not on the 1/5 build?

@dipinknair
Copy link
Collaborator

@koubaa

Pass on build date 11/27/2024 09:34:44
Started failing on 01/02/2025 14:15:00

@koubaa
Copy link
Collaborator Author

koubaa commented Jan 9, 2025

@dipinknair that's a long range. Were there no builds in between?

@dipinknair
Copy link
Collaborator

@koubaa
10/30/2024 16:13:08
This is as far as I can find where failure is occurring on 252.

@koubaa
Copy link
Collaborator Author

koubaa commented Jan 13, 2025

@dipinknair ok - seems like something from the very beggining of 25.2. Could be related to the revisioning itself or a thirdparty library change that happened with the revisioning

@koubaa
Copy link
Collaborator Author

koubaa commented Jan 13, 2025

@dipinknair please come up with a script that is a minimal reproduction of the crash and we can dig deeper

@dipinknair
Copy link
Collaborator

@dipinknair please come up with a script that is a minimal reproduction of the crash and we can dig deeper

@koubaa , Here is a simple script that throws an exception

from ansys.mechanical.core import App
app=App()
app.update_globals(globals())
harmonic_acoustic = Model.AddHarmonicAcousticAnalysis()
harmonic_acoustic.SystemID

this is suppose to show only deprecation warning but with 252 its giving the exception as below.

<stdin>:1: UserWarning: Obsolete: 'SystemID': Property is obsolete, this gets the directory name of the current analysis, not always same as the Workbench level System ID
CRITICAL -  -  logging - handle_exception - Uncaught exception
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
System.Runtime.InteropServices.COMException:  (0x80004005)
  at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <e85874d36dd54c51a7dcd93d72f2c404>:0
  at (wrapper cominterop) Ansys.Common.Interop.DSObjectsAuto.IDSAnswerSetAuto.get_WorkingDir()
  at (wrapper cominterop-invoke) Ansys.Common.Interop.DSObjectsAuto.IDSAnswerSetAuto.get_WorkingDir()
  at Ansys.ACT.Automation.Mechanical.Analysis.get_WorkingDir () [0x00014] in <544882d8fcda455db83dfacecb22b3e2>:0
  at Ansys.ACT.Automation.Mechanical.Analysis.get_SystemID () [0x00005] in <544882d8fcda455db83dfacecb22b3e2>:0
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <e85874d36dd54c51a7dcd93d72f2c404>:0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on shutdown for multiple background app test
3 participants