Bug in versions 4.1.x?? Strange error with Delphi 7 app

Discussions related to using VirtualBox on Windows hosts.

Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby Speaker » 4. Oct 2011, 00:20

Hi! something rare happens when i update from version 4.0.12 to version 4.1.x
Host: Windows 7 ultimate 64b.
Guest: Windows XP sp2 32b.
I had a vm with a development enviroment with Delphi 7.
I run the same machine, with the same disk (i copied it for test this issue), in my notebook (i5, 4gb, video Intel HD Graphics) and in my desktop pc (i5, 8gb, video geforce gts 250)
In notebook, virtual box version is 4.0.12, y pc 4.1.4 (but i try with 4.1.0 and the same error occurs).
When i execute and exe compiled from my application code, in notebook runs ok, in pc crashed with an "Stream Read Error".

I run the application from the IDE and the lines of code reaching the error are:
Code: Select all   Expand viewCollapse view
  TPicture.RegisterFileFormat('xI', '', TIcon);
  TPicture.RegisterFileFormat('xL', '', TBitmap);
  TPicture.RegisterFileFormat('xF', '', TJpegImage);
  Application.Icon.LoadFromFile(IncludeTrailingPathDelimiter(CarpetaDeEjecucion) + ChangeFileExt(ExtractFileName(Application.ExeName), '.xI'));
  imLogo.Picture.LoadFromFile(IncludeTrailingPathDelimiter(CarpetaDeEjecucion) + ChangeFileExt(ExtractFileName(Application.ExeName), '.xL'))
  imPrincipal.Picture.LoadFromFile(IncludeTrailingPathDelimiter(CarpetaDeEjecucion) + ChangeFileExt(ExtractFileName(Application.ExeName), '.xF'));


The same exe (compiled in pc) runs without any problem in notebook, or host OS.
But from the IDE or as an standalone exe, it reach the exception.

My video memory is set to 128Mb, with 1 monitor, without remote screen.
I try with different combinations of HW acceleration (3D, 2D), but still get to the error.

It seems to be some change (bug) on version 4.1.x
Thanks you all for any suggestion or solution... (i actually have working version 4.0.12 installed, but i will probably want to update in a future)!
Speaker
 
Posts: 12
Joined: 3. Oct 2011, 23:49
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby scp » 4. Oct 2011, 00:47

Maybe you check if there is something going wrong with the filename before running LoadFromFile():
Code: Select all   Expand viewCollapse view
var
  strFileBase: String;
begin
   // your other code here...
   TPicture.RegisterFileFormat('xI', '', TIcon);
   TPicture.RegisterFileFormat('xL', '', TBitmap);
   TPicture.RegisterFileFormat('xF', '', TJpegImage);
   strFileBase := IncludeTrailingPathDelimiter(CarpetaDeEjecucion) + ChangeFileExt(ExtractFileName(Application.ExeName), '');
   if not FileExists(strFileBase + '.xI') then ShowMessage('Not found: '+strFileBase + '.xI');
   if not FileExists(strFileBase + '.xL') then ShowMessage('Not found: '+strFileBase + '.xL');
   if not FileExists(strFileBase + '.xF') then ShowMessage('Not found: '+strFileBase + '.xF');
   Application.Icon.LoadFromFile(strFileBase + '.xI');
   imLogo.Picture.LoadFromFile(strFileBase + '.xL');
   imPrincipal.Picture.LoadFromFile(strFileBase + '.xF');
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby Speaker » 4. Oct 2011, 00:54

Is not a problem with the code (although it may be better). The same code, same vm configuration, same vdi works fine in notebook with version 4.0.12.
In PC with version 4.1.4 do not work.
But... in PC i have downgrade to 4.0.8, try... fine... update to 4.0.12, try... fine... update to 4.1.0... get the error...
I have corresponding (same version) extended pack installed (an updated as i try with different versions).
By the way... this is the last thing i think... i am blaming my underlying hardware... update geforce drivers a time ago... but now... with same geforce drivers, but version 4.0.12, it works fine again.
Speaker
 
Posts: 12
Joined: 3. Oct 2011, 23:49
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby Perryg » 4. Oct 2011, 00:58

These kinds of problems that are reproducible should be reported to bugtracker. You will need to setup an account there as it is on a different system.
It would also help if you can post the ticket number here so other can see the progress, add information, or see the final results.
Perryg
Site Moderator
 
Posts: 25959
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby Speaker » 4. Oct 2011, 01:07

Thanks you... i just post a deffect ticket.
Speaker
 
Posts: 12
Joined: 3. Oct 2011, 23:49
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby Perryg » 4. Oct 2011, 01:24

Perryg
Site Moderator
 
