Fatal Error 2010

Started by jbuzbee, April 04, 2014, 12:10:21 PM

Previous topic - Next topic

Fred Tomke

Hi, what does the dmpuserinfo.xml say?
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

jbuzbee


jbuzbee

#17
Well, that's weird - OnEnteringNoDocState, the OnClose event fires.
Nevermind - I had that event selected in the editor . . ..

jbuzbee

Owen the only thing I can think of is the OnDocActivated event?

owenwengerd

That's plausible. Test your theory by removing the event. Did anything change when you tested Synchronous? If not, then it's probably something completely different.
Owen Wengerd (Outside The Box) / ManuSoft

jbuzbee

Did anything change when you tested Synchronous?

No.

I'll try removing the event - thanks Owen

jbuzbee

I cannot replicate the fatal error with the OnDocActivated event turned off.

jb

owenwengerd

Does it still crash if you define the OnDocActivated event handler, but with only a (princ) and nothing else? And no change at all between Synchronous vs. Asynchronous?
Owen Wengerd (Outside The Box) / ManuSoft

jbuzbee

#23
no change between making the form synchronous or asynchronous

jbuzbee

Well now I can't get it to crash at all - this morning was bad, but now, nothing.   :o


jbuzbee

Can I get any help on this - I'm in production on 4 stations and it's causing havoc - any help will be greatly appreciated.

Thank you very much.

James Buzbee

owenwengerd

Unless I or someone else can reproduce the problem, I'm afraid you're the only one that can debug the problem. I have some additional ideas of things to try, but the next step depends on your answer to my earlier question about OnDocActivated.
Owen Wengerd (Outside The Box) / ManuSoft

jbuzbee

Ok just happened. OnDocActivated didn't crash with just a princ so it must be in my code in the event call.  I'll revise the code to effectively turn of the event for now.

Code (autolisp) Select
(defun c:ADT/ADTPalette#OnDocActivated  (/ dwg path)    
  (dcl_Tree_Clear ADT_ADTPalette_StyleTreeControl)
    (kb:Propogate_00_StyleTreeControl)
  (princ)
  (princ))


