Are you importing .vbp files from the New Project->Import from VBP? Right now individual forms and projects from the "Add" menu aren't supported; have to import via whole projects from the new project dialog.
Are you able to attach a sample of a project you're having trouble with, or send it privately to WaynePhillipsEA on here or tB Discord?
Best would be if you could narrow the issue down further; remove things until it works to identify where exactly the problem is.
First of all, thank you very much for your time and response.
If it is by importing the vbp file.
I have some small projects that do not give me an import error, but the main one has more than 800 forms and this is the one that gives me the error and since it does not tell me the file in which the error occurs, I cannot identify it.
I would have no problem privately sharing the entire source but it is quite large.
Yeah I've tried to import two large VB6 projects without success also. Seems that the VB6 Project Import feature still has a way to go. Granted that the projects are not simple - many forms, modules, classes, UDTs, APIs, components, user controls, references, etc... So I didn't expect it to work, to be honest.
Seems like 'almost there' rather than 'a ways to go' when it's only getting tripped up when there's hundreds of forms. It hasn't been mentioned on VBF directly yet, but to share a fairly important milestone: tB can import and run PhotoDemon now, without modification; true 'Import, save, F5'. There's still bugs and printing is unimplemented, but it largely works; you can open photos, use most to all of the editing tools, and save. PD has 210 forms, 53 UserControls, 135 classes, and 108 modules. We're even working with Tanner on some preliminary steps to update it to 64bit.
I know it's disappointing when your own projects don't immediately open and run, but in most cases it's just a single or handful of issues, not some big laundry list where it's nowhere close
The biggest outstanding issue is MDI forms; a lot of these megaprojects use them, and those are known to not be implemented, but that's changing soon now.
AAraya, if you're able to share your projects, either here or privately with Wayne, it would be helpful to track down these increasingly obscure import bugs. (Unless it's MDI-related, then just sit tight for a bit).
Didn't mean to mischaracterize the scope of the import issues. From my perspective, as a user only, it seems like a long list of import issues that were listed. But you're right, maybe this just boils down to one or two issue and tB is just being noisy about it's output and I'm misunderstanding what I'm seeing.
If there's a parsing error, it could miss an 'End Sub' for example and trigger dozens of syntax errors following it. Or if you make extensive use of unimplemented App object methods like Log stuff those currently read as an error. Give that projects like PD run now it's hard to envision a scenario where there's still widespread, numerous bugs right on import..
So if you open tB, select 'Import from VBP' in the new project dialog, then select your VBP... where are the errors generated, is this a list of things in IMPORT_LOG.txt or what's showing in the Problems pane? Could you give an example of some of these errors? I'm just curious. For a very large project you can also expect a lot of stuff in the 'Problems' pane that's not a true error but a Warning (yellow); by default tB generates warnings for things like not declaring a variable type or function return type, unimplemented form/UC/control properties/methods/etc, 'possible misuse of hexadecimal literal' where something is resolved to a negative Integer where you probably want a positive Long, and where you've declared something from msvbvm60.dll a warning it will be redirected to an internal implementation. None of those are true errors; tB fully supports implicit typing and acts the same way as VB with the hex stuff, but it does create a noisy problems pane in very large projects. You can use the red/yellow boxes in the pane's titlebar to hide warnings, or adjust what triggers them in project settings.
You can send the whole project to Wayne via PMs to his username on here, GitHub, or tB Discord: WaynePhillipsEA
Or info at twinbasic.com is listed as the contact email but I'm not sure if it's checked often so if you need to send it by email I'd just drop him a note by PM that it's there after sending.
When I import Visual Basic projects it gives me this error and it does not indicate the original form and the program dies
"IDE internal error: Uncaught TypeError: Cannot read properties of undefined (reading 'length'),1.855664, TypeError: Cannot read properties of undefined (reading 'length')
I don't know if it has happened to anyone else, what could it be?
Thank you very much and very happy day
Thanks for sending the files to me.
I am unable to test it properly since I have 14 missing references. However, the primary issue is that opening this project requires a significant amount of memory at the moment. You'll need to enable Large Address Aware in the IDE settings, but even then, just opening the project uses 3.6GB of RAM here (with the missing references causing lots of compilation errors, which could be a factor in the memory usage), so things will be very unstable as you're so close to the 4GB limit of 32-bit processes.
Due to the excessive memory requirements, I suspect you're not going to be able to compile this mammoth project in tB just yet until we can address these problems.
Last edited by WaynePhillipsEA; May 7th, 2024 at 07:14 AM.
Out of curiosity, is there anything tB could do to take advantage of AWE to address more than 4GB? Even if RAM consumption is brought down considerably more (on top of the great work in reducing it already done), might need a ceiling above 4GB for modern IDE features for a project that size or larger.
Out of curiosity, is there anything tB could do to take advantage of AWE to address more than 4GB? Even if RAM consumption is brought down considerably more (on top of the great work in reducing it already done), might need a ceiling above 4GB for modern IDE features for a project that size or larger.
Good idea, but TBH I think it would probably be easier to upgrade the x64 compiler to offer cross compilation to x86.
I can see the picture now but it's too small to be able to read the text... don't need a new image if you could just copy/paste the text of the error messages. That's the same project file you posted? Or the complete version with code?
- English Windows.
- Dot as Decimal Separator.
- First time install of twinBASIC.
See below / as attachments screenshots of system and project settings, and the import log file.
Let me know if there is other info you want me to share.
Also, forgive me if it doesn't make any sense, but I remember that for Krool's common controls replacements, I had to copy a specific version of a type lib file. Could this problem be related to that?
Could you save the imported project (as a twinproj file), and upload that here. I just want to check whether it's the import process failing, or just a general problem opening this converted form on your machine.
The project you shared doesn't have any of Krool's VBCCR controls, not even a reference to them. The only typelib dependence is stdole2.tlb; but I doubt you were messing with a system file like that. I"m also on Win10 EN-US with . but I don't think it's the OS.
Just one thought; have you been installing new builds of tB over old ones? If so, try a clean extraction to a new folder.
Could you save the imported project (as a twinproj file), and upload that here.
See attached.
The project you shared doesn't have any of Krool's VBCCR controls, not even a reference to them. The only typelib dependence is stdole2.tlb; but I doubt you were messing with a system file like that.
I'm not limited by a lot of knowledge in that area, so I indeed stay clear of that as much as possible.
Just one thought; have you been installing new builds of tB over old ones? If so, try a clean extraction to a new folder.
First time I downloaded twinBASIC, and extracted in a clean folder.
Yup tiwinproj opens for me with no problem as well. Tonight I'll start trying in the VMs I have set up.
In the mean time if you're up for it, maybe we can narrow it down some. Try loading each of the attached projects and let us know which, if any, are successfully loaded. I've removed various controls from each one vs the original.
OK. I've done some further testing by creating various versions of the forms with only part of the controls. The problem is with the label controls.
The arrays of labels with the text "-" don't cause a problem, but the single label controls with the texts "Product:", "Edition:", "Serial Number:", etc. are causing the error messages.
The error is listed in the Debug Console as soon as I create a label on the form. I also see a limited number of properties:
After saving the project, the same happens as with the other projects: processing the form stops at a certain percentage and the error is displayed in the Debug Console.
I tested this with all the controls in the toolbox and found that the Line object generated the same error message.
Thanks for persevering with this. We've not had a bug report like this, and so it would seem important to track down what's going on here.
Could you enable the trace log by going to project settings, search for 'trace' and enable the trace log options - all of them except the last one (buffering). Leave the file path set to {DEBUG}. Save changes and the compiler will restart. Now add a blank label to a form again, and you should see all sorts of extra information info in the debug console. Please copy the debug console info again and attach for me to review.
This is the debug output after confirming the settings, and saving the project:
File: Debug Log - Part 1.txt
This part was added after creating a label on the form:
File: Debug Log - Part 2.txt
Thanks a lot. I'm fairly confident this is a bug involving bad JSON being generated from the compiler service. Please try BETA 535 of twinBASIC - it should better detect this problem and provide an opportunity to copy the bad JSON to the clipboard. If you could attach the bad JSON here, we'll hopefully be able to see find out what's going on here.
Custom controls support (which is what Sample 8 demonstrates) was disabled in Beta 424 and has not yet been re-enabled.
Reminder: 'Custom controls' are a new tB feature made with the idea of future cross-platform support, they're *not* the same thing as regular User Controls/ActiveX controls, which are working great.