Posts: 25959
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby scp » 6. Oct 2011, 22:54

Speaker wrote:Is not a problem with the code (although it may be better).


yes, but if you insert some debugging code you can be more specific in the bug report at which step the error occurs.
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby Speaker » 6. Oct 2011, 23:20

This topic makes you an idea of a "solution" (seems to be, but is the first thing i try).
http://www.delphigroups.info/2/7/630330.html

Take this in account... the app works fine from Win9x to Win7_64b, this peace of code goes with the app since 1998, Delphi 1 to 7, it compiles without any problem in any enviroment (in vb 4.1.x, too).
But, when you run the app, in a vb 4.1.x, you get the error... if you use version 4.0.12 or below... it works (i test it... compiled in this vm and other).
I'll do all the test...

The only enviroment in which the application do not work is if the virtual machine is run under virtual box 4.1.0 or above.
I test it... install 4.0.12, works, install 4.1.0 do not work, install 4.1.4 do not work, install 4.0.8 works, install 4.0.12... work... and that is.

I can try future versions as a beta_tester, and help as i can to solve this problem as it takes only install new version, execute same VM and execute app within it.
To add more data... i have installed in my VB extension pack (same version as VB), and vb guest additions.

Hope some of this data help solving this bug.
Speaker
 
Posts: 12
Joined: 3. Oct 2011, 23:49
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby Speaker » 7. Oct 2011, 00:00

Just for you to try... i post a single app (exe and source) that just got that code in it.
It works everywhere, except a VM running under VB w/ext_pack 4.1.x
The app shows a single windows with a JPG (xF extension), a custom ICON (xI extension), and a little BMP in the panel inside the windows (xL extension).
The files with extension xL, xI and xF must be named as EXE, and the 4 files must be under the same folder.
Attachments
VirtualBoxStreamErrorTest (source code).rar
(5.33 KiB) Downloaded 7 times
VirtualBoxStreamErrorTest (exe).rar
(332.12 KiB) Downloaded 5 times
Speaker
 
Posts: 12
Joined: 3. Oct 2011, 23:49
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby scp » 10. Oct 2011, 02:21

Currently I cannot reproduce the error. I used VirtualBox 4.1.4, with ExtPack and Additions installed, Host Win7 x64 with Guest Win7 x64. All three Graphics get loaded without error.
I tried your compiled .exe and compiled a new .exe with your source code and Delphi 7 (german).

Next I will try a WinXP Guest.
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby Speaker » 10. Oct 2011, 02:28

Perhaps is something with win xp 32b guest and that version.
But as i said... same VM run with vb4.0.x do not reach to the exception. Same VM run with vb4.1.x yes.
I do all the test i posted... i really do not know...
Speaker
 
Posts: 12
Joined: 3. Oct 2011, 23:49
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby scp » 10. Oct 2011, 04:03

Very strange. Tested it now with fresh installed WinXP 32bit SP2, WinXP 32bit SP3 and WinXP 32bit SP3 with all updates.
The error never happens, it works with all versions. I don't know if the localization makes a difference. I used german Win XP and would have only english, french and italian version and some MUIs in addition.
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby Speaker » 10. Oct 2011, 17:17

Perhaps something with large fonts?
In that particular machine, i compile app for large font resolution (120 dpi).
I can't try right know...
Speaker
 
Posts: 12
Joined: 3. Oct 2011, 23:49
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby Speaker » 10. Oct 2011, 17:46

I try. There is not a problem with video or font resolution.
It is a problem with the execution point of the app.
I got all my development enviroment in VMs, but for security reasons, all my source code in my host machine.
With version 4.1.x when you execute the app from a net unit (t:\ = \\VBoxSrv\Temporal, a shared unit), it gets the error.
If i copy the app to guest desktop, it do not gets the error.
With version 4.0.x do not happen this.
I got net configured as Brigde, with DHCP, shared units from vbox and drives connected to that shared units.
Still a bug, but this change the point of look.
Attachments
xp_d7_fg.txt
This is an OVA file (change extension) of the original VM, without virtualdisk (vdi).
(17 KiB) Downloaded 4 times
Speaker
 
Posts: 12
Joined: 3. Oct 2011, 23:49
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: Bug in versions 4.1.x?? Strange error with Delphi 7 app

Postby scp » 11. Oct 2011, 03:05

Do you use "." for CarpetaDeEjecucion in your apllication? Try to you use this, which is more safe:

Code: Select all   Expand viewCollapse view
   CarpetaDeEjecucion := ExtractFilePath(ParamStr(0));


It will contain the directory of the .exe, could be '\\VBoxSrv\Temporal\' or 'T:\' for example, depending from the point you start it.
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Next

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: Bing [Bot], noteirak and 46 guests