Code (autolisp) Select
(defun kb:Propogate_00_StyleTreeControl  ( / llist doors hmlist sclist allist sllist fd1list
   fd2list fd3list fd4list otlist)
  (dcl_Tree_AddParent
    ADT_ADTPalette_StyleTreeControl
    (list (list "Walls" "wall" 0 0 0)
  (list "Doors" "door" 1 1 1)
  (list "Storefront" "doorwinass" 2 2 2)
  (list "Windows" "window" 3 3 3)
  (list "Curtain Wall" "curtain" 4 4 4)
  (list "Spaces" "space" 5 5 5)
  (list "Stairs" "stair" 6 6 6)
  (list "Railings" "rail" 7 7 7)
  (list "Roofs" "roof" 8 8 8)
  (list "Slabs" "slab" 9 9 9)
  (list "Masses" "mass" 10 10 10)
  (list "Schedule Tags" "schdtag" 11 11 11)
  (list "Schedules" "schd" 12 12 12)
  (list "Tags and Symbols" "tags" 13 13 13)
          (list "Mask Blocks" "mbks" 14 14 14)))
  (dcl_Tree_AddChild
    ADT_ADTPalette_StyleTreeControl
    (list (list "door" "Metal Doors" "HM" 1 1 1)
  (list "door" "Wood Doors" "SC" 1 1 1)
  (list "door" "Aluminum & Glass Doors" "AL" 1 1 1)
  (list "door" "other Doors" "OT" 1 1 1)
  (list "door" "Fire Doors" "FD" 1 1 1)))
  (dcl_Tree_AddChild
    ADT_ADTPalette_StyleTreeControl
    (list (list "FD" "1 hour doors" "FD1" 1 1 1)
  (list "FD" "2 hour doors" "FD2" 1 1 1)
  (list "FD" "3 hour doors" "FD3" 1 1 1)
  (list "FD" "4 hour doors" "FD4" 1 1 1)))
;;; Propogate Doors ;
 
   (setq doorlist (kb:getlocalObjectList "AEC_DOOR_STYLES"))
   
(foreach
x  doorlist
   (cond ((= (substr x 1 2) "HM") (setq hmlist (append (list x) hmlist)))
((= (substr x 1 2) "SC") (setq sclist (append (list x) sclist)))
((= (substr x 1 2) "AL") (setq allist (append (list x) allist)))
((= (substr x 1 2) "SL") (setq sllist (append (list x) sllist)))
((= (substr x 1 3) "FD1") (setq fd1list (append (list x) fd1list)))
((= (substr x 1 3) "FD2") (setq fd2list (append (list x) fd2list)))
((= (substr x 1 3) "FD3") (setq fd3list (append (list x) fd3list)))
((= (substr x 1 3) "FD4") (setq fd4list (append (list x) fd4list)))
(t (setq otlist (append (list x) otlist)))))
(if hmlist
   (foreach
  i  hmlist
     (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "HM" i i 1 1 1)))
(if sclist
   (foreach
  i  sclist
     (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "SC" i i 1 1 1)))
(if allist
   (foreach
  i  allist
     (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "AL" i i 1 1 1)))
(if sllist
   (foreach
  i  sllist
     (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "AL" i i 1 1 1)))
(if otlist
   (foreach
  i  otlist
     (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "OT" i i 1 1 1)))
(if fd1list
   (foreach
  i  fd1list
     (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "FD1" i i 1 1 1)))
(if fd2list
   (foreach
  i  fd2list
     (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "FD2" i i 1 1 1)))
(if fd3list
   (foreach
  i  fd3list
     (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "FD3" i i 1 1 1)))
(if fd4list
   (foreach
  i  fd4list
     (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "FD4" i i 1 1 1)))
;;; Propogate DoorWinAssembly ;
  (setq llist (kb:getlocalObjectList "AEC_WINDOW_ASSEMBLY_STYLES"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "DoorWinAss" x x 2 2 2))
;;; Propogate Walls ;
  (setq llist (kb:getlocalObjectList "AEC_WALL_STYLES"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "wall" x x 0 0 0))
;;; Propogate CurtainWalls ;
  (setq llist (kb:getlocalObjectList "AEC_CURTAIN_WALL_LAYOUT_STYLES"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "curtain" x x 4 4 4))
;;; Propogate Windows ;
  (setq llist (kb:getlocalObjectList "AEC_WINDOW_STYLES"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "window" x x 3 3 3))
;;; Propogate Spaces ;
  (setq llist (kb:getlocalObjectList "AEC_SPACE_STYLES"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "space" x 5 5 5))
;;; Propogate Stairs ;
  (setq llist (kb:getlocalObjectList "AEC_STAIR_STYLES"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "stair" x x 6 6 6))
;;; Propogate Railings ;
  (setq llist (kb:getlocalObjectList "AEC_RAILING_STYLES"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "rail" x x 7 7 7))
;;; Propogate Roof ;
  (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "roof" "standard" 8 8 8)
  (setq llist (kb:getlocalObjectList "AEC_ROOF_SLAB_STYLES"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "roof" x x 8 8 8))
;;; Propogate Slab ;
  (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "slab" "standard" 9 9 9)
  (setq llist (kb:getlocalObjectList "AEC_SLABE_STYLES"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "slab" x x 9 9 9))
;;; Propogate Mass ;
  (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "mass" "standard" 10 10 10)
  (setq llist (kb:getlocalObjectList "AEC_MASS_ELEM_STYLES"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "mass" x x 10 10 10))

  ;;; Propogate Mask Blocks ;
  (setq llist (kb:getlocalObjectList "AEC_MASKBLOCK_DEFS"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "mbks" x x 14 14 14))

  ;;; Propogate Schedules ;
  (setq llist (kb:getlocalObjectList "AEC_SCHEDULE_TABLE_STYLES"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "schd" x x 12 12 12))
;;; Propogate Schedule Tags ;
  (setq llist (kb:getlocaltaglist))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "schdtag" x x 11 11 11))

  ;;; Propogate Anno Tags ;
  (dcl_Tree_AddChild
    ADT_ADTPalette_StyleTreeControl
    (list (list "tags" "Annotation" "anno" 13 13 13)
  (list "tags" "Layout Blocks" "lay" 13 13 13)
  (list "tags" "Appliances" "appl" 13 13 13)
  (list "tags" "Furniture" "furn" 13 13 13)
  (list "tags" "Lighting" "lite" 13 13 13)
  (list "tags" "Power" "powr" 13 13 13)
  (list "tags" "HVAC" "hvac" 13 13 13)
  (list "tags" "Plumbing" "plmb" 13 13 13)
  (list "tags" "Fire" "fire" 13 13 13)
  (list "tags" "Equipment" "eqmt" 13 13 13)))

  (setq llist (kb:GetLocalSymbolBlocks "TAG_*"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "anno" x x 13 13 13))

  (setq llist (kb:GetLocalSymbolBlocks "LAY_*"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "lay" x x 13 13 13))

  (setq llist (kb:GetLocalSymbolBlocks "I_APPL*"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "appl" x x 13 13 13))

  (setq llist (kb:GetLocalSymbolBlocks "I_APPL*"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "appl" x x 13 13 13))

  (setq llist (kb:GetLocalSymbolBlocks "I_FURN*"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "furn" x x 13 13 13))

  (setq llist (kb:GetLocalSymbolBlocks "E_LIGHT*"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "lite" x x 13 13 13))

  (setq llist (kb:GetLocalSymbolBlocks "E_POWER*"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "powr" x x 13 13 13))

  (setq llist (kb:GetLocalSymbolBlocks "M_HVAC*"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "hvac" x x 13 13 13))

  (setq llist (kb:GetLocalSymbolBlocks "M_PLUMB*"))
  (foreach
x  llist
    (dcl_Tree_AddChild ADT_ADTPalette_StyleTreeControl "plmb" x x 13 13 13))

  (princ)
  (princ))

owenwengerd

Ok, that helps narrow it down to the tree control. Next thing to try would be just a normal button (could even be a separate toolbar button) that runs the same code when you press the button, then see if the crash occurs only during OnDocActivated, or also when pressing the button. Also it would be useful if you can determine some pattern to when it crashes vs. when it doesn't.
Owen Wengerd (Outside The Box) / ManuSoft

jbuzbee

#29
I already have a refresh button which calls the OnInitialize event (which is the exact same code as the OnDocActivated event) - will that do?