cippall Posted October 24, 2020 Report Share Posted October 24, 2020 Hi, I'm getting EXCEPTION_ACCESS_VIOLATION when trying to delete all after mesh modifiers via maxscript( 3dsmax 2020 and GrowFX 1.9.9 SP9). I'm using this function - from a Rollout - while all paths are disabled: fn removeAfterMeshWindModifiers oGFX = ( for x = 1 to oGFX.getNumPaths() do ( for y = (oGFX.getNumAfterMeshModifiers x) to 1 by -1 do ( oGFX.deleteAfterMeshModifier x y ) ) ) Is there a better way to do this ? I suspect GrowFX updates the nodes while the script is traversing the paths tree and is causing this exception. Some of the error logs -- ######################################################################## -- Address: 0x329fff23; nCode: 0x00000000C0000005 -- Desc: EXCEPTION_ACCESS_VIOLATION The thread tried to read from or write to a virtual address for which it does not have the appropriate access. -- Read of Address: 0x0000000000000150 -- ######################################################################## ..... -- called from top-level -- ######################################################################## -- C++ callstack: -- (GrowFX): (filename not available): (function-name not available) -- (GrowFX): (filename not available): LibVersion -- (GrowFX): (filename not available): LibVersion -- (MAXScrpt): (filename not available): Generic::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): clear_error_source_data -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): clear_error_source_data -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): SourceFileWrapper::eval -- (MAXScrpt): (filename not available): Generic::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): SourceFileWrapper::eval -- (MAXScrpt): (filename not available): Generic::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): clear_error_source_data -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): clear_error_source_data -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): clear_error_source_data -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): clear_error_source_data -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): clear_error_source_data -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): clear_error_source_data -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): Primitive::apply -- (MAXScrpt): (filename not available): CodeTree::eval -- (MAXScrpt): (filename not available): Generic::apply -- (MAXScrpt): (filename not available): SourceFileWrapper::apply -- (MAXScrpt): (filename not available): RolloutControl::call_event_handler -- (MAXScrpt): (filename not available): RolloutControl::get_wrapped_event_handler -- (MAXScrpt): (filename not available): InitMacroScriptDir -- (MAXScrpt): (filename not available): InitMacroScriptDir -- (USER32): (filename not available): CallWindowProcW -- (USER32): (filename not available): DispatchMessageW -- (USER32): (filename not available): IsWindowVisible -- (ntdll): (filename not available): KiUserCallbackDispatcher -- (win32u): (filename not available): NtUserMessageCall -- (USER32): (filename not available): SendMessageW -- (USER32): (filename not available): SendMessageW -- (core): (filename not available): GetICustButton -- (core): (filename not available): CustomControl::WindowProc -- (core): (filename not available): AncestorIsCUIToolbarWindow -- (USER32): (filename not available): CallWindowProcW -- (USER32): (filename not available): DispatchMessageW -- (USER32): (filename not available): IsDialogMessageW -- (3dsmax): (filename not available): NodeAndAnims::SetNode Quote Link to comment Share on other sites More sharing options...
cippall Posted October 25, 2020 Author Report Share Posted October 25, 2020 Did more testing and created a simplified version to be able to reproduce the behavior. If the script runs while the GrowFX object is selected and the 3dsmax Modify panel is active the error doesn't occur. To recreate the error run this script in a scene with : - one GrowFX that has at least one Wind Modifier attached to any paths - no GrowFX object selected during execution - 3dsmax 2020 - GrowFX 1.9.9 SP9 ( fn removeAfterMeshWindModifiers oGFX = ( for x = 1 to oGFX.getNumPaths() do ( for y = (oGFX.getNumAfterMeshModifiers x) to 1 by -1 do ( gfxAfterMeshModifier = oGFX.getAfterMeshModifier x y if hasProperty gfxAfterMeshModifier "Stiffness" then ( oGFX.deleteAfterMeshModifier x y ) ) ) ) try(destroydialog DeleteAfterMesh)catch() rollout DeleteAfterMesh "Demo" width:280 height:100 ( button btn_1 "START" width:252.0 usePercentageWidth:true percentageWidth:90.0 height:40 on btn_1 pressed do ( if queryBox "Deleting after mesh modifiers. Are you sure?" beep:false then ( aGFX = for x in objects where classOf x == GrowFX collect x for gfx in aGFX do removeAfterMeshWindModifiers gfx ) ) ) createDialog DeleteAfterMesh ) Quote Link to comment Share on other sites More sharing options...
cippall Posted October 25, 2020 Author Report Share Posted October 25, 2020 I guess selecting the object and activating the Modify panel before running the script will do for the time being. If there's a better solution without manipulating the UI I'm still interested. Quote Link to comment Share on other sites More sharing options...
Eduard Posted December 9, 2020 Report Share Posted December 9, 2020 Hi cippall, Apologize for the delay in replying! Thanks for your bug report! We've fixed this and if you need I can send you an update. Later we'll update all files on the server too. Thanks again! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.