Sorry about the struggle with the nasty crashes....
Your question about my windows version: I have upgraded windows from 7 to 10 a half year ago.
To explain how my program works the following. There are several user levels. This is the so called "cross section level". Starting this levels also a view menu is defined with 5 sub menus :
menu_control = Addmenuitem (menutxt2(1),2, CrossMen2_1) ! Zoom
menu_control = Addmenuitem (menutxt2(2),2, CrossMen2_2) ! Reset view
menu_control = Addmenuitem (menutxt2(3),2, CrossMen2_3) ! Show-options
menu_control = Addmenuitem (menutxt2(4),2, CrossMen2_4) ! Rotate 3-D
menu_control = Addmenuitem (menutxt2(5),2, CrossMen2_5) ! Move Window
menu_control = Addmenuitem (menutxt2(6),2, CrossMen2_6) ! Select single frame
All these external menu routines only defines a menu id and item as follows:
! _________________ Menu id 2 -- view_______________________________
menuid=2; menuitem =1
menuid=2; menuitem =5
All menu routines are calling “Navi_CrossSec” where selection is made (after a initialization, only the first time of call) as follows:
CrossMenu: Select CASE (menuid)
! ______________________ menuid 1: files - menu______________________________
Select CASE (menuitem)
CASE (5); CALL Save_section ! Save all parts and current active ordinates
CASE (8); CALL Export_sec(N_SPT)! Export to DXF-file start here here (Make options )
! ______________________ menuid 2: View - menu_______________________________
SELECT CASE (menuitem)
CASE (1) ; CALL ZOOM(x_left,y_up,x_rght,y_bot)
CASE (2) ; N_SPT = 0 ! Reset to original view
INCLUDE 'WIN_Reset.fd' ! Real window-size related to the ship's dimension same as above-----
dummy = setwindow(.TRUE., x_left,y_up,x_rght,y_bot) CASE (3); CALL Show_Options_dlg(V_OPT) ! define view options
CASE (4); CALL rotate_3_D(rx,ry,rz,V_OPT)! Rotate the 3-d view
CASE (5); Call PICK_MOVE_Window(x_left,y_up,x_rght,y_bot)! Move window by mouse pick
at the end always follows the drawing procedure:
End Select CrossMenu
13 Menuitem = 0 !Reset item after finishing each selected procedure
! _____________________START visual resentations________________________________________
! Set graphic window related to the extension of the cross section
dummy= setwindow (.TRUE., x_left, y_up, x_rght, y_bot)
if(dummy == 0) call dlgmessage(DIALOG_Warn,'Bad window settings for visual presentations')
! Graphic presentation of structural parts on cross section
IF(V_OPT(8) .and. N_SPT <=0)Then
Call View3_D(Framesetlist,V_OPT,ry,rz) ! calling view_section in a loop for all defiend active frames
CALL view_section(N_SPT,.False.) ! part of file SectionDrawing.f90 - param dxf here false
! ____________________end of visual presentations
Please take into account that the way how the whole program is build, has a history from the middle of the 90ties until now.
About the crashes: They are not inside the view routines but in the routines of menu id 2 item 1 or 5!
Its crazy that I can repeat zoom or move window separate from each other endless but the next call of the other one causes the crash just starting the mouse handler. Why?????
Further more the variables x_left, y_up, x_rght, y_bot are global and defined in module “StrPartGlobals” for “Navi_CrossSec” but not in zoom and move window.
Zoom and move window are contained in a separate library and they use the module “W_ords_to_pixels” also where scale_x and _y are defined.
I hope to give an overview how the program is built.
Meanwhile I am working on a next program level with the same structure using also the view options. Looking forward I will see if the problems are the same.
For the user version I can switch off move window preliminary until the problem is solves.
Tanks very much for all your effort you spent in this problem.