replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Run-time Error: 00401000 main [+0080]
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Run-time Error: 00401000 main [+0080]

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: N�rnberg, Germany

PostPosted: Wed Jan 26, 2011 1:50 pm    Post subject: Run-time Error: 00401000 main [+0080] Reply with quote

In debug win32 mode the program works fine. When I start the release win32 version the following run-time error occurs. Using checkmate win32 and debugging the string used for the dynamic titlebar, the initial assignment for the caption does not work properly.
Quote:
Runtime error from program:h:\ftn95\femag\bch\src\release\win32\bch.exe
Run-time Error
Unused arguments on winio call

00401000 main [+0080]


Question: Why does the program work with debug win32 and not in release/checkmate win32?



Uploaded with ImageShack.us[/b]
Back to top
View user's profile Send private message
silverfrost
Site Admin


Joined: 29 Nov 2006
Posts: 193
Location: Manchester

PostPosted: Thu Jan 27, 2011 8:26 pm    Post subject: Reply with quote

Has this just started happening? It seems a bit of fundamental problem - first line of program is incorrect.
Back to top
View user's profile Send private message Visit poster's website
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: N�rnberg, Germany

PostPosted: Fri Jan 28, 2011 9:00 am    Post subject: Reply with quote

The program is developed in Debug Win32 mode without any problems. Building it with Release Win32 the run-time errors occurs.

The variable TITLE_BAR_CAPTION is defined as character(len=50). With checkmate the assigment 'BCH-Reader' results in '??????????'.

Is the fundamantal error in the code or the compiler - it works in Debug Win32 mode.
Back to top
View user's profile Send private message
Sebastian



Joined: 20 Feb 2008
Posts: 177

PostPosted: Fri Jan 28, 2011 9:07 am    Post subject: Reply with quote

Quote:
The variable TITLE_BAR_CAPTION is defined as character(len=50).

Well just post the actual code, this is not visible in the images you posted.
Back to top
View user's profile Send private message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: N�rnberg, Germany

PostPosted: Fri Jan 28, 2011 9:54 am    Post subject: Reply with quote

Main and COMMON block:
Code:
winapp
program BCH
  implicit none
  include <windows.ins>
  character(len=256) :: cmd_line
  integer :: i,ctrl
  integer*2 :: INVOKED,CMNARGS@
!  COMMON BLOCKS
  include 'GUI_PARAMETER.INC'
!  EXTERNAL
  EXTERNAL                      &
    &  FN_CLR_WINDOW,           &
    &  FN_PRN_DATA,             &
    &  FN_OPERATING_POINT,      &
    &  select_file,             &
    &  about_box_cb

  title_bar_caption = 'BCH-Reader'
  INVOKED = CMNARGS@()
  ctrl = -1
  i=winio@('%ca@&',title_bar_caption)
  i=winio@('%ww&')
  i=winio@('%sy[thin_border]&')
  i=winio@('%bg[BTNFACE]%nl&')
  i=winio@('%mn[Open,About,Exit]&',               &
    &   select_file,                              &
    &   about_box_cb,                             &
    &   'EXIT')
  i=winio@('%mi[PRG_ICON]&')
  i=winio@('%ob[depressed,named_c][BCH Results]&')
  i=winio@('%80.20cw[vscroll]%cb&',0)
  i=winio@('%lw%ff%2nl&',ctrl)
  i=winio@('Torque %15rf&',T_AIRGAP)
  i=winio@('%tan/min %15rf&',N_RPM)
  i=winio@('%taUmax %15rf&',U_MAX)
  i=winio@('%ta%`^bt[Calculate]%2nl&',FN_OPERATING_POINT)
  i=winio@('%^bt[Clear]&',FN_CLR_WINDOW)
  i=winio@('%ta%^bt[Show arrays]',FN_PRN_DATA)
  if (INVOKED>=1) then
    CALL GET_COMMAND_ARGUMENT(1,cmd_line)
    write(*,*) 'Command line argument = '//trim(cmd_line)
  endif
end

Code:
  double precision :: T_airgap = 0.0D0,     &
      &               n_rpm = 0.0D0,        &
      &               U_max = 0.0D0
  character(len=50) :: title_bar_caption

  common /GUI_PARAMETER/                                &
      & T_airgap,n_rpm,U_max,title_bar_caption
Back to top
View user's profile Send private message
Sebastian



Joined: 20 Feb 2008
Posts: 177

PostPosted: Fri Jan 28, 2011 11:20 am    Post subject: Reply with quote

Works fine here, in the debugger the string is correctly displayed in /debug and in /full_debug/checkmate and all compiles run till the winio menu call which lacks the callback functions.
Back to top
View user's profile Send private message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: N�rnberg, Germany

PostPosted: Fri Jan 28, 2011 11:57 am    Post subject: Reply with quote

Sebastian, thanks for checking! It is good that know that it works. Strange, on my machine I get a run-time error when I switch to Release or Checkmate.

I took out all the functions and subroutines and put them in a separate file. The main part contains now only the winapp followed by the resources. Seems like the compiler does not like code between winapp and the resources.

Anyway, it works now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group