[M3devel] files over 2gig break 32bit Trestle file browser (maybe only Win32) (was the formsedit bug)

Jay jayk123 at hotmail.com
Fri Aug 1 10:57:20 CEST 2008


oh, well, I have a file over 2gig at the root of my drive...
 
PROCEDURE BuildStatus (READONLY ffd  : WinBase.WIN32_FIND_DATA;                     VAR(*OUT*) stat : File.Status) =  BEGIN    stat.size := ffd.nFileSizeLow;    stat.modificationTime := TimeWin32.FromFileTime(ffd.ftLastWriteTime);    IF Word.And(ffd.dwFileAttributes, WinNT.FILE_ATTRIBUTE_DIRECTORY) # 0      THEN stat.type := DirectoryFileType;      ELSE stat.type := RegularFile.FileType; (* more or less... *)    END;  END BuildStatus;
  Status = RECORD    type: Type;    modificationTime: Time.T;    size: CARDINAL  END;
This should be a 64 bit integer...
 
Any ideas for an easy compatible fix?
Making it 64 bits is perhaps breaking..and won't "just work" on Win32 anyway.
Still, probably changing it to LONGINT or LongWord.T is goodness.
But one wonders about breaking preexisting pickles? ? ?
You know, what type changes are ok?
DOUBLE (er, LONGFLOAT?) would also be kind of good -- it would allow 53 bit file sizes..
 
Since Status is not branded, not particularly amenable to pickling?
Or anyone could embed it in a branded type?
 
 - Jay



From: jayk123 at hotmail.comTo: dabenavidesd at yahoo.es; rodney.bates at wichita.edu; rcoleburn at scires.comDate: Fri, 1 Aug 2008 08:43:31 +0000CC: m3devel at elegosoft.comSubject: Re: [M3devel] need help with cm3 problem before I deliver software this week


I can reproduce the problem. Exactly as well reported.It kind of only happens once. Bring up formsedit, click, left arrow(s), type, it does what Randy said.Click again, arrows again, type again, not a second time. Good enough though.Close formsedit, reopen, it repros. Good.file.save, type backslash or forward slash in the dialog, press return, and boom:Most other strings are ok, but a single forward or backward slash, booms. ****** runtime error:***    An enumeration or subrange value was out of range.***    file "..\src\os\WIN32\FSWin32.m3", line 435***Stack trace:   FP         PC      Procedure---------  ---------  -------------------------------0x67afccc   0x42524f  BuildStatus + 0x21 in ..\src\os\WIN32\FSWin32.m30x67afe60   0x4251dc  Status + 0x137 in ..\src\os\WIN32\FSWin32.m30x67aff50   0xd9d131  DoStats + 0x253 in ..\src\lego\FileBrowserVBT.m30x67aff88   0x53a6ca  RunThread + 0x1f6 in ..\src\thread\WIN32\ThreadWin32.m30x67affb4   0x53a463  ThreadBase + 0x3a in ..\src\thread\WIN32\ThreadWin32.m3.........  .........  ... more frames ... bugs...  And is that red line supposed to appear in the gui?  - Jay> Date: Thu, 31 Jul 2008 22:43:07 +0000> From: dabenavidesd at yahoo.es> To: rodney.bates at wichita.edu; rcoleburn at scires.com> CC: m3devel at elegosoft.com> Subject: Re: [M3devel] need help with cm3 problem before I deliver software this week> > Hi all:> I think I remember somewhere there are runtime parameters for debugging Trestle on windows implementation. Check the source code of it; I can't find them in this moment.> Thanks> > --- El jue, 31/7/08, Randy Coleburn <rcoleburn at scires.com> escribió:> De: Randy Coleburn <rcoleburn at scires.com>> Asunto: Re: [M3devel] need help with cm3 problem before I deliver software this week> Para: "Rodney M. Bates" <rodney.bates at wichita.edu>> CC: m3devel at elegosoft.com> Fecha: jueves, 31 julio, 2008 10:51> > > > Rodney:>  > I am using Windows XP Professional, Service Pack 2 (on some systems, Service Pack 3 is applied).>  > Michel Dagenais suggested that if the problem does not reproduce on Linux, that it might have to do with how Windows reports character events.  He thought a Filter VBT may exist somewhere that would aid in debugging by printing method calls before propagating them to father/son.  This filter VBT would be inserted at different places in the VBT tree to get tracing information.  Are you familiar with something like this?>  > As for the pixmaps, Michel suggests increasing the resolution of the original pixmap to help alleviate problems with upscaling.  I may try this, but of course, FormsVBT uses a lot of pixmap resources, for example, radio, boolean, checkmark, numeric, etc all use pixmaps.>  > Regards,> Randy> > >>> "Rodney M. Bates" <rodney.bates at wichita.edu> 7/31/2008 9:33 AM >>>> Which variant of the M3 Windows target are you using?  I don't have any> of them built right now.> > Randy Coleburn wrote:> > Hi Olaf, Daniel, Rodney, et al:> >  > > Thanks for your responses so far.  Sorry for the delay in replying, but > > our email server has been offline for nearly 24-hours.  There were some > > severe electrical storms that took down both redundant power systems for > > our email system.  Hope I have not missed any of your replies.> >  > > Right now, I am delivering the software on Windows XP using SP2 or > > greater.  I have not tried to see if this problem also occurs on Unix.  > > I don't have ready access to a unix system from my current location.> >  > > So it is perhaps a Windows-only problem with Trestle/FormsVBT.  In any > > event, it is a real problem for me.> >  > > As for the pixmap stretching problem, I have tested various resolutions > > on the customer's computer.  Unfortunately, the customer demands that > > the display resolution stay at the 1920x1200.> > 1920x1200=pixmap stretch problem> > 1680x1050=pixmap stretch problem> > 1440x900=no problem> > 1024x768=no problem> >  > > Regards,> > Randy> > > >  >>> Olaf Wagner <wagner at elegosoft.com> 7/30/2008 2:24 AM >>>> > Quoting Randy Coleburn <rcoleburn at scires.com>:> > > >  > Hi:> >  >> >  > I've been using cm3 to develop software I am delivering this week to > >  >  a customer.  During the acceptance testing, we've run into a > >  > problem  that I have not been able to solve.  I am hoping someone in > >  > the cm3  community can help.  I need to solve this problem ASAP this > >  > week.> >  >> >  > This problem is easily reproduced using the "formsedit" program.> >  >> >  > The problem is with the TypeIn and TypeScript FormsVBT elements used > >  >  in my program.  Since formsedit uses these, you can easily > >  > reproduce  the problem.> >  >> >  > Click with the mouse to move the insertion point somewhere in the  > >  > text.  Observe that the cursor moves to that point.  Now, use the  > >  > left arrow key to move the insertion point a few characters to the  > >  > left.  Then, type a few characters.  Observe that the first  > >  > character you type shows up at the place where you initially moved  > >  > the cursor with the mouse, while the remaining characters show up at > >  >  the place where you moved the cursor via the left-arrow key.  This  > >  > behavior is wrong.  The first character you type should be at the  > >  > current insertion point, not at the one from the mouse move.> > > > Randy,> > > > I just rebuilt the CM3 GUI libraries and formsedit, but I wasn't able> > to reproduce the problem on FreeBSD 6.3.> > > > Does the problem show up on all platforms you are working on?> > Which are these?> > > > Are there any local modifications to the libraries which I may not> > have?> > > > If it occurs only on Unix, it may be possible that a weird window> > manager interferes with the event delivery; otherwise I've got no> > good idea. If on Unix, you/we could perhaps test the behaviour> > on a different (remote) X display?> > > > Please provide more data about the problem context and how to> > reproduce it.> > > > Regards,> > > > Olaf> > > >  > I'm sure the fix is easy, but I haven't been able to locate it yet.  > >  >  It probably has to do with the internal idea of the insertion point > >  >  not getting updated properly.  Note that the cursor on the screen > >  > is  in the right spot, it's just that the first character gets > >  > inserted  into the TypeIn or TypeScript in the wrong place (i.e., it > >  > is put at  the place from the mouse move, not from the last arrow > >  > key move).> >  >> >  > Any assistance you can provide is very much appreciated and will go  > >  > a long way toward keeping Modula-3 use alive and well for this  > >  > project.  If we can't fix this one, the customers will want to  > >  > re-code everything in some Microsoft language, probably C++ or C#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080801/112b85c5/attachment-0002.html>


More information about the M3devel mailing list